unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: SSHv2 doesn't actually have compression levels
Date: Fri, 23 Aug 2019 14:21:18 +0200	[thread overview]
Message-ID: <87blwg843l.fsf@gnu.org> (raw)
In-Reply-To: <877e746et0.fsf@nckx> (Tobias Geerinckx-Rice's message of "Fri, 23 Aug 2019 00:00:43 +0200")

Tobias Geerinckx-Rice <me@tobias.gr> skribis:

> Ludo',
>
> Welcome back :-)
>
> Ludovic Courtès 写道:
>> I don’t get it: the ‘compression-level’ field defaults to 3, and
>> OpenSSH
>> does:
>>
>>   static int
>>   start_compression_out(struct ssh *ssh, int level)
>>   {
>>           if (level < 1 || level > 9)
>>                   return SSH_ERR_INVALID_ARGUMENT;
>>           debug("Enabling compression at level %d.", level);
>>
>>   [...]
>>
>>   }
>>
>> What’s wrong?
>
> Exactly!

Exactly what?  :-)

>  ~/openssh-8.0p1 λ grep -r start_compression_out
>  packet.c:start_compression_out(struct ssh *ssh, int level)
>  packet.c:	if ((r = start_compression_out(ssh, 6)) != 0)

libssh (which is what ‘guix offload’ uses) appears to honor the
user-provided compression level:

--8<---------------cut here---------------start------------->8---
int compress_buffer(ssh_session session, ssh_buffer buf) {
  ssh_buffer dest = NULL;

  dest = gzip_compress(session, buf, session->opts.compressionlevel);
--8<---------------cut here---------------end--------------->8---

Apologies if I’m missing the obvious!

Thanks,
Ludo’.

      reply	other threads:[~2019-08-23 12:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30  1:58 SSHv2 doesn't actually have compression levels Tobias Geerinckx-Rice
2019-08-22 21:48 ` Ludovic Courtès
2019-08-22 22:00   ` Tobias Geerinckx-Rice
2019-08-23 12:21     ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blwg843l.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=me@tobias.gr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).