public void setBytesRef(BytesRef term, int textStart) {final byte[] bytes = term.bytes = buffers[textStart >> BYTE_BLOCK_SHIFT];int pos = textStart & BYTE_BLOCK_MASK;if ((bytes[pos] & 0x80) == 0) {term.length = bytes[pos];term.offset = pos+1;} else {term.length = (bytes[pos]&0x7f) + ((bytes[pos+1]&0xff)<<7);term.offset = pos+2;}assert term.length >= 0;}

public void setBytesRef ( BytesRef term , int textStart ) { final byte [ ] bytes = term . bytes = buffers [ textStart > > BYTE_BLOCK_SHIFT ] ; int pos = textStart & BYTE_BLOCK_MASK ; if ( ( bytes [ pos ] & 0x80 ) == 0 ) { term . length = bytes [ pos ] ; term . offset = pos + 1 ; } else { term . length = ( bytes [ pos ] & 0x7f ) + ( ( bytes [ pos + 1 ] & 0xff ) << 7 ) ; term . offset = pos + 2 ; } assert term . length >= 0 ; }
public void SetBytesRef(BytesRef term, int textStart){var bytes = term.Bytes = buffers[textStart >> BYTE_BLOCK_SHIFT];var pos = textStart & BYTE_BLOCK_MASK;if ((bytes[pos] & 0x80) == 0){term.Length = bytes[pos];term.Offset = pos + 1;}else{term.Length = (bytes[pos] & 0x7f) + ((bytes[pos + 1] & 0xff) << 7);term.Offset = pos + 2;}Debug.Assert(term.Length >= 0);}
