slice

fun slice(offset: Int, length: Int): ByteArray

Read a byte range as a fresh array without advancing position.