LZ4_compressBound(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… LZ4_compressBound πŸ’…

okay bestie, so this page is from the Kernel API Manual, and the star of the show is LZ4_compressBound β€” she's that girl who tells you how much room to book before the party even starts πŸŽ€


✨ NAME ✨

LZ4_compressBound β€” max output size in worst case scenarios πŸ”₯

like, how big can the output possibly get when everything goes wrong? she knows. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

int LZ4_compressBound (size_t isize );

that's it. one argument. she's lowkey minimal and we stan πŸ’…


🌸 ARGUMENTS 🌸

  • isize β€” the size of the input data, aka how much stuff you're trying to squeeze in there πŸ“

πŸ‘‘ RETURN πŸ‘‘

she hands you back the max size that LZ4 may output in a "worst case" scenario β€” and yes, that means data not compressible 😭 so nothing shrinks, nothing slays, everything is literally just itself and you still need the full buffer.

bestie pls: this is the worst case, not the typical case. allocate for the worst case and your future self will thank you 🫢

🌈 SEE ALSO 🌈

the whole lz4 friend group, plus the header they all live in: the Kernel file ./include/linux/lz4.h πŸ’–

twenty of them. she has a big family. it's giving main character energy πŸ‘‘


mwah πŸ’‹ that's the whole page β€” brought to you from ./include/linux, dated October 2026, and officially filed under LZ4_compressBound(9). go forth and size your buffers correctly, icon ✨

πŸ“¦ where this page comes from