[Lazarus] How to handle webservice gzip streams

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] How to handle webservice gzip streams

Free Pascal - Lazarus mailing list
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
--

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] How to handle webservice gzip streams

Free Pascal - Lazarus mailing list

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


}
     
            Zbyna
Dne 24.9.2019 v 18:50 detlef oertel via lazarus napsal(a):
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

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus