Inheritance: IDisposable
Exemple #1
0
        public static IEnumerable<KeyValuePair<uint, uint>> FixedBitReader(byte[] Data, int BitCount = 0, int Offset = 0)
        {
            using (var BitReader = new BitReader(Data))
            {
                BitReader.Position = Offset;

                uint Index = 0;
                while (BitReader.BitsLeft >= BitCount)
                {
                    yield return new KeyValuePair<uint, uint>(Index++, BitReader.ReadBits(BitCount));
                }
            }
        }
Exemple #2
0
 public static uint ReadBitsAt(byte[] Data, int Offset, int Count)
 {
     var BitReader = new BitReader(Data);
     BitReader.Position = Offset;
     return BitReader.ReadBits(Count);
 }