GzipSink

class GzipSink(sink: 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.

Constructors

GzipSink
Link copied to clipboard
fun GzipSink(sink: Sink)

Functions

close
Link copied to clipboard
open override fun close()
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
flush
Link copied to clipboard
open override fun flush()
hashCode
Link copied to clipboard
open fun hashCode(): Int
timeout
Link copied to clipboard
open override fun timeout(): Timeout
toString
Link copied to clipboard
open fun toString(): String
write
Link copied to clipboard
open override fun write(source: Buffer, byteCount: Long)

Properties

deflater
Link copied to clipboard
val deflater: Deflater
The deflater used to compress the body.