gunzipBounded

fun gunzipBounded(bytes: ByteArray, maxBytes: Int): ByteArray(source)

Inflates gzip bytes, throwing IOException past maxBytes of output. GZIPInputStream already rejects data that isn't gzip and a truncated or corrupt stream (its trailer CRC and length are checked at end of input).