Beispiel #1
0
        private static byte[] Compress(List <ulong> values, byte P)
        {
            var bitStream = new BitStream();
            var sw        = new GRCodedStreamWriter(bitStream, P);

            foreach (var value in values)
            {
                sw.Write(value);
            }
            return(bitStream.ToByteArray());
        }
        private static FastBitArray Compress(List <ulong> values, byte P)
        {
            var bitArray  = new FastBitArray();
            var bitStream = new BitStream(bitArray);
            var sw        = new GRCodedStreamWriter(bitStream, P);

            foreach (var value in values)
            {
                sw.Write(value);
            }
            return(bitArray);
        }