Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

LiteZip and LiteUnzip

, 7 Aug 2008
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. Works for Win32 and Linux
LiteZip.zip
LiteUnzip.lib
LiteUnzip.dll
LiteZip
LiteZip.mak
LiteZip.mdp
makefile
UnzipFile
makefile
test.zip
UnzipFile.mak
UnzipFile.mdp
UnzipFile.ncb
UnzipMem
makefile
test.zip
UnzipMem.mak
UnzipMem.mdp
UnzipMem.ncb
UnzipMemRaw
makefile
test.zip
UnzipResource
simple_res.zip
UnzipResource.mak
UnzipResource.mdp
UnzipResource.ncb
ZipDir
makefile
MyDir
MySubDir
ZipDir.mak
ZipDir.mdp
ZipDir.ncb
ZipFile
makefile
test.jpg
ZipFile.mak
ZipFile.mdp
ZipFile.ncb
ZipMemory
makefile
ZipMemory.mak
ZipMemory.mdp
ZipMemory.ncb
ZipMemoryRaw
makefile
ZipMemoryRaw.mak
ZipMemoryRaw.mdp
GZipFile
GZipFile.mak
GZipFile.mdp
GZipFile.ncb
makefile
test.jpg
LiteUnzip
LiteUnzip.def
LITEUNZIP.mak
LITEUNZIP.mdp
LITEUNZIP.ncb
makefile
LiteZip.lib
LiteZip.dll
LiteZip.def
'The following are Visual Basic declare statements (untested) for LiteZip.dll:

Private Declare Function ZipCreateFile Lib "litezip" Alias "ZipCreateFileA" (ByRef hZip As Long, ByVal filename As String, ByVal password As String) As Long
Private Declare Function ZipAddFile Lib "litezip" Alias "ZipAddFileA" (ByVal hZip As Long, ByVal filename As String) As Long
Private Declare Function ZipClose Lib "litezip" (ByVal hZip As Long) As Long
Private Declare Function ZipCreateBuffer Lib "litezip" (hZip As Long, ByVal lpBuffer As Long, ByVar size As Long, password As String) As Long
Private Declare Function ZipCreateHandle Lib "litezip" (hZip As Long, ByVal fileHandle As Long, password As String) As Long
Private Declare Function ZipAddHandle Lib "litezip" Alias "ZipAddHandleA" (ByVal hZip As Long, zipname As String, ByVal fileHandle As Long) As Long
Private Declare Function ZipAddBuffer Lib "litezip" Alias "ZipAddBufferA" (ByVal hZip As Long, zipname As String, ByVal lpBuffer As Long, ByVar size As Long) As Long
Private Declare Function ZipAddPipe Lib "litezip" Alias "ZipAddPipeA" (ByVal hZip As Long, zipname As String, ByVal fileHandle As Long, ByVal size As Long) As Long
Private Declare Function ZipAddFolder Lib "litezip" Alias "ZipAddFolderA" (ByVal hZip As Long, zipname As String) As Long
Private Declare Function ZipGetMemory Lib "litezip" (ByVal hZip As Long, bufferPtr As Long, size As Long, freeHandle As Long) As Long
Private Declare Function ZipResetMemory Lib "litezip" (ByVal hZip As Long) As Long
Private Declare Function ZipOptions Lib "litezip" (ByVal hZip As Long, ByVal flags As Long) As Long
Private Declare Function ZipFormatMessage Lib "litezip" Alias "ZipFormatMessageA" (ByVal errornumber As Long, lpBuffer As String, ByVal buffersize As Long) As Long
Private Declare Function ZipAddDir Lib "litezip" Alias "ZipAddDirA" (ByVal hZip As Long, dirname As String, ByVal offset As Long) As Long


'The following are Visual Basic declare statements (untested) for LiteUnzip.dll:

Private Type FILETIME
  dwLowDateTime As Long
  dwHighDateTime As Long
End Type 

Private Type ZIPENTRY
  Index As Long
  Attributes As Long
  AccessTime As FILETIME
  CreateTime As FILETIME
  ModifyTime As FILETIME
  CompressedSize As Long
  UncompressedSize As Long
  Name As String * 260
End Type 

Private Declare Function UnzipOpenFile Lib "liteunzip" Alias "UnzipOpenFileA" (hZip As Long, filename As String, password As String) As Long
Private Declare Function UnzipOpenBuffer Lib "liteunzip" (hZip As Long, ByVal lpBuffer As Long, ByVal size As Long, password As String) As Long
Private Declare Function UnzipOpenHandle Lib "liteunzip" (hZip As Long, ByVal fileHandle As Long, password As String) As Long

Private Declare Function UnzipGetItem Lib "liteunzip" (ByVal hZip As Long, zipEntry As ZIPENTRY) As Long
Private Declare Function UnzipFindItem Lib "liteunzip" (ByVal hZip As Long, zipEntry As ZIPENTRY, ic As Long) As Long
Private Declare Function UnzipItemToFile Lib "liteunzip" (ByVal hZip As Long, filename As String, zipEntry As ZIPENTRY) As Long
Private Declare Function UnzipItemToHandle Lib "liteunzip" (ByVal hZip As Long, handle As Long, zipEntry As ZIPENTRY) As Long
Private Declare Function UnzipItemToBuffer Lib "liteunzip" (ByVal hZip As Long, buffer As Long, bufSize as Long, zipEntry As ZIPENTRY) As Long
Private Declare Function UnzipSetBaseDir Lib "liteunzip" Alias "UnzipSetBaseDirA" (ByVal hZip As Long, dirname As String) As Long
Private Declare Function UnzipFormatMessage Lib "liteunzip" Alias "UnzipFormatMessageA" (ByVal errornumber As Long, lpBuffer As String, ByVal buffersize As Long) As Long
Private Declare Function UnzipClose Lib "liteunzip" (ByVal hZip As Long) As Long

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)

Share

About the Author

Jeff Glatt

United States United States
No Biography provided

| Advertise | Privacy | Mobile
Web01 | 2.8.140921.1 | Last Updated 8 Aug 2008
Article Copyright 2006 by Jeff Glatt
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid