От: | SchweinDeBurg | http://zarezky.spb.ru/ | |
Дата: | 10.03.06 09:56 | ||
Оценка: |
Easy to use, small-footprint DLLs to let your app create zip archives, and extract the contents of them. Useful for C, C++, VB, and other languages.
The primary benefits of these 2 DLLs are as follows:
You can unzip (extract the contents) from a zip archive that's in a diskfile, memory-buffer, or pipe. And, you can unzip those contents into a diskfile, memory-buffer, pipe, or even a combination of the preceding.
The same applies to creating a zip archive. You can create the zip archive on disk, in memory, or to a pipe. And, the contents of this zip archive can come from diskfiles, memory-buffers, pipes, or even a combination of any/all of the preceding.
Given this flexibility, you're not required to write out your files to a temporary directory before using them. One noteworthy feature is that you can unzip directly from an embedded resource into a memory buffer or into a diskfile, which is great for installers. Another useful feature is the ability to create your zip in dynamically growable memory backed by the system pagefile. (ie, You don't need to guess the allocation size of a memory buffer before zipping some stuff into that memory buffer. You can let the DLL grow the memory buffer on-the-fly, as needed, on your behalf).
The Zip and Unzip functions are each in their own DLL. So for example, if you need only to extract files from a ZIP archive, but not create ZIP archives, then you can use only LiteUnzip.dll and do not need to waste resources for code that you don't need (in LiteZip.dll).
The DLLs can be used by any program written in any language (that can load and call a standard DLL). This includes C or C++ compiled code, Visual Basic, etc. Although the source code for the DLLs is written in plain C, the compiled DLLs are included for those people who just want to use the DLLs with any language. A text file (Vb.txt) is supplied with function definitions to use the DLLs from Visual Basic.
And an update to the DLL means that all programs using it automatically obtain the update without needing to be recompiled.
The DLLs themselves have a small footprint. For example, LiteZip.dll is only around 40K. One copy of a DLL's code can be shared among many running programs. Read-only data in the DLL is also shared (ie, some of the large "lookup tables"). On systems with limited memory, this can be a valuable feature.
The DLLs support password-based zip encryption.
The one set of DLLs support both unicode and ANSI strings. You don't need separate DLLs for unicode versus ANSI, nor do you need to recompile the DLLs.
The DLLs should work under all versions of Windows, including CE.
All human readable strings are in each DLL's resources, facilitating the easy creation of non-english language versions of these DLLs.
The DLLs also support reading and writing GZIP format (single file only -- not a tar ball).