useDecompressed

inline fun <T, I : InputStream> InputStream.useDecompressed(compression: Compression<I>, block: (InputStream) -> T): T

Decompresses the input stream with the given compression algorithm.

Also closes the stream after the block is executed.