I need to use CompressBuf and DecompressBuf of zlib in fpc.
Thanks,
Dennis

Mailing lists / fpc-pascal / 2013-07
10 messages · 6 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
I need to use CompressBuf and DecompressBuf of zlib in fpc.
Thanks,
Dennis
There are 3 options:
paszlib.pas pascal implementation of libz.
zstream.pp stream interface, uses paszlib.
zlib.pp native interface to C libz library.
Michael.
I need to use CompressBuf and DecompressBuf of zlib in fpc. Dennis
Dennis Poon wroteI need to use CompressBuf and DecompressBuf of zlib in fpc.
Exactly what Michael said, plus take a look at the dzlib.pas unit included in the tiOPF project (available on SourceForge) in the "Options' directory. It's a FPC & Delphi compatible zlib unit.
While you are there, it might be worth looking at the tiCompress and tiCompressZLib units too. They give a very easy to use API interface to compresssing buffers, streams, strings and files etc.
Regards,
- Graeme -
There are 3 options: paszlib.pas pascal implementation of libz. zstream.pp stream…
Is any one of those more "natural" than the rest, because e.g. it's already used for GIF handling?
GIF or PNG?
PNG is using deflate algorithm.
GIF is using its own.
On Sun, Jul 28, 2013 at 4:53 PM, Mark Morgan Lloyd <
There are 3 options: paszlib.pas pascal implementation of libz. zstream.pp stream…
thanks a lot.
Dennis
Is any one of those more "natural" than the rest, because e.g. it's already used for GIF…
Not to my knowledge.
Michael.
Is any one of those more "natural" than the rest, because e.g. it's already used for GIF…
paszlib/zstream
http://wiki.lazarus.freepascal.org/paszlib
used for zip support in FPC (TZipper).
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.
Dennis
Dennis Poon wrotePlease 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.
Michael.