public void init(ByteBlockPool pool, int startIndex, int endIndex) {assert endIndex-startIndex >= 0;assert startIndex >= 0;assert endIndex >= 0;this.pool = pool;this.endIndex = endIndex;level = 0;bufferUpto = startIndex / ByteBlockPool.BYTE_BLOCK_SIZE;bufferOffset = bufferUpto * ByteBlockPool.BYTE_BLOCK_SIZE;buffer = pool.buffers[bufferUpto];upto = startIndex & ByteBlockPool.BYTE_BLOCK_MASK;final int firstSize = ByteBlockPool.LEVEL_SIZE_ARRAY[0];if (startIndex+firstSize >= endIndex) {limit = endIndex & ByteBlockPool.BYTE_BLOCK_MASK;} elselimit = upto+firstSize-4;}
public void Init(ByteBlockPool pool, int startIndex, int endIndex){Debug.Assert(endIndex - startIndex >= 0);Debug.Assert(startIndex >= 0);Debug.Assert(endIndex >= 0);this.pool = pool;this.EndIndex = endIndex;level = 0;bufferUpto = startIndex / ByteBlockPool.BYTE_BLOCK_SIZE;BufferOffset = bufferUpto * ByteBlockPool.BYTE_BLOCK_SIZE;buffer = pool.Buffers[bufferUpto];upto = startIndex & ByteBlockPool.BYTE_BLOCK_MASK;int firstSize = ByteBlockPool.LEVEL_SIZE_ARRAY[0];if (startIndex + firstSize >= endIndex){limit = endIndex & ByteBlockPool.BYTE_BLOCK_MASK;}else{limit = upto + firstSize - 4;}}