| 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 class _FilterImpl extends NativeFieldWrapperClass1 implements _Filter { | 6 class _FilterImpl extends NativeFieldWrapperClass1 implements _Filter { |
| 6 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"; |
| 7 | 8 |
| 8 List<int> processed({bool flush: true, bool end: false}) | 9 List<int> processed({bool flush: true, bool end: false}) |
| 9 native "Filter_Processed"; | 10 native "Filter_Processed"; |
| 10 } | 11 } |
| 11 | 12 |
| 12 class _ZLibInflateFilter extends _FilterImpl { | 13 class _ZLibInflateFilter extends _FilterImpl { |
| 13 _ZLibInflateFilter(int windowBits, List<int> dictionary, bool raw) { | 14 _ZLibInflateFilter(int windowBits, List<int> dictionary, bool raw) { |
| 14 _init(windowBits, dictionary, raw); | 15 _init(windowBits, dictionary, raw); |
| 15 } | 16 } |
| 16 void _init(int windowBits, List<int> dictionary, bool raw) | 17 void _init(int windowBits, List<int> dictionary, bool raw) |
| 17 native "Filter_CreateZLibInflate"; | 18 native "Filter_CreateZLibInflate"; |
| 18 } | 19 } |
| 19 | 20 |
| 20 class _ZLibDeflateFilter extends _FilterImpl { | 21 class _ZLibDeflateFilter extends _FilterImpl { |
| 21 _ZLibDeflateFilter(bool gzip, int level, int windowBits, int memLevel, | 22 _ZLibDeflateFilter(bool gzip, int level, int windowBits, int memLevel, |
| 22 int strategy, List<int> dictionary, bool raw) { | 23 int strategy, List<int> dictionary, bool raw) { |
| 23 _init(gzip, level, windowBits, memLevel, strategy, dictionary, raw); | 24 _init(gzip, level, windowBits, memLevel, strategy, dictionary, raw); |
| 24 } | 25 } |
| 25 void _init(bool gzip, int level, int windowBits, int memLevel, int strategy, | 26 void _init(bool gzip, int level, int windowBits, int memLevel, |
| 26 List<int> dictionary, bool raw) native "Filter_CreateZLibDeflate"; | 27 int strategy, List<int> dictionary, bool raw) |
| 28 native "Filter_CreateZLibDeflate"; |
| 27 } | 29 } |
| 28 | 30 |
| 29 @patch | 31 @patch class _Filter { |
| 30 class _Filter { | 32 @patch static _Filter _newZLibDeflateFilter(bool gzip, int level, |
| 31 @patch | 33 int windowBits, int memLevel
, |
| 32 static _Filter _newZLibDeflateFilter(bool gzip, int level, int windowBits, | 34 int strategy, |
| 33 int memLevel, int strategy, List<int> dictionary, bool raw) => | 35 List<int> dictionary, |
| 34 new _ZLibDeflateFilter( | 36 bool raw) => |
| 35 gzip, level, windowBits, memLevel, strategy, dictionary, raw); | 37 new _ZLibDeflateFilter(gzip, level, windowBits, memLevel, strategy, |
| 36 @patch | 38 dictionary, raw); |
| 37 static _Filter _newZLibInflateFilter( | 39 @patch static _Filter _newZLibInflateFilter(int windowBits, |
| 38 int windowBits, List<int> dictionary, bool raw) => | 40 List<int> dictionary, |
| 41 bool raw) => |
| 39 new _ZLibInflateFilter(windowBits, dictionary, raw); | 42 new _ZLibInflateFilter(windowBits, dictionary, raw); |
| 40 } | 43 } |
| OLD | NEW |