def read_infoarray(f): """Read the infoarray from file f and return it. """ infoarray_size = binIO.read_long(f,'big') infoarray = [binIO.read_long(f,'big') for index in xrange(infoarray_size)] infoarray = tuple(infoarray) return infoarray
def read_infoarray(f): """Read the infoarray from file f and return it. """ infoarray_size = binIO.read_long(f, "big") infoarray = [binIO.read_long(f, "big") for index in xrange(infoarray_size)] infoarray = tuple(infoarray) return infoarray
def parse_tag_group(f, endian='big'): """Parse the root TagGroup of the given DM3 file f. Returns the tuple (is_sorted, is_open, n_tags). endian can be either 'big' or 'little'. """ is_sorted = binIO.read_byte(f, endian) is_open = binIO.read_byte(f, endian) n_tags = binIO.read_long(f, endian) return bool(is_sorted), bool(is_open), n_tags
def parse_tag_group(f, endian="big"): """Parse the root TagGroup of the given DM3 file f. Returns the tuple (is_sorted, is_open, n_tags). endian can be either 'big' or 'little'. """ is_sorted = binIO.read_byte(f, endian) is_open = binIO.read_byte(f, endian) n_tags = binIO.read_long(f, endian) return bool(is_sorted), bool(is_open), n_tags