lib/bindata/io.rb
def readbits(nbits, endian)
      if @rendian != endian
        # don't mix bits of differing endian
        reset_read_bits
        @rendian = endian
      end

      if endian == :big
        read_big_endian_bits(nbits)
      else
        read_little_endian_bits(nbits)
      end
    end
# Reads exactly +nbits+ bits from the stream. +endian+ specifies whether
# the bits are stored in +:big+ or +:little+ endian format.
Reads exactly +nbits+ bits from the stream.
Reads exactly + nbits + bits from the stream .
def readbits(nbits, endian)
      if @rendian != endian
        reset_read_bits
        @rendian = endian
      end
      if endian == :big
        read_big_endian_bits(nbits)
      else
        read_little_endian_bits(nbits)
      end
    end
def readbits ( nbits , endian ) if @rendian != endian reset_read_bits @rendian = endian end if endian == :big read_big_endian_bits ( nbits ) else read_little_endian_bits ( nbits ) end end
Reads exactly +nbits+ bits from the stream.
Reads exactly + nbits + bits from the stream .
# don't mix bits of differing endian
nbits
endian