class BinData::IO

def offset

the offset when reading bitfields is not defined.
Returns the current offset of the io stream. The exact value of
def offset
  if positioning_supported?
    @raw_io.pos - @initial_pos
  else
    0
  end
end