Compression component

折月煮酒 提交于 2019-12-09 18:22:32

问题


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, KaZip 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)

回答1:


Abbrevia will serve your purposes nicely.




回答2:


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).




回答3:


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.




回答4:


We use ZipMaster.

Needs a DLL, works with 2010.




回答5:


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




回答6:


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



来源:https://stackoverflow.com/questions/7442047/compression-component

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!