Movatterモバイル変換


[0]ホーム

URL:


Artpol Software
Login
Skip Navigation Links
Home
ZipArchive
Download
Purchase
Contact
Skip Navigation LinksHome >ZipArchive >How to Use >Article
Zip64 Format: Crossing the Limits of File Sizes and Number of Files and Segments
Applies To: Available in the Full Version only.

Introduction

The Zip64 format is an extension to the standard zip format that practically removes limits in sizes and the number of filesinside of a zip archive.

The ZipArchive Library automatically uses the Zip64 extensions when the regular zip archivelimits are exceeded. The ZipArchive Library will not otherwise include the extensions in the archive, even if theextensions are enabled (see the paragraph below). The extensions will be removed from the archive when due to modificationsthey are not needed anymore. The library also automatically detects an archive in the Zip64 format.

To detect if an archive is in Zip64 format, request the central directory information with theCZipArchive::GetCentralDirInfo()method and call the
CZipCentralDir::CInfo::IsZip64() method.

Enabling Zip64 Extensions in the ZipArchive Library

To use the Zip64 extensions, you need to make sure that_ZIP_ZIP64 is defined in the_features.h file. It is enabled by default. Rebuild the ZipArchive Library and your application, if you modifythis definition. You should keep the extensions disabled, if you don't use them, otherwise the library will use64-bit types and perform some additional processing, which may slow down your application.

Limits Compared: the Standard Format Versus Zip64 Format

The maximum values allowed in each format are summarized below:

Standard FormatZip64 Format
Number of Files Inside an Archive65,5352^64 - 1
Size of a File Inside an Archive [bytes]4,294,967,2952^64 - 1
Size of an Archive [bytes]4,294,967,2952^64 - 1
Number of Segments in a Segmented Archive999 (spanning)
65,535 (splitting)
4,294,967,295 - 1
Central Directory Size [bytes]4,294,967,2952^64 - 1

Large Collections

The maximum number of items a collection can hold, limits the maximum number of files in an archive that the ZipArchiveLibrary can process. This limit can be determined by examining theZIP_ARRAY_SIZE_TYPE definition.This is defined as:
  • size_t in the STL version
  • INT_PTR in the MFC version
The MFC version also depends onsize_t type when sorting.

These types are usually defined as unsigned32-bit integer types. You may need to use a64-bit compiler for a larger collections support.

Additional Considerations

Article ID: 0610051629
Copyright © 2000 - 2025 Artpol Software - Tadeusz Dracz
Back To Top Up

[8]ページ先頭

©2009-2025 Movatter.jp