| Index: mojo/dart/embedder/io/filter_patch.dart
|
| diff --git a/mojo/dart/embedder/io/filter_patch.dart b/mojo/dart/embedder/io/filter_patch.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3a321703b62045bb99d2ef8ee17f2c098c001089
|
| --- /dev/null
|
| +++ b/mojo/dart/embedder/io/filter_patch.dart
|
| @@ -0,0 +1,45 @@
|
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +
|
| +class _FilterImpl extends NativeFieldWrapperClass1 implements _Filter {
|
| + void process(List<int> data, int start, int end) native "Filter_Process";
|
| +
|
| + List<int> processed({bool flush: true, bool end: false})
|
| + native "Filter_Processed";
|
| +
|
| + void end() native "Filter_End";
|
| +}
|
| +
|
| +class _ZLibInflateFilter extends _FilterImpl {
|
| + _ZLibInflateFilter(int windowBits, List<int> dictionary, bool raw) {
|
| + _init(windowBits, dictionary, raw);
|
| + }
|
| + void _init(int windowBits, List<int> dictionary, bool raw)
|
| + native "Filter_CreateZLibInflate";
|
| +}
|
| +
|
| +class _ZLibDeflateFilter extends _FilterImpl {
|
| + _ZLibDeflateFilter(bool gzip, int level, int windowBits, int memLevel,
|
| + int strategy, List<int> dictionary, bool raw) {
|
| + _init(gzip, level, windowBits, memLevel, strategy, dictionary, raw);
|
| + }
|
| + void _init(bool gzip, int level, int windowBits, int memLevel,
|
| + int strategy, List<int> dictionary, bool raw)
|
| + native "Filter_CreateZLibDeflate";
|
| +}
|
| +
|
| +patch class _Filter {
|
| + /* patch */ static _Filter _newZLibDeflateFilter(bool gzip, int level,
|
| + int windowBits, int memLevel,
|
| + int strategy,
|
| + List<int> dictionary,
|
| + bool raw) =>
|
| + new _ZLibDeflateFilter(gzip, level, windowBits, memLevel, strategy,
|
| + dictionary, raw);
|
| + /* patch */ static _Filter _newZLibInflateFilter(int windowBits,
|
| + List<int> dictionary,
|
| + bool raw) =>
|
| + new _ZLibInflateFilter(windowBits, dictionary, raw);
|
| +}
|
|
|