class BinData::Base

def offset

Returns the offset of this object wrt to its most distant ancestor.
def offset
  if @parent
    @parent.offset + @parent.offset_of(self)
  else
    0
  end
end