zstd_get_cparams(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… zstd_get_cparams(9) β€” kernel API manual, but make it make sense

okay so bestie, welcome to the Kernel API Manual ✨ β€” this one's a little function called zstd_get_cparams and honestly? it's giving "personal shopper for compression settings." πŸ›οΈ Let's get into it.


🌸 NAME 🌸

zstd_get_cparams β€” returns zstd_compression_parameters for the selected level πŸŽ€

Like, you tell it a level, and it goes and fetches you the matching zstd_compression_parameters. That's the whole vibe. No cap.


✨ SYNOPSIS ✨

zstd_compression_parameters zstd_get_cparams (int level , unsigned long long estimated_src_size , size_t dict_size );

That's the whole signature, copy it exactly, don't @ me. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • level β€” the compression level. yes literally just that. the level. of compression. 🫢
  • estimated_src_size β€” the estimated source size you're about to compress, or 0 if you genuinely have no idea. it's okay, nobody knows their size upfront sometimes 😭
  • dict_size β€” the dictionary size. that's it. that's the arg. πŸŽ€

πŸ‘‘ RETURN πŸ‘‘

It hands you back the selected zstd_compression_parameters. icon behaviour, honestly. ⭐


🌈 SEE ALSO 🌈

okay this is the part where the manpage goes full main-character-ensemble-cast, and we are NOT cutting anyone from the group chat. everybody gets their mention:

Kernel file ./include/linux/zstd.h β€” plus:

zstd_compress_bound(9), 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_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)

like, the whole zstd family reunion. bring a dish. πŸ“


πŸ’€ friendly reminder that every single one of those is a different function, so don't go merging them in your head just because the list is long. iykyk.

okay that's the page!! mwah πŸ’– huge thank you to ./include/linux for being the source, and shoutout to October 2026 for the date stamp β€” this lil manual page is officially signed, sealed, and slayed. periodt. πŸ§šβœ¨πŸ’œ

πŸ“¦ where this page comes from