chiefzip

所属分类:压缩解压
开发工具:Delphi
文件大小:101KB
下载次数:3
上传日期:2010-04-27 03:43:48
上 传 者zhouqinglun
说明:  This package is the Pascal version of Info-Zip s UNZIP. The sources were translated from C to Pascal by Christian Ghisler.

文件列表:
DLL (0, 1998-05-07)
DELPHI2 (0, 1998-05-07)
DELPHI3 (0, 1998-05-07)
CHFUNZIP.PAS (4042, 1998-05-09)
UNZIP.PAS (99070, 1998-05-09)
ZIPINTER.PAS (6255, 1998-05-09)
TEST4.PAS (2822, 1998-05-09)
UNZIPDLL.PAS (1675, 1998-05-09)
TEST1.PAS (3134, 1998-05-09)
TEST2.PAS (3321, 1998-05-09)
TEST3.PAS (2920, 1998-05-09)
ZIPTYPES.PAS (5426, 1998-05-09)
UNZIP.INC (1000, 1998-05-09)
DLL\UNZIP32.DLL (64000, 1998-05-07)
DLL\UNZIP16.DLL (29457, 1998-05-07)
DELPHI2\WINCRT.DCU (14332, 1998-05-07)
DELPHI3\WINCRT.DCU (14538, 1998-05-07)

Readme file for Chief's UNZIP v1.00 ----------------------------------- History v1.00: May 7th 19***: first release v1.00a: May 9th 19***: minor amendments ------------------- This package is the Pascal version of Info-Zip's UNZIP. The sources were translated from C to Pascal by Christian Ghisler. The Pascal sources were subsequently amended to be repackaged as Chief's UNZIP by Dr Abimbola Olowofoyeku (The African Chief). Homepage: http://ourworld.compuserve.com/homepages/African_Chief This package allows you to UNZIP deflated, imploded, shrunk and stored ZIP archives. If you unzip the package with PKUNZIP(tm) use the "-D" switch to recreate the subdirectory structure. The source code is compatible with; * Turbo Pascal v7.x (DOS) * Borland Pascal v7.x (Dos, DPMI, and Windows) * Delphi v1.x * Delphi v2.x * Delphi v3.x * Virtual Pascal v2.0 (Win32) Files in the package: --------------------- 1. The main UNZIP sources: 1. UNZIP.INC - conditional definitions for the various compilers 2. ZIPTYPES.PAS - data structures used in the UNZIP sources 3. UNZIP.PAS - the main UNIT for the UNZIP functions 4. UNZIPDLL.PAS - the UNZIP functions exported to a DLL 5. ZIPINTER.PAS - interface IMPORT UNIT for the DLL 6. ChfUnzip.pas - simple Delphi component/Pascal Object for UNZIP 2. Sample programs: 1. test1.pas - test program using high level unzip functions 2. test2.pas - high level functions + simple Pascal object 3. test3.pas - high level functions + Delphi component 4. test4.pas - test program using low level unzip functions 3. Documentation: 1. README.TXT - this file 4. Miscellaneous: 1. \dll\unzip16.dll - unzipdll.pas compiled to 16-bit (rename to unzipdll.dll) 2. \dll\unzip32.dll - unzipdll.pas compiled to 32-bit (rename to unzipdll.dll) 3. \delphi3\wincrt.dcu - compiled Win32 version of WinCRT unit (Delphi 3.x) 4. \delphi2\wincrt.dcu - compiled Win32 version of WinCRT unit (Delphi 2.x) LICENCE ------- This package is released as **FREEWARE**. You got it FREE - so please do NOT charge others for it. If you use it in commercial or shareware programs, please give credit to INFO-ZIP, Christian Ghisler, and Dr Abimbola Olowofoyeku. The package can be redistributed freely, by ftp archives, web sites, bulletin boards, computer magazine cover disks and CD-ROMS, shareware and public domain CD-ROMs and archives, etc., ON THE CONDITION THAT ALL THE FILES IN THIS PACKAGE ARE INCLUDED IN THE DISTRIBUTION, INCLUDING THIS DOCUMENTATION, AND ON THE CONDITION THAT ANY AMENDMENT TO ANY OF THE FILES IS CLEARLY MARKED AS SUCH, WITH THE NAME AND DETAILS OF THE PERSON MAKING THE AMENDMENT CLEARLY SPECIFIED. DISCLAIMER ---------- THIS IS FREE SOFTWARE - so you get what you pay for. Thus, this package is supplied WITHOUT ANY WARRANTIES WHATSOEVER. You use the package or any of the files therein ENTIRELY AT YOUR OWN RISK. If these terms are not acceptable to you, then PLEASE DELETE THIS PACKAGE AND ALL THAT IS THEREIN FROM YOUR DISKS AT ONCE, AND PLEASE DO NOT EVER TRY TO USE ANYTHING THEREIN. ********************** * EXPORTED FUNCTIONS * ********************** {****** HIGH LEVEL FUNCTIONS: BY THE AFRICAN CHIEF ********************} Function FileUnzip(SourceZipFile, TargetDirectory, FileSpecs:pChar; Report:UnzipReportProc;Question:UnzipQuestionProc):integer; { high level unzip usage: SourceZipFile: source zip file; TargetDirectory: target directory FileSpecs: "*.*", etc. Report: Report callback or Nil; Question: Question callback (for confirmation of whether to replace existing files) or Nil; e.g., Count := FileUnzip('test.zip', 'c:\temp', '*.*', MyReportProc, Nil); } Function FileUnzipEx(SourceZipFile, TargetDirectory, FileSpecs:pChar):integer; { high level unzip with no callback parameters; passes ZipReport & ZipQuestion internally, so you can use SetZipReportProc and SetZipQuestionProc before calling this; e.g., Count := FileUnzipEx('test.zip', 'c:\temp', '*.*'); } Function ViewZip(SourceZipFile, FileSpecs:pChar; Report:UnzipReportProc):integer; { view contents of zip file usage: SourceZipFile: source zip file; FileSpecs: "*.*", etc. Report: callback procedure to process the reported contents of ZIP file; e.g., ViewZip('test.zip', '*.*', MyReportProc); } Function SetUnZipReportProc(aProc:UnzipReportProc):Pointer; { sets the internal unzip report procedure to aproc Returns: pointer to the original report procedure (return value should normally be ignored) e.g., SetUnZipReportProc(MyReportProc); } Function SetUnZipQuestionProc(aProc:UnzipQuestionProc):Pointer; { sets the internal unzip question procedure to aproc Returns: pointer to the original "question" procedure (return value should normally be ignored) e.g., SetUnZipQuestionProc(QueryFileExistProc); } Function UnzipSize(SourceZipFile:pChar;Var Compressed:Longint):longint; { uncompressed and compressed zip size usage: SourceZipFile = the zip file Compressed = the compressed size of the files in the archive Returns: the uncompressed size of the ZIP archive e.g., Var Size,CSize:longint; begin Size := UnzipSize('test.zip', CSize); end; } Procedure ChfUnzip_Init; { initialise or reinitialise the global variables *** use with care!! *** } {**********************************************************************} {************ LOW LEVEL FUNCTIONS: BY CHRISTIAN GHISLER ***************} {**********************************************************************} function GetSupportedMethods:longint; {Checks which pack methods are supported by the dll} {bit 8=1 -> Format 8 supported, etc.} function UnzipFile(in_name:pchar;out_name:pchar;offset:longint;hFileAction:word;cm_index:integer):integer; {usage: in_name: name of zip file with full path out_name: desired name for out file offset: header position of desired file in zipfile hFileAction: handle to dialog box showing advance of decompression (optional) cm_index: notification code sent in a wm_command message to the dialog to update percent-bar Return value: one of the above unzip_xxx codes Example for handling the cm_index message in a progress dialog: unzipfile(......,cm_showpercent); ... procedure TFileActionDialog.wmcommand(var msg:tmessage); var ppercent:^word; begin TDialog.WMCommand(msg); if msg.wparam=cm_showpercent then begin ppercent:=pointer(lparam); if ppercent<>nil then begin if (ppercent^>=0) and (ppercent^<=100) then SetProgressBar(ppercent^); if UserPressedAbort then ppercent^:=$ffff else ppercent^:=0; end; end; end; end; } function GetFirstInZip(zipfilename:pchar;var zprec:tZipRec):integer; { Get first entry from ZIP file e.g., rc:=GetFirstInZip('test.zip', myZipRec); } function GetNextInZip(var Zprec:tZiprec):integer; { Get next entry from ZIP file e.g., rc:=GetNextInZip(myZipRec); } function IsZip(filename:pchar):boolean; { VERY simple test for zip file e.g., ItsaZipFile := IsZip('test.zip'); } procedure CloseZipFile(var Zprec:tZiprec); {Only free buffer, file only open in Getfirstinzip} { free ZIP buffers e.g., CloseZipFile(myZipRec); } ----------------- Dr Abimbola A Olowofoyeku (The African Chief) May 19*** http://ourworld.compuserve.com/homepages/African_Chief

近期下载者

相关文件


收藏者