Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1312)

Unified Diff: sdk/lib/io/data_transformer.dart

Issue 1827803002: Make convert library strong-mode compliant. Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix more converters. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/convert/utf.dart ('k') | tests/lib/convert/chunked_conversion1_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/data_transformer.dart
diff --git a/sdk/lib/io/data_transformer.dart b/sdk/lib/io/data_transformer.dart
index d3648e786f88176e17db496a0157d1534908a61d..12d623a00e2b75f4203de611dd848b86556ecc3c 100644
--- a/sdk/lib/io/data_transformer.dart
+++ b/sdk/lib/io/data_transformer.dart
@@ -147,7 +147,7 @@ class ZLibCodec extends Codec<List<int>, List<int>> {
/**
* Get a [ZLibEncoder] for encoding to `ZLib` compressed data.
*/
- Converter<List<int>, List<int>> get encoder =>
+ ZLibEncoder get encoder =>
new ZLibEncoder(gzip: false, level: level, windowBits: windowBits,
memLevel: memLevel, strategy: strategy,
dictionary: dictionary, raw: raw);
@@ -155,7 +155,7 @@ class ZLibCodec extends Codec<List<int>, List<int>> {
/**
* Get a [ZLibDecoder] for decoding `ZLib` compressed data.
*/
- Converter<List<int>, List<int>> get decoder =>
+ ZLibDecoder get decoder =>
new ZLibDecoder(windowBits: windowBits, dictionary: dictionary, raw: raw);
}
@@ -259,7 +259,7 @@ class GZipCodec extends Codec<List<int>, List<int>> {
/**
* Get a [ZLibEncoder] for encoding to `GZip` compressed data.
*/
- Converter<List<int>, List<int>> get encoder =>
+ ZLibEncoder get encoder =>
new ZLibEncoder(gzip: true, level: level, windowBits: windowBits,
memLevel: memLevel, strategy: strategy,
dictionary: dictionary, raw: raw);
@@ -267,7 +267,7 @@ class GZipCodec extends Codec<List<int>, List<int>> {
/**
* Get a [ZLibDecoder] for decoding `GZip` compressed data.
*/
- Converter<List<int>, List<int>> get decoder =>
+ ZLibDecoder get decoder =>
new ZLibDecoder(windowBits: windowBits, dictionary: dictionary, raw: raw);
}
@@ -275,7 +275,8 @@ class GZipCodec extends Codec<List<int>, List<int>> {
* The [ZLibEncoder] encoder is used by [ZLibCodec] and [GZipCodec] to compress
* data.
*/
-class ZLibEncoder extends Converter<List<int>, List<int>> {
+class ZLibEncoder extends
+ ChunkedConverter<List<int>, List<int>, List<int>, List<int>> {
/**
* When true, `GZip` frames will be added to the compressed data.
*/
@@ -378,7 +379,8 @@ class ZLibEncoder extends Converter<List<int>, List<int>> {
/**
* The [ZLibDecoder] is used by [ZLibCodec] and [GZipCodec] to decompress data.
*/
-class ZLibDecoder extends Converter<List<int>, List<int>> {
+class ZLibDecoder extends
+ ChunkedConverter<List<int>, List<int>, List<int>, List<int>> {
/**
* Base two logarithm of the window size (the size of the history buffer). It
* should be in the range `8..15`. Larger values result in better compression
« no previous file with comments | « sdk/lib/convert/utf.dart ('k') | tests/lib/convert/chunked_conversion1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698