Gzip and zlib are the same except for the GZ "magic header" #$1F#$8B... I've experimented with different pascal zlib implementations and am finally using a modified one to get both gzip and zlib compression working in full pascal (no external zlib). It is based on (from READM.TXT): ____________________________________________________________________________ _
PASZLIB 1.0 May 11th, 1998 Based on the zlib 1.1.2, a general purpose data compression library. Copyright (C) 1998 by NOMSSI NZALI Jacques H. C. [kn&n DES] See "Legal issues" for conditions of distribution and use. ____________________________________________________________________________ _ The modifications were needed for the GZIP compression but decompression works "out of the box" using the function DecompressBuf(const InBuf: Pointer; InBytes: Integer; OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer):int; in unit zUnCompr. This function accepts both standard zlib compressed and gzip compressed data. Note that this is NOT the paszlib library as distributed with fpc. It does not contain this function. I got the library a long time ago from http://www.tu-chemnitz.de/~nomssi/paszlib.html. However the site points now to a new one which doesn't work. If you want I can send you directly the modified library. I'm using the library both on Windows and Linux 32 and 64 bit. -----Message d'origine----- De : Felipe Monteiro de Carvalho [mailto:felipemonteiro.carva...@gmail.com] Envoyé : mercredi 13 avril 2011 18:33 À : Ararat Synapse Cc : Ludo Brands Objet : Re: [Synalist] RE : Reading the HTTP headers of a page Hello, Does anyone know if zlib will successfully uncompress the data received in "gzip" method from an HTTP server? I think gzip is the same as zlib, but I'm not sure =o Or else which Pascal bindings or Pascal uncompressor should be used? thanks, -- Felipe Monteiro de Carvalho ------------------------------------------------------------------------------ Forrester Wave Report - Recovery time is now measured in hours and minutes not days. Key insights are discussed in the 2010 Forrester Wave Report as part of an in-depth evaluation of disaster recovery service providers. Forrester found the best-in-class provider in terms of services and vision. Read this report now! http://p.sf.net/sfu/ibm-webcastpromo _______________________________________________ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public