Skip to content

okio / okio / InflaterSource


(jvm) class InflaterSource :Source

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


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


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 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 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