read

abstract fun <R> read(offset: Int = 0, atMost: Int = size - offset, block: Input.() -> R): R

Read maximum of atMost bytes as input from the binary, starting at offset. The generated input is always closed when leaving scope, so it could not be leaked outside of scope of block.