1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_SSH_COMPRESSION 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_ACCEPT_ENCODING (3) 9 - CURLOPT_TRANSFER_ENCODING (3) 10Protocol: 11 - SFTP 12 - SCP 13--- 14 15# NAME 16 17CURLOPT_SSH_COMPRESSION - enable SSH compression 18 19# SYNOPSIS 20 21~~~c 22#include <curl/curl.h> 23 24CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_COMPRESSION, long enable); 25~~~ 26 27# DESCRIPTION 28 29Pass a long as parameter set to 1L to enable or 0L to disable. 30 31Enables built-in SSH compression. This is a request, not an order; the server 32may or may not do it. 33 34# DEFAULT 35 360, disabled 37 38# EXAMPLE 39 40~~~c 41int main(void) 42{ 43 CURL *curl = curl_easy_init(); 44 if(curl) { 45 curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com"); 46 47 /* enable built-in compression */ 48 curl_easy_setopt(curl, CURLOPT_SSH_COMPRESSION, 1L); 49 50 /* Perform the request */ 51 curl_easy_perform(curl); 52 } 53} 54~~~ 55 56# AVAILABILITY 57 58Added in 7.56.0 59 60# RETURN VALUE 61 62Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or 63CURLE_OUT_OF_MEMORY if there was insufficient heap space. 64