Пример #1
0
        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)));
        }
Пример #2
0
        public static float PeekFloat(this RailBitBuffer buffer, RailFloatCompressor compressor)
        {
            if (compressor.RequiredBits > RailConfig.VARINT_FALLBACK_SIZE)
            {
                return(compressor.Unpack(buffer.PeekUInt()));
            }

            return(compressor.Unpack(buffer.Peek(compressor.RequiredBits)));
        }
Пример #3
0
 public static SequenceId Peek(RailBitBuffer buffer)
 {
     return(new SequenceId(buffer.Peek(BITS_USED)));
 }