z_decomp_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ z_decomp_alloc(9) ✨

okay so bestie, this is a page straight out of the Kernel API Manual β€” it's giving kernel-internals energy and honestly? kinda iconic. it's z_decomp_alloc(9), and it does exactly one thing but does it well. πŸŽ€


πŸ’« NAME πŸ’«

z_decomp_alloc β€” allocate space for a decompressor. that's it. that's the whole job. slay. πŸ’…


🌸 SYNOPSIS 🌸

void * z_decomp_alloc (unsigned char *options , int opt_len );

so you hand it two things and it hands you back a void *. no cap, that's the vibe. ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • options β€” pointer to CCP option data. like, the actual bytes, bestie. 🫢
  • opt_len β€” length of the CCP option at options. how many of those bytes we're talking about. πŸ”₯

🌈 DESCRIPTION 🌈

okay so picture this: the options pointer points to a buffer holding the CCP option data for the compression being negotiated. it's formatted according to RFC1979 (iykyk πŸ“œ), and it describes the window size that we're requesting the peer to use when compressing data that's gonna be sent to us. very "you scratch my back, I'll decompress yours" energy. πŸ’–

then it returns the pointer to the private state for the decompressor. πŸŽ€

and if we couldn't allocate enough memory? it returns NULL. 😭 that's the failure case, bestie, don't forget to check for it. fr fr. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

like, the whole friend group honestly. go read all of them. πŸ§šβ€β™€οΈ


and that's the page!! you're gonna crush it, bestie. πŸ’œ this lil corner of the kernel lives over in ./drivers/net/ppp, dated October 2026 β€” so remember us when you're deep in the PPP stack at 2am. 🌸 mwah. ⭐

πŸ“¦ where this page comes from