uint16_pack(3)
π uint16_pack(3) β the little-endian glow-up π
okay bestie, welcome to uint16_pack(3), straight out of the Library Functions Manual. she's short, she's sweet, she writes bytes. let's get into it π
β¨ NAME β¨
uint16_pack β write an unsigned little-endian 16-bit integer π
πΈ SYNTAX πΈ
#include <libowfat/uint16.h>
uint16 u;
void uint16_pack(char s[2],uint16 u);
like, that's the whole vibe. include the header, declare your uint16 u, and you're ready π¦
π«Ά DESCRIPTION π«Ά
so uint16 is a 16-bit unsigned integer type, and normally it's either unsigned int or unsigned long. ngl, it's just vibing as whichever one your system feels like that day β¨
and then uint16_pack? she portably writes a uint16 u to s in little-endian byte order. that's it. that's the whole job. no cap, she just does it portably, every time, on every machine, and honestly? iconic π
lowkey important: it's little-endian specifically, so if you were expecting big-endian bestie, you're in the wrong function β go say hi to uint16_pack_big(3) instead π
π SEE ALSO π
uint16_unpack(3)β the reverse queen, reads the bytes back out πuint16_pack_big(3)β same energy, opposite endianness π§
that's the whole page, fr fr. this was uint16_pack(3) from the Library Functions Manual β no date on this one, she's timeless like that β stay little-endian, stay slay, mwah ππΈπ
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms