public void Read_15_15_15()
 {
     using (var stream = new MemoryStream(BitOperation.ParseToBytes("00001000 00000100 00000010 00000000"))) {
         using (var reader = new EliasGammaUnsignedReader(stream)) {
             Assert.AreEqual((ulong)15, reader.Read());
             Assert.AreEqual((ulong)15, reader.Read());
             Assert.AreEqual((ulong)15, reader.Read());
         }
     }
 }
        public void WriteRead_First1000_Appending()
        {
            ulong min = 0;
            ulong max = 1000;

            using (var stream = new MemoryStream()) {
                using (var writer = new EliasGammaUnsignedWriter(stream)) {
                    for (var i = min; i < max; i++)
                    {
                        writer.Write(i);
                    }
                }
                stream.Position = 0;
                using (var reader = new EliasGammaUnsignedReader(stream)) {
                    for (var i = min; i < max; i++)
                    {
                        Assert.AreEqual(i, reader.Read());
                    }
                }
            }
        }