static byte[] SaveBlum(int[] seq, string name)
        {
            var min  = seq.Min();
            var max  = seq.Max();
            var blum = new BitArray(max - min + 1, false);

            foreach (var n in seq)
            {
                blum[n - min] = true;
            }
            var bytes = BitConverter.GetBytes(min).Concat(HuffmanHelper.ToByteArray(blum)).ToArray();

            bytes.WriteToGzip(name + "-blum");
            return(bytes);
        }
        static byte[] SaveHuffman(int[] seq, string name)
        {
            var seqdiff = seq.Distinct().Diff((a, b) => b - a).ToArray();
            var coder   = new HuffmanCoder <int>();

            coder.Build(seqdiff);
            var encoded = coder.Encode(seqdiff);
            var freq    = coder.GetFrequencies();
            var seqhuff = BitConverter.GetBytes((short)(freq.Length))
                          .Concat(HuffmanHelper.ToByteArray(freq))
                          .Concat(HuffmanHelper.ToByteArray(encoded))
                          .ToArray();

            seqhuff.WriteToGzip(name + "-huff");
            return(seqhuff);
        }