[fpc-pascal] Re: what is the FPC equivalent of Delphi's zlib unit?

Michael Van Canneyt michael at freepascal.org
Tue Oct 15 09:01:07 CEST 2013

On Fri, 11 Oct 2013, Dennis Poon wrote:

> Please help. I am using Delphi 5's zlib procedure   CompressBuf(src,SrcLen, Dest, DestLen);
> to compress data to be decompressed by FPC's paszlib unit, but I don't know which one of the many procedure is the right right to use?
> I tried uncompress(Dest, DestLen, Src, SrcLen) but it is obviously wrong.
> It is urgent. Thanks a lot in advance.

There is no direct replacement for this routine.

function compress (dest : Pbyte;
                    var destLen : cardinal;
                    const source : array of Byte;
                    sourceLen : cardinal) : integer;

from the zcompres unit probably comes closest.


More information about the fpc-pascal mailing list