예제 #1
0
 // FloatCompressor
 public static void WriteFloat(this BitBuffer buffer, SingleCompressor compressor, float value)
 {
     if (compressor.RequiredBits > Config.VARINT_FALLBACK_SIZE)
     {
         buffer.WriteUInt(compressor.Pack(value));
     }
     else
     {
         buffer.Write(compressor.RequiredBits, compressor.Pack(value));
     }
 }
예제 #2
0
 // SequenceId
 public static void WriteSequenceId(this BitBuffer buffer, SequenceId sequenceId)
 {
     buffer.Write(SequenceId.BITS_USED, sequenceId.RawValue);
 }