MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / Write_Zip64EndOfCentralDirectoryLocator

Function Write_Zip64EndOfCentralDirectoryLocator

common/minizip/zip.c:1755–1775  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1753}
1754
1755int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip)
1756{
1757 int err = ZIP_OK;
1758 ZPOS64_T pos = zip64eocd_pos_inzip - zi->add_position_when_writing_offset;
1759
1760 err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDLOCHEADERMAGIC,4);
1761
1762 /*num disks*/
1763 if (err==ZIP_OK) /* number of the disk with the start of the central directory */
1764 err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4);
1765
1766 /*relative offset*/
1767 if (err==ZIP_OK) /* Relative offset to the Zip64EndOfCentralDirectory */
1768 err = zip64local_putValue(&zi->z_filefunc,zi->filestream, pos,8);
1769
1770 /*total disks*/ /* Do not support spawning of disk so always say 1 here*/
1771 if (err==ZIP_OK) /* number of the disk with the start of the central directory */
1772 err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)1,4);
1773
1774 return err;
1775}
1776
1777int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)
1778{

Callers 1

zipCloseFunction · 0.85

Calls 1

zip64local_putValueFunction · 0.85

Tested by

no test coverage detected