private BitVector ReadBitVector(int length)
        {
            var bits = new BitVector(length);

            byte data = 0;
            byte mask = 0;

            for (int i = 0; i < length; i++)
            {
                if (mask == 0)
                {
                    data = ReadByte();
                    mask = 0x80;
                }

                if ((data & mask) != 0)
                    bits.SetBit(i);

                mask >>= 1;
            }

            return bits;
        }
 private BitVector ReadBitVector(int length)
 {
     BitVector vector = new BitVector(length);
     byte num = 0;
     byte num2 = 0;
     for (int i = 0; i < length; i++)
     {
         if (num2 == 0)
         {
             num = this.ReadByte();
             num2 = 0x80;
         }
         if ((num & num2) != 0)
         {
             vector.SetBit(i);
         }
         num2 = (byte) (num2 >> 1);
     }
     return vector;
 }