[fpc-pascal]What is the best to compress files

Michael.VanCanneyt at Wisa.be Michael.VanCanneyt at Wisa.be
Thu Oct 24 20:04:42 CEST 2002


On Thu, 24 Oct 2002 memsom at interalpha.co.uk wrote:

> Does FPC have an implementation of ZLib? IIRC it does. This should give you
> most of what you want.
>
> However, if you want a completely self contained solution (ZLib seems to almost
> always need a DLL/So or at least include a larger presence in the final code
> than I needed for my purposes) you may need to look elsewhere. The method I
> always use is LZH compression routines that someone called the 'African Chief'
> has a distro of. I customized them to use TStream descendents, and wrapped them
> in classes, but they do work. The only interesting aspect is that you have to
> manage the file format yourself if you use the raw compression routines alone.

This functionality is included in free pascal. paszlib offers compression
code lik gzip does, and TCompressionStream in the FCL offers a classes
wrapper around this.

There is also code (see the 'zip' package) to handle zip files.


Michael.






More information about the fpc-pascal mailing list