public static int PeekInt(
   this RailBitBuffer buffer,
   RailIntCompressor compressor)
 {
   if (compressor.RequiredBits > RailConfig.VARINT_FALLBACK_SIZE)
     return compressor.Unpack(buffer.PeekUInt());
   else
     return compressor.Unpack(buffer.Peek(compressor.RequiredBits));
 }
Example #2
0
 public static int PeekInt(
     this RailBitBuffer buffer,
     RailIntCompressor compressor)
 {
     if (compressor.RequiredBits > RailConfig.VARINT_FALLBACK_SIZE)
     {
         return(compressor.Unpack(buffer.PeekUInt()));
     }
     else
     {
         return(compressor.Unpack(buffer.Peek(compressor.RequiredBits)));
     }
 }