def __init__(self, dbfile, allow_offsets=True, cutoff=2**15): assert isinstance(dbfile, StructFile) self._dbfile = dbfile self._count = 0 self._lengths = GrowableArray(allow_longs=False) self._offsets = GrowableArray(allow_longs=False) self._offset_base = 0 self.allow_offsets = allow_offsets self.cutoff = cutoff
def __init__(self, child, fixedlen): self._child = child self._fixedlen = fixedlen self._lengths = GrowableArray() self._count = 0
def __init__(self, dbfile): HashWriter.__init__(self, dbfile) # Keep an array of the positions of all keys self.index = GrowableArray("H") # Keep track of the last key added self.lastkey = emptybytes
def start_field(self, fieldname): self.fieldstart = self.dbfile.tell() self.fieldname = fieldname # Keep an array of the positions of all keys self.poses = GrowableArray("H") self.lastkey = emptybytes
def __init__(self, dbfile): assert isinstance(dbfile, StructFile) self._dbfile = dbfile self._count = 0 self._lengths = GrowableArray(allow_longs=False)