[Lazarus] FPC, gzip and stream

silvioprog silvioprog at gmail.com
Sat Feb 4 03:02:47 CET 2012


Hello,

How to use gzip in stream with FPC?

Only deflate:

(...)
  var
    S: string;
    VDeflate: TCompressionStream;
  begin
    VDeflate := TCompressionStream.Create(clMax, Contents);
    try
      S := 'Hello';
      VDeflate.Write(Pointer(S)^, Length(S));
    finally
      VDeflate.Free;
    end;
  end;
(...)

But, with gzip, without sucess. :(

Exists an 'TGZCompressionStream'?

Thanks!

ps. See: http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression

-- 
Silvio Clécio
====================================
Site - <silvioprog.com.br>
LazSolutions - <code.google.com/p/lazsolutions>
====================================




More information about the Lazarus mailing list