GzipSdkSource

expect class GzipSdkSource : SdkSource

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

actual class GzipSdkSource

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

Constructors

Link copied to clipboard
expect constructor(source: SdkSource)
actual constructor(source: <Error class: unknown class>)

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.

actual open fun close()
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.

actual open fun read(sink: SdkBuffer, limit: Long): Long

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.