readOrInflate

fun readOrInflate(sink: Buffer, byteCount: Long): Long

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.

Use this instead of read when it is useful to consume the deflated stream even when doing so doesn't yield inflated bytes.