开发者

Compression component

开发者 https://www.devze.com 2023-04-05 12:14 出处:网络
I am looking for a compression component that supports Delphi2010 and allow me to do the basic operations of:

I am looking for a compression component that supports Delphi2010 and allow me to do the basic operations of:

  • create .zip archives
  • extract from .zip archives
  • delete .zip archives

I also need the component to be free for commercial usage and possibly does not use/rely on a DLL (I don't mind if it does).

So far I have looked into ZipForge, FlexCompress, 开发者_如何学GoKaZip and UnRAR, but I found out that I needed to purchase a license to commercially use ZipForge and FlexCompress. When it came to KaZip, there were errors in the code so I was unsuccessful in terms of installing the component. Whereas UnRAR was just that; it only decompressed .zip or .rar archives.

So In summary, I need a compression component that:

  • is free for commercial use
  • supports Delphi 2010
  • performs the above stated operations
  • does not use DLLs (however, I do not mind)


Abbrevia will serve your purposes nicely.


The JCL has a nice set of compression classes for both files (ie common archive formats) and for in memory stuff (TStreams) in jclCompression unit. For some formats it requires DLL, it uses 7zip one. But it is open source and free (MPL / LGPL).


Take a look at this OpenSource SynZip unit. It's even faster for decompression than the default unit shipped with Delphi, and it will generate a smaller exe (crc tables are created at startup).

In order to delete a zip content, you can mix TZipWriter and TZipReader to copy only the needed archived files inside the zip.

No external dll is needed. Very small code overhead. Works from Delphi 6 to XE (shortly for XE2).

I just made some changes to handle Unicode file names inside Zip content, not only Win-Ansi charset but any Unicode chars.


We use ZipMaster.

Needs a DLL, works with 2010.


There is also this component build around 7zip dll (alpha stage, but support for D7 to D2010):

http://www.rg-software.de/rg/index.php?option=com_content&view=article&id=29&Itemid=51


I've used Zlib and Abbrevia and are working very well

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号