uint32_unpack(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

πŸ’– uint32_unpack(3) β€” Library Functions Manual πŸ’–

okay bestie, gather round, we're reading raw bytes today and it's gonna be ✨immaculate✨


🌸 NAME 🌸

uint32_unpack β€” read an unsigned little-endian 32-bit integer


πŸŽ€ SYNTAX πŸŽ€

first, you gotta pull in the header, no cap:

#include <libowfat/uint32.h>

uint32 u;

void uint32_unpack(const char s[4],uint32 *u);

that's the whole vibe. u is your little container, and the function fills it up. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so like, uint32 is a 32-bit unsigned integer type β€” it's normally either unsigned int or unsigned long, depending on what your machine woke up feeling like today. πŸ’…

and uint32_unpack? she's the portable girlie. she reads a uint32 as stored on a little-endian architecture from s, and writes it into u in the native byte order. so whatever endianness your machine is on, you get a value you can actually use. it's giving considerate. it's giving thoughtful. we stan. πŸ’–


✨ SEE ALSO ✨


that's it bestie, that's the whole page, go forth and unpack responsibly πŸŒˆπŸ’œ

signing off from the Library Functions Manual, where uint32_unpack(3) lives rent free β€” mwah, ily, bye πŸ‘‘πŸ’