DIZipWriter's functionality is contained in its main class,
TDIZipWriter, with methods to create new ZIP archives and write various types of data like:
DIZipWriter allows applications to write to an archive entry as many times as they seem necessary. This allows to create the new archive entry even before the first chunk of data is available. As data flows in (for example from a slow download), they can write it in small chunks at a time.
DIZipWriter outputs all data to the archive straight away, with no need for temporary storage: It does not create any temporary files and does not use huge amount of memory for buffering. It is nevertheless possible to create an archive entirely in memory if desired.
DIZipWriter stores a global archive comment as well as individual comments for each individual entry. Long file names are supported, just as absolute and relative path names.
Direct streaming allows objects to stream their data directly to a ZIP archive using their own
// Save a TBitMap image to a ZIP archive. // Create and initialize a bitmap image. Img := TBitMap.Create; // Add a new entry to the ZIP archive. DIZipWriter.AddEntry('MyImage'); // Write the bitmap to the archive's entry stream. Img.SaveToStream(DIZipWriter.CurrentEntryStream); // Save a database BLOB to a ZIP archive. MyBlob.SaveToStream(DIZipWriter.CurrentEntryStream);
Direct streaming is very efficient because its avoids all temporary storage of bitmap and BLOB data. Other ZIP writing libraries usually require this extra step and forece applications to touch object data at least twice: 1st for streaming it out and 2nd for reading it back. Omitting this extra step helps DIZipWriter to perform faster and uses less resources than the competition.
Strong 256-bit AES encryption, a ZIP extension of WinZip 9, is available with DIZipWriter. WinZip 9 and later versions as well as 7-Zip starting from version 4.43 beta can open strong encryption archives created by DIZipWriter just like any ZIP file with standard or no encryption. The PKZip standard encryption is also supported, but considered weak and no longer recommended.