uint64_pack(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

okay so bestie, meet uint64_pack β€” she writes an unsigned little-endian 64-bit integer. that's it, that's her whole thing, and she does it flawlessly. periodt πŸ’…


✨ SYNTAX ✨

#include <libowfat/uint64.h>

uint64 u;

void uint64_pack(char s[4],uint64 u);

like, that's the whole call. include the header, declare your uint64 u;, and call her with a char buffer s and your value u. iconic behavior fr fr 🌸


πŸ¦‹ DESCRIPTION πŸ¦‹

So first things first: uint64 is a 64-bit unsigned integer type. that's the type we're playing with here. it's giving very-many-bits energy. πŸ‘‘

And uint64_pack? She portably writes a uint64 u to s in little-endian byte order. notice the word portably β€” that's lowkey the whole flex of this function. you hand her your u and your buffer s, and she lays those bytes down in little-endian order, no drama, no surprises. ✨

little-endian byte order, bestie. she said what she said and she meant it. 🫢

πŸŽ€ SEE ALSO πŸŽ€

go read those too, they're her sisters and they also ate πŸ’…


and that's the page!! this lil masterpiece lives in the Library Functions Manual, section 3, and she answers to uint64_pack(3) β€” forever and always πŸ’œ bye bestie, go pack some integers πŸ¦‹β­πŸŽ€