class BinData::BitAligned::BitAlignedIO

Public Class Methods

new(io) click to toggle source
# File lib/bindata/alignment.rb, line 45
def initialize(io)
  @io = io
end

Public Instance Methods

readbytes(n) click to toggle source
# File lib/bindata/alignment.rb, line 48
def readbytes(n)
  n.times.inject("") do |bytes, _|
    bytes << @io.readbits(8, :big).chr
  end
end