public static long PeekInt64(this RailBitBuffer buffer, RailInt64Compressor compressor) { if (compressor.RequiredBits > RailConfig.VARINT_FALLBACK_SIZE) { return(compressor.Unpack(buffer.PeekUInt64())); } return(compressor.Unpack(buffer.Peek(compressor.RequiredBits))); }
public static void ReadInt64s( this RailBitBuffer buffer, RailInt64Compressor compressor, long[] toStore) { if (compressor.RequiredBits > RailConfig.VARINT_FALLBACK_SIZE) { for (int i = 0; i < toStore.Length; i++) { toStore[i] = compressor.Unpack(buffer.ReadUInt64()); } } else { for (int i = 0; i < toStore.Length; i++) { toStore[i] = compressor.Unpack(buffer.Read(compressor.RequiredBits)); } } }