class BinData::IO::Read
def initialize(io)
def initialize(io) if self.class === io raise ArgumentError, "io must not be a #{self.class}" end # wrap strings in a StringIO if io.respond_to?(:to_str) io = BinData::IO.create_string_io(io.to_str) end @io = RawIO.new(io) # bits when reading @rnbits = 0 @rval = 0 @rendian = nil end