zstd_get_cparams(9)
π 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, or0if 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
- 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