SSL_SESSION_GET_COMPRESS_ID(3ossl)

πŸ’… SSL_SESSION_GET_COMPRESS_ID πŸ’…

okay bestie, so this one lives in the OpenSSL family of manual pages, and it's literally the tiniest little function but she's important so let's give her the attention she deserves πŸŽ€


✨ NAME ✨

SSL_SESSION_get_compress_id β€” get the deets about the compression that's associated with a session πŸ¦‹


🌸 SYNOPSIS 🌸

#include <openssl/ssl.h>

unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *s);

like, that's it. one include, one function, one const pointer. she's low maintenance πŸ’–


πŸ’œ DESCRIPTION πŸ’œ

okay so picture this: if compression has actually been negotiated for an ssl session, then SSL_SESSION_get_compress_id() will hand you back the id for the compression method. and if it hasn't? you get 0. that's the whole vibe check 😌

and the tea on which compression methods exist: the only built-in supported compression method is zlib, and she has an id of 1. that's it. that's the list. no cap πŸ‘‘


🫢 RETURN VALUES 🫢

SSL_SESSION_get_compress_id() returns the id of the compression method, or 0 if there isn't one. so like, 0 is your "nope, nothing here" signal, not a mystery number, bestie. it's giving clear communication πŸ’…


πŸ‘€ SEE ALSO πŸ‘€

go read that one next, iykyk πŸ“š


Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. πŸ›οΈ

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>. βš–οΈ

fr fr read the license before you do anything spicy with this, that's the rule and we respect her πŸ™ˆ

and that's the whole page, bestie!! mwah πŸ’– this was OpenSSL 3.5.9, dated 2026-09-29 β€” thanks for scrolling all the way to the bottom with me, you're the main character of my terminal πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from