GZip over sockets

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

GZip over sockets

Reinout Heeck-2
Hi,

Did anyone ever use the Compression-ZLib on a socketconnection?
I tried to set something up but got a Z_STREAM_ERROR.
Any pointers would be nice.

Regards

Cham

Reply | Threaded
Open this post in threaded view
|

Re: GZip over sockets

Dave Stevenson-2
The closest I've come to your configuration is wrapping an ftp
readstream with aGZipReadStream.  See
InstallerPage>>installFilesFromRemoteArchive:to: in VWInstallerFramework.

Dave

Cham Püschel wrote:

> Hi,
>
> Did anyone ever use the Compression-ZLib on a socketconnection?
> I tried to set something up but got a Z_STREAM_ERROR.
> Any pointers would be nice.
>
> Regards
>
> Cham
>
>

Reply | Threaded
Open this post in threaded view
|

Re: GZip over sockets

Mark Pirogovsky-3
In reply to this post by Reinout Heeck-2
You may need to implement
#skip:, #size, #position: and possibly few other methods for the classes
GZipReadStream and InflateStream.

I did not try them on sockets, but I have to make those changes for my
application to work with external files with "on the fly" compression.
So my application reads and writes on the stream regardless if it is
compressed stream, or just binary stream on file.

Also with the sockets you have to play with encoding.

Hope this helps,

--Mark

Cham Püschel wrote:

> Hi,
>
> Did anyone ever use the Compression-ZLib on a socketconnection?
> I tried to set something up but got a Z_STREAM_ERROR.
> Any pointers would be nice.
>
> Regards
>
> Cham
>
>
>