Skip to content

okio / okio / GzipSink / <init>


(jvm) GzipSink(sink:Sink)

A sink that uses GZIP to compress written data to another sink.

Sync flush

Aggressive flushing of this stream may result in reduced compression. Each call to flush immediately compresses all currently-buffered data; this early compression may be less effective than compression performed without flushing.

This is equivalent to using Deflater with the sync flush option. This class does not offer any partial flush mechanism. For best performance, only call flush when application behavior requires it.