zstd_compress_bound(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… zstd_compress_bound β€” worst-case size energy

okay so bestie, welcome to the Kernel API Manual page for zstd_compress_bound(9) ✨ this is the little function that tells you, fr fr, how big your compressed buffer could possibly get in the absolute worst case scenario πŸ’€ no surprises, no cap.


πŸ¦‹ SYNOPSIS

size_t zstd_compress_bound (size_t src_size );

that's it, that's the whole vibe πŸŽ€ one argument, one return value, zero drama.


🌸 ARGUMENTS

  • src_size β€” the size of the data you're about to compress πŸ’– like, how many bytes are we working with, bestie?

πŸ‘‘ RETURN

the maximum compressed size in the worst case scenario 🌈 literally the upper bound, the "how big should I make my buffer" answer, the icon itself.

ngl bestie, "worst case" is doing a lot of work there β€” allocate for this and you're safe, periodt πŸ’…

πŸ”₯ SEE ALSO

okay so here's the whole friend group 🫢 the kernel file lives at ./include/linux/zstd.h, and these are all the siblings:

40 besties, go say hi πŸ˜­πŸ’œ


✨ that's the whole page, mwah ✨

sign-off time, iykyk: this gem lives under ./include/linux, and it's dated October 2026 β€” future icon behaviour tbh β­πŸ’… πŸŽ€

πŸ“¦ where this page comes from