gnutls_compression_get_id(3)

✨ gnutls_compression_get_id(3) ✨

okay bestie, welcome to the gnutls manual β€” yes, that gnutls, the TLS library that's been holding it down since forever. this page is all about one lil function that goes by gnutls_compression_get_id, and honestly? it's giving "I just wanna look up a compression method by name" energy. πŸ’…


🌸 NAME 🌸

gnutls_compression_get_id β€” API function

like, that's it. that's the name. iconic, no notes. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/compat.h>

gnutls_compression_method_t gnutls_compression_get_id(const char *
name);

so you gotta pull in <gnutls/compat.h> first β€” it's the compat header, iykyk β€” and then you can call the thing. returns a gnutls_compression_method_t, takes one const char *. periodt. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • const char * name β€” this is the compression method name you're handing over. just a string, bestie. nothing scary. 🌈

πŸ’– DESCRIPTION πŸ’–

so basically the function takes that name you gave it and compares it against the compression methods it knows about β€” and the way it compares them is case insensitive. meaning "DEFLATE", "deflate", and "DeFlAtE" all get treated the same. no cap. lowercase girlies and uppercase girlies are equal here. 🫢


⭐ RETURNS ⭐

you get back an id for the compression method you specified as a string. slay. πŸ’…

BUT β€” and this is the important part β€” if something goes wrong, you get GNUTLS_COMP_UNKNOWN back instead. so like, vibe check your return value, fr fr. πŸ™ˆ


πŸ”₯ REPORTING BUGS πŸ”₯

found a bug? don't just suffer in silence, tell the people:

they wanna hear from you, bestie. πŸ’œ


Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.

(translation: you can copy and share this file however you want, no payment needed, just keep the copyright notice and this notice intact. generosity, honestly. πŸŽ€)


🌈 SEE ALSO 🌈

The full documentation for gnutls is maintained as a Texinfo manual. If the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit:

https://www.gnutls.org/manual/

go read the full manual, it's the main character of the docs. πŸ“šβœ¨


and that's the whole page, bestie!! this was gnutls version 3.8.13, documented as gnutls_compression_get_id(3). now go forth and look up your compression methods by name, case-insensitively, like the icon you are. mwah. πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from