zstd_compres...and_literals(9)
π zstd_compress_sequences_and_literals β a kernel API glow-up
Okay bestie, welcome to the zstd_compres...and_literals(9) page from the Kernel API Manual β¨ no cap, the name is a whole mouthful (the man page legit truncates it, iconic), but the function itself is zstd_compress_sequences_and_literals β and it does exactly what it says on the tin: it compresses an array of zstd_sequence plus literals. Slay. π
β¨ NAME β¨
zstd_compress_sequences_and_literals β compress an array of zstd_sequence and literals π
πΈ SYNOPSIS πΈ
size_t zstd_compress_sequences_and_literals (zstd_cctx *cctx , void* dst
, size_t dst_capacity , const zstd_sequence *in_seqs , size_t
in_seqs_size , const void* literals , size_t lit_size , size_t
lit_capacity , size_t decompressed_size );
Nine parameters, bestie. Nine. She's high-maintenance but she's worth it π
π¦ ARGUMENTS π¦
Every single one, laid out like a group chat roll call:
cctxβ the zstd compression context. Your main character. πdstβ the buffer you're compressing the data into.dst_capacityβ the size of the destination buffer. Don't be weird about it, just tell her how big she is.in_seqsβ the array ofzstd_sequenceto compress. The whole squad.in_seqs_sizeβ how many sequences are actually inin_seqs. Count your friends, girl.literalsβ the literals associated with the sequences being compressed. They come as a pair, iykyk π«Άlit_sizeβ the size of the literals in theliteralsbuffer.lit_capacityβ the size of the literals buffer. (Yes,lit_sizeandlit_capacityare two different things. Both matter. Periodt.)decompressed_sizeβ the size of the input data.
π₯ RETURN π₯
She returns the compressed size β or an error, if things went sideways π. You can vibe-check whether it's an error with zstd_is_error.
π SEE ALSO π
Kernel file ./include/linux/zstd.h β go read it, it's giving lore π
And the whole extended friend group, no one left out:
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_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)
Ngl bestie, this one lives in the kernel tree under./include/linuxβ that's the source, and the version stamp is October 2026. Also she's a9section page, so kernel API only, no userland shenanigans π
Anyway, that's the whole page, you ate it up, go compress something ππ bye bestie!
π¦ 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