Im Gegesatz zu anderen Libs, enthält die statisch Lib nur ergänzende
Funktionen zur mit pb gelieferten zlib.lib, so das Inkompatibilitäten unwahrscheinlich sind.
Die lib unterstützt x86 und x64 Plattformen, ohne das Anpassungen am Code
notwendig werden.
Code: Alles auswählen
*result = ZIP_PackMemory(*source[, sourceLen[, level]])
*source = MemoryPointer
sourceLen = Size of Memory (optional)
level = compressionslevel (optional)
*result = MemoryPointer to packed memory or 0 if failed
result = ZIP_UnpackMemory(*source, *dest)
result = Size of *dest or 0 if failed
void = ZIP_SetPassword([password.s])
password = password for ZIP or UNZIP
result = ZIP_GetFilesCount(Zip_FileName.s)
Zip_FileName.s = filename with path
result = count of files/dirs
result.s = ZIP_GetFileComment(Zip_FileName.s)
Zip_FileName.s = filename with path
result is the global comment of the zipfile
result.s = ZIP_GetFileInfo(Zip_FileName.s, FileNumber[, *FileInfo.unz_file_info])
Zip_FileName.s = filename with path
FileNumber = filenumber in archiv
*FileInfo = stores all infos in the structure (optional)
result = filename
result = ZIP_GetFileNumber(Zip_FileName.s, FileName.s)
Zip_FileName.s = filename with path
FileName = filename with relative path in archiv (not casesensitive)
result = filenumber or 0 if failed
result = ZIP_IsZipArchive(Filename.s)
FileName.s = filename with path
result = #ZIP_SUPPORT_OK or #ZIP_SUPPORT_NOT_ARCHIVE or #ZIP_SUPPORT_ERROR_IN_ARCHIVE
result = ZIP_IsPasswordRequired(Zip_FileName.s, FileNumber)
Zip_FileName.s = filename with path
FileNumber = filenumber in archiv
result = #True, password encrypted, or #False, not password encrypted
result = ZIP_ExtractFile(Zip_FileName.s, FileNumber, Output_Path.s[, CreatePath[, Callback]])
Zip_FileName.s = filename with path
FileNumber = filefumber in archiv
Output_Path.s = path to extract file
CreatePath = #True or #False (#True creates subdirectories in archiv, optional = #True)
Callback = adress of callbackprocedure, Prototyped as: ZIP_PackerCallback(progress)*
*you can return #UNZIP_CANCEL from Callback to cancel
result = #True on success
result = ZIP_ExtractArchiv(Zip_FileName.s, Output_Path.s[, CreatePath[, Callback]])
Zip_FileName.s = filename with path
Output_Path.s = path to extract file
CreatePath = #True or #False (#True creates subdirectories in archiv, optional = #True)
Callback = adress of callbackprocedure, Prototyped as: ZIP_ArchivCallback(progress, files)*
*you can return #UNZIP_CANCEL from Callback to cancel
result = count of extracted files
*result = ZIP_CatchFile(Zip_FileName.s, FileNumber[, Callback])
Zip_FileName.s = filename with path
FileNumber = filenumber in archiv
Callback = adress of callbackprocedure, Prototyped as: ZIP_PackerCallback(progress)*
*you can return #UNZIP_CANCEL from Callback to cancel
*result = memorypointer or 0 if failed
result = ZIP_FileCreate(Zip_FileName.s)
Zip_FileName.s = filename with path
creates a empty zipfile
result = ziphandle or 0 if failed
result = ZIP_FileOpen(FileName.s[, Append_Method])
FileName.s = filename with path (*.*, file must exist!)
Append_Method = #APPEND_STATUS_CREATEAFTER or #APPEND_STATUS_ADDINZIP (optional)
You can add zipfiles to your exe (sfx) or another zipfile
result = ziphandle or 0 if failed
void = ZIP_FileClose(ZipHandle[, Comment.s])
ZipHandle = handle comes as result of ZIP_FileCreate() or ZIP_FileOpen()
Comment = string or textfilename (with path) *.txt! (optional)
no result
result = ZIP_FileAdd(ZipHandle, Filename.s, Archive_Filename.s[, Compression[, Callback]])
ZipHandle = result from ZIP_FileCreate() or ZIP_FileOpen()
Filename.s = filename with path to add to archive
Archive_Filename.s = filename with relative path in archive
Compression = #Z_NO_COMPRESSION or #Z_BEST_SPEED or #Z_BEST_COMPRESSION or #Z_DEFAULT_COMPRESSION (optional)
Callback = adress of callbackprocedure, Prototyped as: ZIP_PackerCallback(progress)*
*you can return #ZIP_CANCEL from Callback to cancel
result = #True on success
result = ZIP_MemAdd(ZipHandle, *source, sourceLen, Archive_Filename.s[, Compression[, Callback]])
ZipHandle = result from ZIP_FileCreate() or ZIP_FileOpen()
*source = memorypointer
sourceLen = memorysize in bytes
Archive_Filename.s = filename with relative path in archive
Compression = #Z_NO_COMPRESSION or #Z_BEST_SPEED or #Z_BEST_COMPRESSION or #Z_DEFAULT_COMPRESSION (optional)
Callback = adress of callbackprocedure, Prototyped as: ZIP_PackerCallback(progress)*
*you can return #ZIP_CANCEL from Callback to cancel
result = #True on success
von Zeit zu Zeit wirds auch kleinere Erweiterungen geben, Wünsche dürfen geäußert werden.
Download
Alternativer Downloadlink: http://www.rsbasic.de/backupprogramme/temp/minizip.zip
Gruß
Thomas