GNURLOPT_SSH_COMPRESSION(3)
okay bestie, welcome to the GNURLOPT_SSH_COMPRESSION(3) page β it lives in the curl_easy_setopt options manual set, and it's here to explain the SSH compression toggle with main character energy π
πΈ NAME πΈ
CURLOPT_SSH_COMPRESSION β enables compression / decompression of SSH traffic. That's the whole vibe, no cap.
β¨ SYNOPSIS β¨
ok so you're gonna include this header and call this function, exactly like this:
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_COMPRESSION, long
enable);
π¦ DESCRIPTION π¦
Pass a long as parameter set to 1L to enable or 0L to disable. Simple toggle, bestie.
Enables built-in SSH compression. This is a request, not an order; the server may or may not do it. The way that it's literally just a request and not an order? Obsessed. The server has main character energy too π
π DEFAULT π
0, disabled. It's lowkey off by default, ngl β you gotta opt in.
π PROTOCOLS π
All SSH based protocols: SCP, SFTP. Those are the ones invited to the compression party.
π₯ EXAMPLE π₯
Here's the iconic little setup β the example ate, honestly:
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com");
/* enable built-in compression */
curl_easy_setopt(curl, CURLOPT_SSH_COMPRESSION, 1L);
/* Perform the request */
curl_easy_perform(curl);
}
β AVAILABILITY β
Added in 7.56.0. Periodt β that's the version tea.
π RETURN VALUE π
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. Those are the three moods, highkey fr fr.
π«Ά SEE ALSO π«Ά
I'm obsessed with these other pages too, iykyk:
CURLOPT_ACCEPT_ENCODING(3), CURLOPT_TRANSFER_ENCODING(3),
xoxo, from the libcurl 7.56.0 era, dated 05 Aug 2017, page GNURLOPT_SSH_COMPRESSION(3) πβ¨
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms