zstd_decompress_stream(9)
π NAME π
okay bestie, this is the zstd_decompress_stream(9) page from the Kernel API Manual, and she's here to streaming decompress some of input into output. No cap, that's literally the whole gig: zstd_decompress_stream streams decompressed output out of your input. Iconic behavior. π
β¨ SYNOPSIS β¨
size_t zstd_decompress_stream (zstd_dstream *dstream , zstd_out_buffer
*output , zstd_in_buffer *input );
π«Ά ARGUMENTS π«Ά
dstreamβ the zstd streaming decompression context. That's your girl's state.outputβ destination buffer.output.posis updated to indicate how much decompressed data was written. slay.inputβ source buffer.input.posis updated to indicate how much data was read. Note that it may not consume the entire input, in which caseinput.pos < input.size, and it's up to the caller to present remaining data again.
πΈ DESCRIPTION πΈ
okay so the input and output buffers may be any size β literally any size, bestie. Guaranteed to make some forward progress if input and output are not empty. That's the vibe check. β¨
zstd_decompress_stream will not consume the last byte of the frame until the entire frame is flushed. That's the caveat you cannot skip, iykyk. π«Ά
π₯ RETURN π₯
Returns 0 iff a frame is completely decoded and fully flushed. Otherwise returns a hint for the number of bytes to use as the input for the next function call or an error, which can be checked using zstd_is_error. The size hint will never load more than the frame, fr fr.
π SEE ALSO π
- Kernel file
./include/linux/zstd.h 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_find_frame_compressed_size(9)zstd_get_frame_header(9)zstd_compress_sequences_and_literals(9)
kisses and sparkles, your kernel bestie π β source/version: ./include/linux; date: October 2026; manual page: zstd_decompress_stream(9). 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