1CURLOPT_SSH_COMPRESSION(3) curl_easy_setopt options CURLOPT_SSH_COMPRESSION(3)
2
3
4

NAME

6       CURLOPT_SSH_COMPRESSION - enable SSH compression
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_COMPRESSION, long enable);
12

DESCRIPTION

14       Pass a long as parameter set to 1L to enable or 0L to disable.
15
16       Enables built-in SSH compression.  This is a request, not an order; the
17       server may or may not do it.
18

DEFAULT

20       0, disabled
21

PROTOCOLS

23       All SSH based protocols: SCP, SFTP
24

EXAMPLE

26       CURL *curl = curl_easy_init();
27       if(curl) {
28         curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com");
29
30         /* enable built-in compression */
31         curl_easy_setopt(curl, CURLOPT_SSH_COMPRESSION, 1L);
32
33         /* Perform the request */
34         curl_easy_perform(curl);
35       }
36

AVAILABILITY

38       Added in 7.56.0
39

RETURN VALUE

41       Returns CURLE_OK if the option is  supported,  CURLE_UNKNOWN_OPTION  if
42       not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
43

SEE ALSO

45       CURLOPT_ACCEPT_ENCODING(3), CURLOPT_TRANSFER_ENCODING(3),
46
47
48
49libcurl 7.85.0                   May 17, 2022       CURLOPT_SSH_COMPRESSION(3)
Impressum