zstd_compress_bound(9)
π 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:
zstd_is_error(9)zstd_get_error_code(9)zstd_get_error_name(9)zstd_min_clevel(9)zstd_max_clevel(9)zstd_default_clevel(9)zstd_get_params(9)zstd_get_cparams(9)zstd_cctx_set_param(9)zstd_cctx_workspace_bound(9)zstd_cctx_workspace_bound_with_ext_seq_prod(9)zstd_init_cctx(9)zstd_compress_cctx(9)zstd_create_cctx_advanced(9)zstd_free_cctx(9)zstd_create_cdict_byreference(9)zstd_free_cdict(9)zstd_compress_using_cdict(9)zstd_dctx_workspace_bound(9)zstd_init_dctx(9)zstd_decompress_dctx(9)zstd_create_ddict_byreference(9)zstd_free_ddict(9)zstd_create_dctx_advanced(9)zstd_free_dctx(9)zstd_decompress_using_ddict(9)zstd_cstream_workspace_bound(9)zstd_cstream_workspace_bound_with_ext_seq_prod(9)zstd_init_cstream(9)zstd_reset_cstream(9)zstd_compress_stream(9)zstd_flush_stream(9)zstd_end_stream(9)zstd_dstream_workspace_bound(9)zstd_init_dstream(9)zstd_reset_dstream(9)zstd_decompress_stream(9)zstd_find_frame_compressed_size(9)zstd_get_frame_header(9)zstd_compress_sequences_and_literals(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms