zstd_decompress_stream(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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.pos is updated to indicate how much decompressed data was written. slay.
  • input β€” source buffer. input.pos is updated to indicate how much data was read. Note that it may not consume the entire input, in which case input.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 🌈


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