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

silvioprog silvioprog at gmail.com
Wed Oct 7 18:28:54 CEST 2015


On Wed, Oct 7, 2015 at 12:26 PM, Graeme Geldenhuys <
mailinglists at geldenhuys.co.uk> wrote:

> Hi,
>
> I need to compress a file the same way as PHP's gzcompress() function:
>
>    http://php.net/manual/en/function.gzcompress.php-pascal
> <http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal>
>
[...]

About compress a string with GZ, this one[1] show how to compress streams,
that can be used to compress strings too, via something like TStringStream.
=)

I believe that this example is compatible with 2.6.4+.

[1] http://www.gocher.me/GZIP

-- 
Silvio Clécio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20151007/0eefefa6/attachment.html>


More information about the fpc-pascal mailing list