gd_encoding_support(3)
π gd_encoding_support(3) π
okay bestie, so this one lives in the GETDATA manual section, and it's literally the "does my library even do this encoding" vibe check. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
gd_encoding_support β determine GetData library support for data encodings
πΈ SYNOPSIS πΈ
#include <getdata.h>
int gd_encoding_support(unsigned long encoding);
π DESCRIPTION π
so the gd_encoding_support() function is basically the group chat poll: it reports whether the Dirfile encoding you passed in as encoding is supported by the GetData library. π
and the encoding argument should be one of these symbols, indicating the encoding type:
GD_UNENCODEDGD_BZIP2_ENCODEDGD_FLAC_ENCODEDGD_GZIP_ENCODEDGD_LZMA_ENCODEDGD_SIE_ENCODEDGD_SLIM_ENCODEDGD_TEXT_ENCODEDGD_ZZIP_ENCODEDGD_ZZSLIM_ENCODED
if you're like "bestie what do these even mean" β no worries, go peek at gd_open(3) and dirfile-encoding(5), they explain the meanings of these symbols and give you the details on the known encoding schemes. β¨
π¦ RETURN VALUE π¦
here's the tea, the function returns one of three things:
GD_RDWRβ the GetData library can read from and write to the specified encoding πGD_RDONLYβ the GetData library can only read from the specified encoding-1β neither reading nor writing is supported, orencodingwasn't one of the symbols listed above π
π NOTES π
ngl this part matters, so pay attention.
GetData's encoding support framework is way more finely grained than the three-way system this function reports. it's totally possible for the library to have partial support for reading or writing a particular encoding. so this function will only report positive support if all functions of a given class (read-only or read-write) are supported. no half-credit, periodt.
also, encoding types can have multiple subtypes with different degrees of support. this function reports the support of the most supported subtype. for example, the LZMA encoding framework can read both the .lzma and .xz container formats, but only write .xz files. so if LZMA support is available, this function will return GD_RDWR when passed GD_LZMA_ENCODED. π§
so yeah β when you get GD_RDWR back, that's the best case across subtypes, not a promise that every single container format is writable. iykyk π
π HISTORY π
the gd_encoding_support() function appeared in GetData-0.9.0. a legend was born, fr fr β
π SEE ALSO π
and that's the whole page bestie!! this one's Version 0.10.0, dated 25 December 2016 β a lil holiday gift from the GetData girlies ππ mwah, go write some encodings, ily π¦πΈπ
π¦ where this page comes from
- debian bookworm: libgetdata-doc 0.11.0-6
- debian trixie: libgetdata-doc 0.11.0-15
- fedora 43: getdata-devel 0.11.0-13.fc43 Β· GPL-2.0-or-later
- fedora 43: getdata-devel 0.11.0-13.fc43 Β· GPL-2.0-or-later
- fedora 44: getdata-devel 0.11.0-14.fc44 Β· GPL-2.0-or-later
- fedora 44: getdata-devel 0.11.0-14.fc44 Β· GPL-2.0-or-later
- nixos 26.05: getdata 0.11.0
- nixpkgs unstable: getdata 0.11.0
- ubuntu jammy: libgetdata-doc 0.11.0-3ubuntu1
- ubuntu noble: libgetdata-doc 0.11.0-13
- ubuntu questing: libgetdata-doc 0.11.0-15
- ubuntu resolute: libgetdata-doc 0.11.0-17build1
- ubuntu stonking: libgetdata-doc 0.11.0-17build2
- Copyright (C) 2016 D. V. Wiebe
- Copyright (C) 2014, 2016 D. V. Wiebe
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms