Skip to content

okio / okio / InflaterSource

InflaterSource

(jvm) class InflaterSource :Source

A source that uses DEFLATE to decompress data read from another source.

Constructors

Name Summary
(jvm) <init> InflaterSource(source:Source, inflater:Inflater)

Functions

Name Summary
(jvm) close fun close():Unit
(jvm) read fun read(sink:Buffer, byteCount:Long):Long
(jvm) readOrInflate Consume deflated bytes from the underlying source, and write any inflated bytes to sink. Returns the number of inflated bytes written to sink. This may return 0L, though it will always consume 1 or more bytes from the underlying source if it is not exhausted.fun readOrInflate(sink:Buffer, byteCount:Long):Long
(jvm) refill Refills the inflater with compressed data if it needs input. (And only if it needs input). Returns true if the inflater required input but the source was exhausted.fun refill():Boolean
(jvm) timeout fun timeout():Timeout

Extension Functions

Name Summary
(jvm) gzip Returns a GzipSource that gzip-decompresses this Source while reading.funSource.gzip():GzipSource
(jvm) inflate Returns an InflaterSource that DEFLATE-decompresses this Source while reading.funSource.inflate(inflater:Inflater= Inflater()):InflaterSource