GzipSdkSource

expect class GzipSdkSource(source: SdkSource) : SdkSource

Wraps the SdkSource so that it compresses into gzip format with each read.

Constructors

Link copied to clipboard
expect constructor(source: SdkSource)

Functions

Link copied to clipboard
expect open override fun close()

Closes this source and releases any resources held. It is an error to read from a closed source. This is an idempotent operation.

Link copied to clipboard
expect open override fun read(sink: SdkBuffer, limit: Long): Long

Remove at least 1 byte, and up-to limit bytes from this and appends them to sink. Returns the number of bytes read, or -1 if this source is exhausted.

Inherited functions

Link copied to clipboard

Returns a new source that buffers reads from the underlying source. The returned source will perform bulk reads to an in-memory buffer making small reads efficient.

Link copied to clipboard
fun SdkSource.readFully(sink: SdkBuffer, byteCount: Long)

Remove exactly byteCount bytes from this source and appends them to sink.