OLD | NEW |
---|---|
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 class _FilterImpl extends NativeFieldWrapperClass1 implements _Filter { | 6 class _FilterImpl extends NativeFieldWrapperClass1 implements _Filter { |
7 void process(List<int> data, int start, int end) native "Filter_Process"; | 7 void process(List<int> data, int start, int end) native "Filter_Process"; |
8 | 8 |
9 List<int> processed({bool flush: true, bool end: false}) | 9 List<int> processed({bool flush: true, bool end: false}) |
10 native "Filter_Processed"; | 10 native "Filter_Processed"; |
11 | 11 |
12 void end() native "Filter_End"; | 12 void end() native "Filter_End"; |
13 } | 13 } |
14 | 14 |
15 class _ZLibInflateFilter extends _FilterImpl { | 15 class _ZLibInflateFilter extends _FilterImpl { |
16 _ZLibInflateFilter() { | 16 _ZLibInflateFilter(int windowBits, List<int> dictionary, bool raw) { |
17 _init(); | 17 print("Dart _ZLibInflateFilter $windowBits $dictionary $raw"); |
Anders Johnsen
2014/01/27 12:27:45
Debug stuff.
| |
18 _init(windowBits, dictionary, raw); | |
18 } | 19 } |
19 void _init() native "Filter_CreateZLibInflate"; | 20 void _init(int windowBits, List<int> dictionary, bool raw) |
21 native "Filter_CreateZLibInflate"; | |
20 } | 22 } |
21 | 23 |
22 class _ZLibDeflateFilter extends _FilterImpl { | 24 class _ZLibDeflateFilter extends _FilterImpl { |
23 _ZLibDeflateFilter(bool gzip, int level) { | 25 _ZLibDeflateFilter(bool gzip, int level, int windowBits, int memLevel, |
24 _init(gzip, level); | 26 int strategy, List<int> dictionary, bool raw) { |
27 _init(gzip, level, windowBits, memLevel, strategy, dictionary, raw); | |
25 } | 28 } |
26 void _init(bool gzip, int level) native "Filter_CreateZLibDeflate"; | 29 void _init(bool gzip, int level, int windowBits, int memLevel, |
30 int strategy, List<int> dictionary, bool raw) | |
31 native "Filter_CreateZLibDeflate"; | |
27 } | 32 } |
28 | 33 |
29 patch class _Filter { | 34 patch class _Filter { |
30 /* patch */ static _Filter newZLibDeflateFilter(bool gzip, int level) | 35 /* patch */ static _Filter newZLibDeflateFilter(bool gzip, int level, |
31 => new _ZLibDeflateFilter(gzip, level); | 36 int windowBits, int memLevel, |
32 /* patch */ static _Filter newZLibInflateFilter() => new _ZLibInflateFilter(); | 37 int strategy, |
38 List<int> dictionary, | |
39 bool raw) => | |
40 new _ZLibDeflateFilter(gzip, level, windowBits, memLevel, strategy, | |
41 dictionary, raw); | |
42 /* patch */ static _Filter newZLibInflateFilter(int windowBits, | |
43 List<int> dictionary, | |
44 bool raw) => | |
45 new _ZLibInflateFilter(windowBits, dictionary, raw); | |
33 } | 46 } |
34 | |
OLD | NEW |