public override int Get3ByteInt(long index, int offset) { long address = address(index, offset); int lowWord = UnsafeUtil.getShort(address) & 0xFFFF; int highByte = UnsafeUtil.getByte(address + Short.BYTES) & 0xFF; int result = lowWord | (highByte << (sizeof(short) * 8)); return(result == 0xFFFFFF ? -1 : result); }
public override long Get5ByteLong(long index, int offset) { long address = address(index, offset); long low4b = GetInt(address) & 0xFFFFFFFFL; long high1b = UnsafeUtil.getByte(address + Integer.BYTES) & 0xFF; long result = low4b | (high1b << 32); return(result == 0xFFFFFFFFFFL ? -1 : result); }
public override void Get(long index, sbyte[] into) { long address = address(index, 0); for (int i = 0; i < itemSize; i++, address++) { into[i] = UnsafeUtil.getByte(address); } }
private sbyte GetByte(long p) { return(UnsafeUtil.getByte(p)); }
public override sbyte GetByte(long index, int offset) { return(UnsafeUtil.getByte(Address(index, offset))); }