def getAttributesExtents(ae_binary): recordType, res = unpack_from(">II", ad_binary) rec_binary = ad_binary[8:] ext = [] for i in range(8): temp = rec_binary[16 + 8 * i:16 + 8 * (i + 1)] e = getExtentDescriptor(temp) ext.append(e) return ss.AttrExtents(recordType, res, ss.ExtentsDataRec(*ext))
def getForkData(fd_binary): fd_0 = fd_binary[:16] ext = [] for i in range(8): temp = fd_binary[16 + 8 * i:16 + 8 * (i + 1)] e = getExtentDescriptor(temp) ext.append(e) vec = list(unpack_from('>QII', fd_binary)) vec.append(ss.ExtentsDataRec(*ext)) return ss.ForkData(*vec)
def getExtentsLeafRec(elf_binary): extKey = getExtentsKey(elf_binary[:12]) rec_binary = elf_binary[12:] ext = [] for i in range(8): temp = rec_binary[16 + 8 * i:16 + 8 * (i + 1)] e = getExtentDescriptor(temp) ext.append(e) return ss.BTRecord(extKey, ss.ExtentsDataRec(*ext))