startChunkedConversion method Null safety

ByteConversionSink startChunkedConversion (
  1. Sink<List<int>> sink
)
override

Start a chunked conversion.

Accepts any Sink<List<int>>, but prefers a ByteConversionSink, and converts any other sink to a ByteConversionSink before using it.

Implementation

ByteConversionSink startChunkedConversion(Sink<List<int>> sink) {
  if (sink is! ByteConversionSink) {
    sink = new ByteConversionSink.from(sink);
  }
  return new _ZLibDecoderSink._(sink, windowBits, dictionary, raw);
}