[fpc-pascal] How to duplicate PHP's gzcompress() function in FPC?

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Wed Oct 7 17:56:22 CEST 2015


On 2015-10-07 16:51, Dmitry Boyarintsev wrote:
> The difference is mentioned in deflateInit2() functions, where a user can
> specify windowBits. If the value is negative, to Gzip header would be
> generated.
> 
> I presume the gzcompress is passing negative value to the function, while
> gzencode passes a positive value to the function.


I'm actually experimenting that that (or similar) right now.... I
already use TCompressionStream included with FPC, and I see its
constructor has an option ASkipHeaders which defaults to False. I'm now
setting that parameter to True and will soon see if that works for my
code or not.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp



More information about the fpc-pascal mailing list