History of Changes in the ZipArchive Library
Applies To:
All
3.2.0 (2007-12-15)
New Features
-
Seeking possibility in the compressed deflate stream. This allows to start data decompression not necessarily from the beginning of a compressed file (see Creating Seekable Compressed Data for more information). This feature is available in the Full Version only.
-
CZipArchive::SeekInFile() method added.
-
CZipArchive::ExtractFile() methods have an additional parameter used during seek operations.
-
Callbacks possible while using split archives allowing to extract segmented archives with non-standard volume naming scheme. This functionality also allows to create segmented archives with custom volume naming scheme (thanks to Dmitry for suggestion). See Segmented Archives: Splitting and Spanning for more information.
-
The CZipArchive::SetSegmCallback() method has an additional parameter that allows setting callbacks separately for spanned and split archives. It is set by default to set the callback for spanned archives, so that it doesn't break the existing applications.
-
Workaround to use Zip64 in Visual Studio 6.0 MFC. It uses STL implementation of
CZipFile in MFC compilation. See Zip64 Format: Crossing the Limits of File Sizes and Number of Files and Segments for more information (under the Large Files/Microsoft Visual Studio 6.0 (MFC) paragraph) - thanks to Igor Green for suggestion and reporting some other issues.
-
Possibility to adjust individual compressors options.
See CZipArchive::SetCompressionOptions() and
Compressing Data for more information.
-
CZipPathComponent::Combine() added.
-
CZipMemFile::ReInit() added.
Changes
-
Some terminology regarding segmented archives was changed, to keep the consistency with the functionality (partly due to introduction of callbacks for split archives). This includes the following changes:
-
It is no longer needed to adjust the returned attributes value from the following methods under Linux (by shifting right by 16 bits):
Also, the shifting operation is not needed when using the
CZipFileHeader::SetSystemAttr() method.
-
ZIP_EXTRA_ZARCH renamed to ZIP_EXTRA_ZARCH_NAME.
-
The general buffer, the size of which is controlled by the second argument of the CZipArchive::SetAdvanced() method, is no longer used for compression and decompression processing. The size of the buffer that is used in these operations can be controlled by setting the CZipCompressor::COptions::m_iBufferSize option. See Compressing Data for more information about setting options.
-
In the Windows/non-Unicode version, the ZipArchive Library called the
CharToOemBuffA and OemToCharBuffA functions. These functions are considered unsafe and banned by Microsoft (thanks to Noyer Gilles for pointing this out) and were replaced by sequences of calls to the WideCharToMultiByte and MultiByteToWideChar functions. However, it takes now four calls to perform the conversion instead of just one. If you prefer the old behavior, you can comment out the ZIP_USES_SAFE_WINDOWS_API definition in the ZipPlatform_win.cpp file and the former functions will be used for conversion.
-
ZipPlatform::SingleToWide() renamed to ZipPlatform::MultiByteToWide().
-
ZipPlatform::WideToSingle() renamed to ZipPlatform::WideToMultiByte().
-
CZipPathComponent::GetFullPath() adds
.\ before the filename, if the path and drive are empty.
- Removed support for project files for old Borland compilers. Compilation compatibility is preserved against CodeGear C++Builder.
Bugs Fixed
- Fixed Bzip2 compression problem (thanks to Neville Franks for reporting it).
- Large files without compression were not stored correctly inside an archive.
-
Possible memory leak eliminated in CZipFileHeader::operator=().
- Fixes for proper compilation with Qt to avoid multiple symbols defined (thanks to Magne Sjaastad).
-
When an exception was thrown while opening
CZipFile in the STL version, the CZipException::m_szFileName was not initialized with the filename (thanks to Alberto Pierotti).
- Compilation problems under Cygwin (thanks to Mark Space for reporting it).
-
The
bRewind parameter in the
CZipArchive::ExtractFile(ZIP_INDEX_TYPE, CZipMemFile&) method was not working (thanks to Andrew for reporting it).
-
Fixed a mutex copying problem when using the CZipArchive object in multiple threads.
- Fixed problems with compilation of the library under CodeGear C++ Builder (thanks to Bobyin for reporing it).
3.1.1 (2007-09-01)
Changes
Bugs Fixed
-
Memory leaks in Zlib library when aborting creation of spanned archives by returning
false from a callback method (thanks to Michael Oerder for reporting it).
-
Incorrect values might have been returned by the CZipStorage::VolumeLeft() method.
-
An assertion warning when aborting creation of spanned archives in STL version.
3.1.0 (2007-08-10)
New Features
Changes
Bugs Fixed
- Problems when opening large files under Mac OS X (thanks to Dragan Milic for help).
- Some further problems when the original Zlib library was linked with the program that used the ZipArchive Library.
- Compilation problems under Windows NT when using AES encryption (thanks to Heiko Eckendorf).
- Problems with CZipString in STL version under some MinGW installations (thanks to Laurent Ribon for the fix).
3.0.2 (2007-05-14)
New Features
Changes
-
CZipActionCallback::m_iStep removed. Use CZipActionCallback::GetStepSize() functionality for more flexible callback call frequency adjustement.
- The ZipArchive Library now uses the version AE-1 of the WinZip AES encryption instead of AE-2. It is consitent with the behavior of WinZip 11.0 which uses the AE-1 format back again in most cases for an extra integrity check. AE-2 format is used only for files which size is less than 20 bytes to avoid discovery of their contents using CRC value.
- Data descriptor is not used in WinZip AES encryption in non-segmented archives - it was not necessary and could cause problems when extracting with older versions of WinZip.
-
String store settings are not reset now when opening an archive (see Unicode Support: Using Non-English Characters in Filenames and Comments). This allows setting custom code pages and thus proper decoding of filenames and comments in archives that use non-standard code pages and don't use the ZipArchive Library extra fields for code pages.
-
The ZipArchive now checks, if the deflate compression stream ends properly (the Zlib library returns
Z_STREAM_END from inflate() when there is no more bytes to decompress). The ZipArchive Library throws an exception with the CZipException::badZipFile code, if the compression stream is incorrect. This is an extra security check against malformed data.
-
Find Fast sorting speeded up (thanks to Muayyad for reporting it). For more
information about Find Fast, see Searching in an Archive.
-
The Zlib library compression level constants replaced by the
CZipCompressor::CompressionLevel values. The replaced constants are:
Z_DEFAULT_COMPRESSION, Z_NO_COMPRESSION, Z_BEST_SPEED, Z_BEST_COMPRESSION.
-
The CZipArchive::checkDataDescriptor check is now not performed by default. This is consistent with the behavior of popular archivers.
-
CZipArchive::CallbackType enumeration values moved to
CZipActionCallback::CallbackType.
-
CZipActionCallback::m_uTotalSoFar renamed to
CZipActionCallback::m_uProcessed
-
CZipActionCallback::m_uTotalToDo renamed to
CZipActionCallback::m_uTotalToProcess
-
CZipActionCallback::LeftToDo() renamed to
CZipActionCallback::LeftToProcess()
-
Methods that remove files (CZipArchive::RemoveFile(),
CZipArchive::RemoveFiles(CZipIndexesArray&) and CZipArchive::RemoveFiles(const CZipStringArray&)) return now a bool value indicating the result of the operation, which is useful in situations where an exception was not thrown and yet files could not be deleted.
-
Some helper classes with common names were put under the
ZipArchiveLib namespace to avoid possible conflicts with other software.
-
CZipFileHeader::IsDataDescr() renamed to
CZipFileHeader::IsDataDescriptor().
-
ZipPlatform::IsDirectory() examines attributes as they are reported by the system, not as they were stored in an archive. Under Linux it means the the attributes are not shifted right by 16 before checking. The shifting is performed in CZipFileHeader.
Bugs Fixed
3.0.1 (2007-03-11)
New Features
Changes
Bugs Fixed
-
CZipArchive::FindFile() behaved incorrectly under some circumstances (thanks to Magne Sjaastad for the fix).
-
CZipArchive::GetFromArchive() methods were not working properly when the source archive was segmented.
- Default filenames were not correctly constructed when an empty filename was provided while creating a new file.
- Local Zip64 extra field was not updated when compressed size did not exceed normal zip limits. The resulting archive was generally correct, but ZipArchive reported it as bad due to additional checks (thanks to Manfrde Feege for reporting it).
- ZipArc was not correctly calculating sizes of large files due to problems in MFC.
3.0.0 (2007-02-20)
New Features
-
CZipArchive::GetFromArchive() methods can now get data from multi-segment archives. This way you can modify existing segmented archive by repacking it using these methods (thanks to Dragan Milic for the suggestion).
- A trial version that allows testing Zip64 and AES support is available from the link at the download page.
Changes
-
ZIP_U16_U64 renamed to ZIP_INDEX_TYPE.
-
ZIP_U16_U32 renamed to ZIP_PART_TYPE.
-
ZIP_U32_U64 renamed to ZIP_SIZE_TYPE.
-
ZIP_32_64 renamed to ZIP_ZLIB_TYPE.
-
Index and volume number types (ZIP_INDEX_TYPE and ZIP_PART_TYPE) can be defined as
int instead of WORD when Zip64 mode is not enabled. It is only for convenience of those, who don't use Zip64 so that they can have more flexible types in loops. You can enable this behavior by undefining _ZIP_STRICT_U16 definition in _features.h file.
-
CZipException::generic renamed to CZipException::genericError and CZipException::internal renamed to CZipException::internalError to allow compilation with managed C++ applications.
Bugs Fixed
- Extracting files with paths under Mac OS X (thanks to Cory Mintz for reporting it).
-
Possible misinterpretation of
OpenFileType enum while archive processing (thanks to Carsten Fuchs for reporting it).
- Incorrect decompression of files that contains data descriptors and have dummy deflate compressed blocks at the end of the compression stream (thanks to Michael Evangelista for reporting it).
-
CZipArray::GetUpperBound() in STL version was returning invalid value when the size of the array was 0 due to the fact that the method returns now an unsigned value. This affected searching empty archives (thanks to Peter Kullmann for reporting it).
- Minor documentation fixes
3.0.0 beta (2006-11-27)
New Features
Changes
-
Indexes of files in an archive are unsigned, use ZIP_FILE_INDEX_UNSPECIFIED instead of
-1 and ZIP_FILE_INDEX_NOT_FOUND as a test for the return value from find methods.
- The numbers of segments in multi-segment archive are now of an unsigned type.
-
The terminology for creation and extraction of multi-part archives is changed (splitting & spanning). A "pkzipSpan" archive is now called a "spanned archive" (segments of an archive are stored on removable devices). A "tdSpan" archive is now called a "split archive" (segments of an archive are stored in the same folder).
-
Minor tweaks for maintaining compatibility with PKZIP & WinZip - see Segmented Archives: Splitting and Spanning for more information. A split archive (formerly tdSpan) uses now a different segment's extension naming format (
z%.2d instead of z%.5d) - it becomes z%d for segments number greater than 99.
-
CZipStorage::pkzipSpan renamed to CZipStorage::spannedArchive.
-
CZipStorage::tdSpan renamed to CZipStorage::splitArchive.
-
CZipStorage::suggestedTD renamed to CZipStorage::suggestedSplit.
-
CZipCallback and its subclasses use unsigned types instead of signed.
-
In the CZipCallback::Callback() method, the parameter
uProgress does not provide additional information about the reason for callback - check CZipSegmCallback::m_iCode instead.
- The Zlib library modified slightly for the needs of the ZipArchive Library, you should use the version distributed with the ZipArchive Library instead of the standard Zlib library.
-
Makefiles for the Zlib library removed - the Makefile for the ZipArchive library compiles now the Zlib library as well.
-
CZipArchive::WideConversionUseAnsi() and
CZipArchive::EnableOemConversion()replaced by the
CZipArchive::SetStringStoreSettings() method.
-
CZipArchive::SingleToWide() and CZipArchive::WideToSingle() removed, if you need their functionality, check the methods in the ZipCompatibility namespace.
-
CZipArchive::GetCRCTable() moved to the CZipCrc32Cryptograph class.
-
CZipArchive::GetSpanMode() renamed to CZipArchive::GetSegmMode().
-
CZipArchive::SetTreatAsSingleDisk() removed, the detection is automatic.
-
Filenames are converted when accessed for the first time and the
CZipArchive::SetConvertAfterOpen() was no longer needed and was removed.
-
CZipArchive::FindMatches() it not
const anymore (a filename update is possible during executing this method).
-
CZipArchive::SetExtraField() removed, you can now use
CZipFileHeader::m_aLocalExtraData and
CZipFileHeader::m_aCentralExtraData.
-
CZipArchive::GetLocalExtraField() removed (see Providing Custom Data: Extra Fields for the information about reading extra fields).
-
CZipArchive::PredictMaximumFileSizeInArchive() uses now
CZipFileHeader::m_uLocalComprSize instead of
CZipFileHeader::m_uUncomprSize for calculations.
-
CZipArchive::CloseFileWithNoUpdate() removed, call the
CZipArchive::CloseFile() method instead and set the bAfterException parameter to true.
-
CZipArchive::GetIndexes() adds an index to the resulting array, even if it is ZIP_FILE_INDEX_NOT_FOUND; this way you know which files were not found.
-
In the CZipArchive::PredictFileNameInZip() method, the parameter
bExactly was removed.
-
CZipArchive::cbGetFromArchive renamed to CZipArchive::cbGet.
-
CZipWordArray renamed to CZipIndexesArray.
-
CZipAddNewFileInfo::m_iReplaceIndex renamed to
CZipAddNewFileInfo::m_uReplaceIndex and it cannot have the -2 value anymore.
-
Encryption methods moved from the CZipArchive class to the CZipCrc32Cryptograph class.
-
The meaning for the
uProgress parameter changed when using CZipSegmCallback - see Segmented Archives: Splitting and Spanning for more information.
-
CZipException::tooLongFileName renamed to CZipException::tooLongData.
-
CZipFileHeader::SetFileName() returns
void instead of bool.
-
CZipFileHeader::GetEffComprSize() replaced by the
CZipFileHeader::GetDataSize() method.
-
CZipFileHeader::GetLocalSize() made public.
-
CZipFileHeader::GetFileNameSize() renamed to
CZipFileHeader::PredictFileNameSize().
-
CZipFileHeader::GetSystemAttr() is not
const anymore (a filename update is possible).
-
CZipFileHeader::IsDirectory() is not
const anymore (a filename update is possible).
-
CZipCentralDir::CInfo::m_uCentrDirPos renamed to
CZipCentralDir::CInfo::m_uEndOffset.
-
CZipCentralDir::CInfo::m_uThisDisk renamed to
CZipCentralDir::CInfo::m_uLastVolume.
-
In
ZipPlatform::WideToSingle(), the argument bUseAnsi replaced with uCodePage.
-
In
ZipPlatform::SingleToWide(), the argument bUseAnsi replaced with uCodePage.
-
ZipCompatibility::IsBigEndian() removed.
-
Endianess determined by preprocessor definitions (check out the _platform.h file if the value is correct).
-
Endian-aware methods that read and write bytes, moved from the ZipCompatibility namespace and encapsulated in the ZipArchiveLib::CBytesWriter class.
-
ZipCompatibility::FileNameUpdate() replaced by the
ZipCompatibility::ConvertBufferToString() and
ZipCompatibility::ConvertStringToBuffer() methods.
-
You can remove ZIP_ARCHIVE_MFC_PROJ and ZIP_ARCHIVE_STL_PROJ preprocessor definitions from your projects.
-
You should define ZIP_ARCHIVE_MFC in your applications that use the MFC version of the ZipArchive Library.
-
You should define ZIP_ARCHIVE_LNX in your applications that use the Linux version of the ZipArchive Library.
- The library uses now Visual Studio 2005 project files by default. Project files for other compilers are available and maintained.
Previous History
To see the history of previous versions, please visit
Archived History of Changes in the ZipArchive Library