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 part of dart.io; | 5 part of dart.io; |
6 | 6 |
7 | 7 |
8 /** | 8 /** |
9 * An instance of the default implementation of the [ZLibCodec]. | 9 * An instance of the default implementation of the [ZLibCodec]. |
10 */ | 10 */ |
11 const ZLIB = const ZLibCodec(); | 11 const ZLibCodec ZLIB = const ZLibCodec(); |
12 | 12 |
13 | 13 |
14 /** | 14 /** |
15 * The [ZLibCodec] encodes raw bytes to ZLib compressed bytes and decodes ZLib | 15 * The [ZLibCodec] encodes raw bytes to ZLib compressed bytes and decodes ZLib |
16 * compressed bytes to raw bytes. | 16 * compressed bytes to raw bytes. |
17 */ | 17 */ |
18 class ZLibCodec extends Codec<List<int>, List<int>> { | 18 class ZLibCodec extends Codec<List<int>, List<int>> { |
19 /** | 19 /** |
20 * The compression level of the [ZLibCodec]. | 20 * The compression level of the [ZLibCodec]. |
21 */ | 21 */ |
(...skipping 16 matching lines...) Expand all Loading... |
38 * rates at the cost of more CPU and memory usage. Levels below 6 will use | 38 * rates at the cost of more CPU and memory usage. Levels below 6 will use |
39 * less CPU and memory, but at the cost of lower compression rates. | 39 * less CPU and memory, but at the cost of lower compression rates. |
40 */ | 40 */ |
41 const ZLibCodec({this.level: 6}); | 41 const ZLibCodec({this.level: 6}); |
42 } | 42 } |
43 | 43 |
44 | 44 |
45 /** | 45 /** |
46 * An instance of the default implementation of the [GZipCodec]. | 46 * An instance of the default implementation of the [GZipCodec]. |
47 */ | 47 */ |
48 const GZIP = const GZipCodec(); | 48 const GZipCodec GZIP = const GZipCodec(); |
49 | 49 |
50 | 50 |
51 /** | 51 /** |
52 * The [GZipCodec] encodes raw bytes to GZip compressed bytes and decodes GZip | 52 * The [GZipCodec] encodes raw bytes to GZip compressed bytes and decodes GZip |
53 * compressed bytes to raw bytes. | 53 * compressed bytes to raw bytes. |
54 * | 54 * |
55 * The difference between [ZLibCodec] and [GZipCodec] is that the [GZipCodec] | 55 * The difference between [ZLibCodec] and [GZipCodec] is that the [GZipCodec] |
56 * wraps the `ZLib` compressed bytes in `GZip` frames. | 56 * wraps the `ZLib` compressed bytes in `GZip` frames. |
57 */ | 57 */ |
58 class GZipCodec extends Codec<List<int>, List<int>> { | 58 class GZipCodec extends Codec<List<int>, List<int>> { |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 /** | 282 /** |
283 * Mark the filter as closed. Always call this method for any filter created | 283 * Mark the filter as closed. Always call this method for any filter created |
284 * to avoid leaking resources. [end] can be called at any time, but any | 284 * to avoid leaking resources. [end] can be called at any time, but any |
285 * successive calls to [process] or [processed] will fail. | 285 * successive calls to [process] or [processed] will fail. |
286 */ | 286 */ |
287 void end(); | 287 void end(); |
288 | 288 |
289 external static _Filter newZLibDeflateFilter(bool gzip, int level); | 289 external static _Filter newZLibDeflateFilter(bool gzip, int level); |
290 external static _Filter newZLibInflateFilter(); | 290 external static _Filter newZLibInflateFilter(); |
291 } | 291 } |
OLD | NEW |