---
name: "libressl-SSL_SESSION_get_compress_id"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-SSL_SESSION_get_compress_id"
---

# libressl-SSL\_SESSION\_get\_compress\_id(3)

get details about the compression associated with a session

## NAME

**SSL\_SESSION\_get\_compress\_id** – get details about the compression associated with a session

## SYNOPSIS

SSL Library (libssl, -lssl) libcrypto

**#include \<openssl/ssl.h\>**

*unsigned* *int*\

**SSL\_SESSION\_get\_compress\_id**(*const SSL\_SESSION \*s*);

## DESCRIPTION

If compression has been negotiated for an ssl session, **SSL\_SESSION\_get\_compress\_id**() returns the id for the compression method, or 0 otherwise. The only built-in supported compression method is zlib, which has an id of 1.

## SEE ALSO

[ssl(3)](/ssl/3.md), SSL\_get\_session(3), SSL\_SESSION\_get\_id(3), SSL\_SESSION\_get\_protocol\_version(3), SSL\_SESSION\_new(3)

## HISTORY

**SSL\_SESSION\_get\_compress\_id**() first appeared in OpenSSL 1.0.1 and has been available since OpenBSD 5.3.
