Пример #1
0
def getCatalogThread(cth_binary):
    cth_0 = cth_binary[:10]
    cth_1 = cth_binary[10:]
    recordType, reserved, parID, nameLen = unpack(">hhIH", cth_0)
    nodeUnicode = "".join(map(unichr, unpack_from(">" + nameLen * "H", cth_1)))

    return ss.CatalogThread(recordType, reserved, parID,
                            ss.UniChar(nameLen, nodeUnicode))
Пример #2
0
def getCatalogKey(ck_binary):
    rType, parID, nameLen = unpack_from(">HIH", ck_binary)
    nameStr = ck_binary[8:]
    nodeUnicode = "".join(
        map(unichr, unpack_from(">" + nameLen * "H", nameStr)))
    return ss.CatalogKey(rType, parID, ss.UniChar(nameLen, nodeUnicode))