BYTE_BLOCK_SHIFT

const val BYTE_BLOCK_SHIFT: Int = 15

Use this to find the index of the buffer containing a byte, given an offset to that byte.

bufferUpto = globalOffset >> BYTE_BLOCK_SHIFT

bufferUpto = globalOffset / BYTE_BLOCK_SIZE