Example #1
0
def getExtentsIndex(ei_binary):
    ei_buf = memoryview(ei_binary)
    nd = getNodeDescriptor(ei_buf)
    offsetList = [14]
    PointerRecList = []
    for i in range(nd.numRecords):
        offset = unpack(">H", ei_buf[-2 * i - 4:-2 * i - 2])[0]
        offsetList.append(offset)
    for i in range(len(offsetList) - 1):
        temp = ei_buf[offsetList[i]:offsetList[i + 1]]
        epr = getExtentsPointerRec(temp)
        PointerRecList.append(epr)
    return ss.IndexNode(nd, PointerRecList)
Example #2
0
def getAttributesIndex(ai_binary):
    ai_buf = memoryview(ai_binary)
    nd = getNodeDescriptor(ai_buf)
    offsetList = [14]
    PointerRecList = []
    for i in range(nd.numRecords):
        offset = unpack(">H", ai_buf[-2 * i - 4:-2 * i - 2])[0]
        offsetList.append(offset)
    for i in range(len(offsetList) - 1):
        temp = ai_buf[offsetList[i]:offsetList[i + 1]]
        apr = getAttributesPointerRec(temp)
        PointerRecList.append(apr)
    return ss.IndexNode(nd, PointerRecList)
Example #3
0
def getCatalogIndex(ci_binary):
    ci_buf = memoryview(ci_binary)
    nd = getNodeDescriptor(ci_buf)
    offsetList = [14]
    PointerRecList = []
    for i in range(nd.numRecords):
        offset = unpack(">H", ci_buf[-2 * i - 4:-2 * i - 2])[0]
        offsetList.append(offset)
    for i in range(len(offsetList) - 1):
        temp = ci_buf[offsetList[i]:offsetList[i + 1]]
        cpr = getCatalogPointerRec(temp)
        PointerRecList.append(cpr)
    return ss.IndexNode(nd, PointerRecList)