CURLOPT_SSH_COMPRESSION.3 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. .\" generated by cd2nroff 0.1 from CURLOPT_SSH_COMPRESSION.md
  2. .TH CURLOPT_SSH_COMPRESSION 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_SSH_COMPRESSION \- enable SSH compression
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_COMPRESSION, long enable);
  9. .fi
  10. .SH DESCRIPTION
  11. Pass a long as parameter set to 1L to enable or 0L to disable.
  12. Enables built\-in SSH compression. This is a request, not an order; the server
  13. may or may not do it.
  14. .SH DEFAULT
  15. 0, disabled
  16. .SH PROTOCOLS
  17. This functionality affects scp and sftp
  18. .SH EXAMPLE
  19. .nf
  20. int main(void)
  21. {
  22. CURL *curl = curl_easy_init();
  23. if(curl) {
  24. curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com");
  25. /* enable built-in compression */
  26. curl_easy_setopt(curl, CURLOPT_SSH_COMPRESSION, 1L);
  27. /* Perform the request */
  28. curl_easy_perform(curl);
  29. }
  30. }
  31. .fi
  32. .SH AVAILABILITY
  33. Added in curl 7.56.0
  34. .SH RETURN VALUE
  35. Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
  36. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
  37. .SH SEE ALSO
  38. .BR CURLOPT_ACCEPT_ENCODING (3),
  39. .BR CURLOPT_TRANSFER_ENCODING (3)