(fpin, offset, endrec)
return endrec
Read the ZIP64 end-of-archive records and use that to update endrec
Read the ZIP64 end-of-archive records and use that to update endrec
Read the ZIP64 end - of - archive records and use that to update endrec
def _EndRecData64(fpin, offset, endrec):
    """
    Read the ZIP64 end-of-archive records and use that to update endrec
    """
    fpin.seek(offset - sizeEndCentDir64Locator, 2)
    data = fpin.read(sizeEndCentDir64Locator)
    sig, diskno, reloff, disks = struct.unpack(structEndArchive64Locator, data)
    if sig != stringEndArchive64Locator:
        return endrec

    if diskno != 0 or disks != 1:
        raise BadZipfile("zipfiles that span multiple disks are not supported")

    # Assume no 'zip64 extensible data'
    fpin.seek(offset - sizeEndCentDir64Locator - sizeEndCentDir64, 2)
    data = fpin.read(sizeEndCentDir64)
    sig, sz, create_version, read_version, disk_num, disk_dir, \
            dircount, dircount2, dirsize, diroffset = \
            struct.unpack(structEndArchive64, data)
    if sig != stringEndArchive64:
        return endrec

    # Update the original endrec using data from the ZIP64 record
    endrec[_ECD_SIGNATURE] = sig
    endrec[_ECD_DISK_NUMBER] = disk_num
    endrec[_ECD_DISK_START] = disk_dir
    endrec[_ECD_ENTRIES_THIS_DISK] = dircount
    endrec[_ECD_ENTRIES_TOTAL] = dircount2
    endrec[_ECD_SIZE] = dirsize
    endrec[_ECD_OFFSET] = diroffset
    return endrec
def _EndRecData64 ( fpin , offset , endrec ) : fpin . seek ( offset - sizeEndCentDir64Locator , 2 ) data = fpin . read ( sizeEndCentDir64Locator ) sig , diskno , reloff , disks = struct . unpack ( structEndArchive64Locator , data ) if sig != stringEndArchive64Locator : return endrec if diskno != 0 or disks != 1 : raise BadZipfile ( "zipfiles that span multiple disks are not supported" ) # Assume no 'zip64 extensible data' fpin . seek ( offset - sizeEndCentDir64Locator - sizeEndCentDir64 , 2 ) data = fpin . read ( sizeEndCentDir64 ) sig , sz , create_version , read_version , disk_num , disk_dir , dircount , dircount2 , dirsize , diroffset = struct . unpack ( structEndArchive64 , data ) if sig != stringEndArchive64 : return endrec # Update the original endrec using data from the ZIP64 record endrec [ _ECD_SIGNATURE ] = sig endrec [ _ECD_DISK_NUMBER ] = disk_num endrec [ _ECD_DISK_START ] = disk_dir endrec [ _ECD_ENTRIES_THIS_DISK ] = dircount endrec [ _ECD_ENTRIES_TOTAL ] = dircount2 endrec [ _ECD_SIZE ] = dirsize endrec [ _ECD_OFFSET ] = diroffset return endrec