⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zipbuilder.h

📁 zip算法的源码
💻 H
📖 第 1 页 / 共 4 页
字号:
		-changed ConvertOem2ISo to avoid redundant loop, and SetZipSwitches did not always pass
     the correct code page to the Dll
		-Added AddUseDate in set AddOpts, variable FDate and property Date and
		 changes in SetZipSwitches to use exclude files earlier than given date
		-In function List changed call to CheckIfLastDisk, if not last disk was in
		 drive then exception was thrown and no further check made.
		-Status of disk reported in OnStatus was only correct if disk contained the
		 file, changed order of tests to report correct diskstatus
		-If during unzip action the user cancelled (AbortAction == true) a FileClose
		 was executed on an already closed file in GetNewDisk
    -A bug reported with Rename() if archive contained abc.txt; abcd.txt and abce.txt and
     the name abc was changed in def then also abcd.txt was changed to defd.txt. This bug
     appens when in Rename the parameters were given without extension.
     change made in Rename() to avoid this problem

	Final 1.60 version changes:
		-Slight change in the List function to prevent memory loss due to an exception.
		 found by Alexey ChernobaLev
		-The unzdll.dll will respond quicker to a cancel command (v1.6026)
		-The zipdll.dll should now be able to handle compressed sizes > 2^29 (v1.6018)
		-OnExtractSkipped gave wrong(random) SkipTypes. Found by Venkatesan N.

	Changes in v1.52n, v1.60n:
		-For spanned archives on the HDD it would display that there was an error reading the
		 zip file on the third disk. This was because I have set the MaxArchiveSize to 2Mb
		 exactly and I抦 reading in 8Kb chunks. This would cause the final read on the 2nd disk
		 to fall on the EOF marker making SizeR equal 0. WriteJoin would then cause the error.
		-The ZipFilename is now changed to the name of the last 'disk' in the set when using
		 diskspanning and the disk is not a diskette.

	Changes in v1.52m, v1.60m:
		-MakeTempFileName() did not allocated a buffer large enough to hold the new filename
		 and as a result the Rename() method did not always work.
		-in ReadSpan a Zip archive comment was not handled as it should have been. bug solved
		 thanks to Tim Borman.
		-Replaced (wait/default)cursor setting with a dynamic version, so the application
		 program won't notice it, idea Danail Traichev.
		-Moved DLL handles and function pointers variables to ZipBuilder private in stead
		 of as global variables. This should avoid problems with automatic DLL loading and
		 unloading when using threads.
		-OnExtractOverwrite event added a DirIndex parameter.
		-FileExists replaced by a local function to prevent problems with ZipMagic when
		 you do NOT set the exception program option in ZipMagic. Should also be somewhat
		 faster. There is still a problem with ZipMagic because FileAge is used in
		 DiskSpanning and this can't be replaced by GetFileAttributesEx because W95 does
		 not know of this function. (proposal: Patricio Moschcovich)
		-Added HowToMove to the ZipDll, when using the Add Move option Undoing is preserved
		 just as in the component.

Changes:v1.60   Jun 12, 2001
	-Added Encrypted boolean to ZipDirEntry structure. (part of ZipContents)
	 (Also added info to the help text regarding the value of 'Flag'
	-Writing of zipfile comments is now possible.
	 (ZipDll changed also, now v1.60)
	-Added Renaming of one or more zip entries in a zip archive.
	 (also with the possibility to change the datetime field)
	 (progress events are supported)
	-Changed ConvertSFX to support the new MPV header.
	 (The old ZipSFX.bin is no longer supported!!!)
	-Changed ConvertZIP to support the new MPV header.
	 (old header can still be read)
	-New SFX option: SFXNoSuccessMsg, bypasses the final message when extracting is done.
	-New SFX property: SFXMessage, a startup message before the SFX dialog is shown.
	-New SFX property: SFXIcon, the icon that is shown as executable image.
	-SFXCaption, SFXCommandLine, SFXDefaultDir and all other options are
	 read back when converting from sfx to zip.
	-Changed Demo1 SfxUnit.
	-Added a rename unit to Demo1.
	-The Zip Dll is now reentrant; multiple threads can use it at the same time
	 (This requires multiple ZipBuilder components.)
	-New property: AddStoreSuffixes Files with one of these extensions will be stored
	 in the zip archive others will be deflated.
	 default: assGIF+assPNG+assZ+assZIP+assZOO+assARC+assLZH+assARJ+assTAZ+assTGZ+assLHA
	-New AddOptions: AddArchiveOnly and AddResetArchive, used to handle the archive bit of a file.
	-Added a new event: OnSetNewName, While adding to an archive the path/name can be changed.
	-Added ExtractFileToStream function, Extract to a Memory stream without making an intermediate file.
	 ( Now position in the stream is reset.)
	-Fixed Auto SFX Create via Add, went wrong when SFXConvert returned an error.
	-Fixed ZipDll.dll Add with Update did not work on an empty zip archive.
	-Fixed a bug in ConvertSFX while working with sfxblksize.
	-Changed the writing of the zip archive comment, now also without using the zip dll.
	-Added a new Event OnNewName this will be called when reading the Zip's directory
	 and gives you the opportunity to fill for example a ListView. In previous versions
	 you had to wait for the OnDirUpdate event, which is still supported.
	-Added new property PasswordReqCount, used to set the number of times a password will be
	 requested through the OnPasswordError event.
	-Added a new Event OnPasswordError, this will be called when the given Password is wrong or
	 not given at all.
	 The UnZip dll itself will not ask for a password anymore when the components version
	 number >= 1.6!!!
	-Added a new public method GetPassword which replaces the InputBox function used earlier.
	 Uses now language dependent Resource text as output and while typing the password, a '*'
	 will be shown.
	-Checked for and fixed a few memory leaks in the dll's and component.
	-Added the new event OnCRC32Error. On a CRC error it is now possible to skip the extraction of
	 that file
	-Added the new property FSpecArgsExcl, used to specify file arguments which should be excluded
	 (i.e. not zipped) during a zip operation. (like *.tmp)
	-Added the new event OnExtractOverwrite, is complementary to the Extract Option ExtrOverwrite.
	-Added the new event OnExtractSkipped, called when a file is skipped during extraction with the
	 reason why it is skipped.
	-Added property UseDirOnlyEntries bool, Do not include Directory only entries from the zip contents
	 list. (See also AddOption AddSeparateDirs ) Default false;
	-Added function CopyZippedFiles, to copy files from one archive into another without re-zipping.
	-Added new event OnCopyZipOverwrite used in the function CopyZippedFiles().
	-Added unsigned char *ExtraData member (from the central header) to the ZipDirEntry structure.
	-EraseFile() now prepends the full path from the current drive/dir if filename did not have one.
	 (FOF_ALLOWUNDO does not seem to work when there is no full path!?)
	-Added to version 1.60L to support recursion and encryption on a FFileSpec basis.
	 Regardless of what AddRecurseDirs is set to, a '>' will force recursion, and a '|' will stop recursion.
	 (RCV + Bob Dolan), newest ZipDll needed too.
	-Further it is possible the specify a password after the FFileSpec, separated by a '<'
	 If there is no other text after the '<' then, an existing password, is temporarily canceled.
	-Added new event OnGetNextDisk, used while diskspanning if assigned.
	 parameters: ( System::TObject *Sender, int DiskSeqNo, int DiskTotal, AnsiString Drive, bool &Cancel )
	 (Requested by Jo鉶 Lira)
	-Added new event OnStatusDisk, used while diskspanning if assigned.
	 enum ZipDiskStatusEnum		{ zdsEmpty, zdsHasFiles, zdsPreviousDisk, zdsSameFileName, zdsNotEnoughSpace };
	 typedef Set<ZipDiskStatusEnum, zdsEmpty, zdsNotEnoughSpace> TZipDiskStatus;
	 enum TZipDiskAction			{ zdaOk, zdaErase, zdaReject, zdaCancel };
	 parameters: ( System::TObject *Sender, int PreviousDisk, AnsiString PreviousFile, TZipDiskStatus Status, TZipDiskAction &Action )
	 (Requested by Tim Borman)
	-Added new event OnFileComment, used to set file comments while adding files to an archive.
	 parameters: ( System::TObject *Sender, String ForFile, String &FileComment, bool IsChanged )
	-Added the new method MakeTempFileName, to assist in the internal flow of ZipBuilder, but it is public.
	-Added the new property RootDir.
	-Added the new AddOption: AddVolume.
   -Fixed bug in SFX file DialogSel, function SelectDir, found by Lucjan Lukasik.
	-Fixed error: Fatal error in ZIPDLL.DLL ( now version 1.6010 )
	-Added alignment pragmas so one can safely change the defaults (idea: Edward. Diener)
	-Changed structure declarations in ZipDll.h, UnZipDll.h, CallBack.h and in the Dll source code to
	 make them point to same type of data, e.g. DWord <=> BOOL is now BOOL in all cases.
	-Sortgrid extended with CTRL click to select single rows.
	-GetAddPassword() now returns an empty string in case the passwords did not match.
	-The Unzip Dll now support changing the filenames on extract (DLL v1.6016)
	-Added the new property DirOnlyCount.
	-Should be BCB5 compatible now.
	-in version 1.60M:
	-Added method void AddStreamToFile( String FileName, long FileFlags ); Dll version 1.6015
	-Added method TZipStream *AddStreamToStream( TZipStream *InStream ); Dll version 1.6015
	-Added method IsZipSFX( const String SFXExeName )
	-Added method ExtractStreamToStream( TMemoryStream *InStream, unsigned long OutSize ); Dll version 1.6023
	-Removed the Exclamation-Mark necessity in the Filename for SFXAutorun when the name is Setup.exe
	-When using SFX and an .inf file this file is now executed within the extract directory.
	-A 'Cancel all' and 'Abort' button in the password dialog.
	-Implement Recycle to the recycle bin when moving files.
	 (When adding files with AddOptions set to 'move'.)
	-Added RAR, ACE, CAB, GZ, GZIP and JAR to the AddStoreSuffix property.
	-Changed the handling of RootDir and ExtrBaseDir, SetCurrentDir is no longer used because this may
	 cause problems when using threads.

Changes in v1.52l:
		-Fixed a bug in the ZipDll that prevented the use of the Add option AddForceDOS.
		-Fixed a bug in the ZipDll that prevented the use of the Add option AddZipTime.
		-Fixed a bug in the ZipDll that gave a Fatal Dll error when using delete or Add-Freshen
		 with wildcard(s).
		-Fixed a bug in the SFX source code, re-compilation always resulted in the message
		 Error reading Archive File. Found thanks to Patrick Gentemann.
		-Added a new Read Only property VersionInfo.
		-Fixed the message: 'Error reading ZipBuilder1->AddStoresSuffixes: Property does not exist.'
		 when opening the demo projects.
		-Fixed the AddFile->CreateOrder property not being supported (in BCB < 4).
		-Moved the assignment of the FErrCode and FMessage one line up in the function ShowExceptionError
		 This way the property ErrCode can be used inside the OnMessage event handling. (The parameter
		 ErrCode in this event is sometimes 0 while ErrCode is not.)

	Changes in v1.52k:
		-Changed most StrPCopy functions to StrPLCopy because of a bug in BCB1, Delphi2 and
		 Delphi3 in these environments max. 255 characters are copied, reported by Tim Borman.
		-Added a line to WriteSpan to correctly read and write an existing archive comment.
		 Found by Tim Borman.
		-Added some catch statements to functions which could give an unknown error as result,
		 now extended to give the exception message in case the exception originated from a
		 VCL Exception class.

	Changes in v1.52j:
		-BCB4: New typedef for use in FileSeek functions (Ambiguity int, __int64)
		-BCB4: Some template classes not wanted anymore.
		-BCB4: Unnamed unions are now possible (and used) and so the union member names from
		 IMAGE_RESOURCE_DATA_ENTRY had to be removed.
		-Bug fix in List, ReadSpan to read to correct data when a disk change was neccessary.
		 This prevented to open and read a spanned archive which had it's header data split
		 across multiple disk(files). Found thanks to Alexander Hofmann.
		-Moved FreeLibrary which wasn't always called in DiskFreeAndSize.
		-Added a SetErrorMode because it wasn't always reset in IsDiskPresent.
		-Changed the function DirExists a little in case the given dir was an empty string.
      -Added some properties to the SortGrid VC and as result removed some code from the demos.
      -A new #define UNZIPVERSION 160, now Zip and Unzip dll may have different version numbers.
		-Added the new resource message: DS_CopyCentral "Central directory" used in WriteSpan.
		-Bug fix CheckForDisk, Division by zero error could occur under certain circumstances.
		 Found thanks to J.A. Bijsterbosch

	Bug Fix in v1.52i:
		-In the function WriteSplit a statement was missing that incremented the disk to use.
		 This was most likely to happen when zipping to a large spanned archive, but also smaller
		 archives could suffer from this problem.
		 thanks to Jim Hoops, Alexander Hofmann.

	Bug Fix in v1.52h:
		-Fixed a memory leak in CheckIfLastDisk thanks to Greg Lorriman.

	Version g Added Russian language support.

	Bug Fix and change in v1.52f:
		-Some throw's did not have EZipBuilder as exception class.
		-Better support for harddisks > 2Gb and UNC names.
		 (Replacement function for DiskFree and DiskSize functions this also
		 prevented opening files given with an UNC name.)

	Bug in archive distribution (v.152e):
		-vcl directory did not contain ZipMsg.h

   Bug Fix in v1.52d:
		-Reading of spanned disks written by WinZip did not work.

   Bug Fixes in v1.52c:
		-The messages DS_NotaDrive and DS_DriveNoMount expects a string as
		 parameter but did in fact get an Integer and as result you would get
		 a message: UnKnown error in function ReadSpan() or WriteSpan()
		 Now there is an new exception constructor for these messages.
		 Found by Tim Borman
		-When there was no disk in the drive no question was asked to put
		 one in, instead an exception was raised an the spanning was aborted.
		 Found by Tim Borman
		-If the size of the disk is not yet known there was still a question
		 to put disk X of Y in the drive. Now this is changed in just Disk X.
		 Not really a bug but annoying, Found by Tim Borman
		-The copy stage of the diskspan process is now a little faster.
		 Thanks to Tim Borman
		-Fixed a bug in the zip dll while handling slashes, this sometimes
       lead to a Fatal Error in ZipDLL.DLL: abort exception.
       Thanks to Sebastian Hildebrandt and Matthew Kent.

	Bug fixes v1.52b:
		-Changed the search direction for the EOC structure.
		 (If there was a zip file stored in a ziparchive within the last 64K
		  the wrong archive directory was shown.)
	   -Diskspanning with formatting with ConfirmErase = True did not work.

	Bug fix v1.52a:
		-Changed ReplaceForwardSlash() in returning a new string in stead of changing
		 the old one this because of a 'local header not found in internal structure'
		 error in WriteSpan() and ReadSpan().
*/
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -