private NativeParser GetParserForBucket(uint bucket, out uint endOffset) { uint start, end; if (_entryIndexSize == 0) { uint bucketOffset = _baseOffset + bucket; start = _reader.ReadUInt8(bucketOffset); end = _reader.ReadUInt8(bucketOffset + 1); } else if (_entryIndexSize == 1) { uint bucketOffset = _baseOffset + 2 * bucket; start = _reader.ReadUInt16(bucketOffset); end = _reader.ReadUInt16(bucketOffset + 2); } else { uint bucketOffset = _baseOffset + 4 * bucket; start = _reader.ReadUInt32(bucketOffset); end = _reader.ReadUInt32(bucketOffset + 4); } endOffset = end + _baseOffset; return(new NativeParser(_reader, _baseOffset + start)); }
public byte GetUInt8() { byte val = _reader.ReadUInt8(_offset); _offset += 1; return(val); }