Compression

fun interface Compression<I : InputStream>

Compression algorithm to use when reading files. We support GZIP and ZIP compression out of the box.

Custom decompression algorithms can be added by creating an instance of Compression.

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard

For .gz / GZIP files

Link copied to clipboard
data object None : Compression<InputStream>

No compression

Link copied to clipboard

For .zip / ZIP files

Functions

Link copied to clipboard
open fun doFinally(inputStream: I)

Can be overridden to perform some actions after reading from the input stream. Remember to close the stream if you override this function.

Link copied to clipboard
open fun doFirst(inputStream: I)

Can be overridden to perform some actions before reading from the input stream.

Link copied to clipboard
abstract fun wrapStream(inputStream: InputStream): I

Wraps any InputStream into a decompressing InflaterInputStream stream