Subject: Re: zlib and scp/sftp

Re: zlib and scp/sftp

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 8 Dec 2012 21:54:44 +0100 (CET)

On Sat, 8 Dec 2012, Casper Langemeijer wrote:

>> 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?

Right, most things you transfer over SSH turn out to not compress very well
and already compressed data only waste CPU and in fact make the transfer
larger than without compression.

> 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.

If you find such odd servers than sure, enabling compression sounds like the
correct action, but having it enabled by default because of that I don't
know...

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