Tobias Geerinckx-Rice <m...@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’.