Subject: Re: zlib and scp/sftp

Re: zlib and scp/sftp

From: Casper Langemeijer <langemeijer_at_php.net>
Date: Sat, 08 Dec 2012 19:00:48 +0100

On 12/02/2012 03:31 PM, Daniel Stenberg wrote:
> On Sun, 2 Dec 2012, scout_game_at_hushmail.me wrote:
>
>> I have a question, i built libssh2 with zlib support. Does that mean
>> that scp and sftp functions will automatically uses zlib compression
>> by default or should I inform libssh2 to use zlib by calling a
>> special function from library ?
>
> libssh2_session_flag() with the LIBSSH2_FLAG_COMPRESS bit set. But in
> general compression is not such a good idea as it sounds...

Hi Daniel, could you elaborate on that? Are you talking about the extra
cpu load on already compressed data like jpg, mp3, zip, gz etc being
sent over a sftp and scp?

A PHP ssh extension user is suggesting LIBSSH2_FLAG_COMPRESS should
always be set, to allow for connections to servers which only accept
zlib compressed connections. I'm sure this is an edge-case scenario, but
if it does no harm I could enable compression for all connections.

Greetings, Casper

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-12-08