zstd_dstream...kspace_bound(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… zstd_dstream...kspace_bound(9)

okay so first things first, bestie โ€” the full title got cut off in the header (it be like that sometimes), but this page lives in the Kernel API Manual and it's all about one function. Let's get into it ๐Ÿซถ


โœจ NAME โœจ

zstd_dstream_workspace_bound โ€” the function that tells you how much memory you need to initialize a zstd_dstream. literally it's the "how much room do I need" girlie of the zstd decompression-stream world ๐Ÿ’–


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

size_t zstd_dstream_workspace_bound (size_t max_window_size );

like, that's the whole signature. one arg, one size back. cute and efficient ๐Ÿ’…


๐ŸŒธ ARGUMENTS ๐ŸŒธ

  • max_window_size โ€” the maximum window size allowed for compressed frames. that's it, that's the whole vibe check. you tell it the biggest window you'll tolerate, it does math ๐Ÿงฎโœจ

๐ŸŽ€ RETURN ๐ŸŽ€

it hands you back a lower bound on the size of the workspace that is passed to zstd_init_dstream. ngl, key word here is lower bound โ€” it's a minimum, not a promise from the universe ๐Ÿ‘‘ so don't go assuming it's the exact number, just the floor you can't go under.


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

okay so this is the part where the page goes full main character and name-drops the entire zstd friend group. every single one, no cap:

and where does the actual header live? Kernel file ./include/linux/zstd.h โ€” that's the spot, go read it, it's giving documentation ๐Ÿ’œ


๐Ÿ’€ friendly reminder: the return value is a lower bound, so size your workspace at least that big before handing it to zstd_init_dstream. underestimating is not the slay you think it is.

anyway that's the page!! source is ./include/linux, part of the Kernel API Manual, dated October 2026 โ€” mwah, bye bestie, go decompress something ๐Ÿงšโ€โ™€๏ธ๐Ÿ’–๐ŸŽ€

๐Ÿ“ฆ where this page comes from