Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2019-09

How to handle webservice gzip streams

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

detlef oertel

Hello,

I have to 'speak' with a web service that only handles gzip compression. The zstream TCompressionStream only does deflate.
Any hints according to zlib derivates to use windowbits = 15+16 do not work with zstream or paszlib because this part of zlib is not implemented here. It seems that there is a solution with indy using the http component and TIdCompressorZLib as compressor. But I just switched from Indy to synapse because indy has no openssl 1.1 support, which is needed to support actual Linux distributions.

The only ways I see at the moment seems to be ugly: Using the external zlib runtime libraries or
creating for every request a temporary file in order to use the zstream Tgzfilestream.

Is there no gzip stream library for lazarus ?

detlef oertel

Reply by email

Zbyněk Fiala
to detlef oertel

Hello,

I used this unit in my project.

unit zuncomprfp;
	{ uncompr.c -- decompress a memory buffer
	Copyright (C) 1995-1998 Jean-loup Gailly.
	Pascal tranlastion
	Copyright (C) 1998 by Jacques Nomssi Nzali
	For conditions of distribution and use, see copyright notice in readme.txt
	}

source:
https://github.com/zbyna/Media-Stub-Kodi-Creator/blob/master/zuncomprfp.pas      
            Zbyna
Dne 24.9.2019 v 18:50 detlef oertel via lazarus napsal(a):

Show quoted text 17 lines
Hello, I have to 'speak' with a web service that only handles gzip compression. The zstream TCompressionStream only does deflate. Any hints according to zlib derivates to use windowbits = 15+16 do not work with zstream or paszlib because this part of zlib is not implemented here. It seems that there is a solution with indy using the http component and TIdCompressorZLib as compressor. But I just switched from Indy to synapse because indy has no openssl 1.1 support, which is needed to support actual Linux distributions. The only ways I see at the moment seems to be ugly: Using the external zlib runtime libraries or creating for every request a temporary file in order to use the zstream Tgzfilestream. Is there no gzip stream library for lazarus ? detlef oertel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190924/5cc99d88/attachment-0001.html>

Reply by email