zstd_compress_stream(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… zstd_compress_stream(9) β€” the Kernel API Manual, bestie edition

okay so this page lives in the Kernel API Manual (section 9, kernel-space girlies only) and it's literally titled zstd_compress_stream β€” streaming compress some of input into output. yes, "some of". we'll get to that. 🫢


✨ NAME ✨

zstd_compress_stream β€” streaming compress some of input into output


πŸŽ€ SYNOPSIS πŸŽ€

size_t zstd_compress_stream (zstd_cstream *cstream , zstd_out_buffer
*output , zstd_in_buffer *input );

🌸 ARGUMENTS 🌸

  • cstream β€” The zstd streaming compression context. your little compression situation, all bundled up. 🧚
  • output β€” Destination buffer. output->pos gets updated to show how much compressed data was written. so it literally tells on itself, in a good way. ✨
  • input β€” Source buffer. input->pos gets updated to show how much data was read. important though: it may not consume the entire input β€” that's the case where input->pos < input->size β€” and it is 100% up to the caller to present the remaining data again. no cap, that's your job, not mine. 😭

πŸ¦‹ DESCRIPTION πŸ¦‹

The input and output buffers may be any size. any. size. go off, buffers, be free. πŸ’…

It's guaranteed to make some forward progress if input and output are not empty. like, it will do something, okay? it ate and it's not leaving crumbs.


πŸ”₯ RETURN πŸ”₯

A hint for the number of bytes to use as the input for the next function call β€” or an error, which you can check with zstd_is_error. yes bestie, always check. πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/zstd.h, plus the whole friend group:

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_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)


ngl that SEE ALSO list is giving main character energy. read it, don't skim it. 🌈

⭐ ok that's the whole page!! this one came out of ./include/linux and the version is dated October 2026 β€” so yeah, it's from the future, slay. bye bestie, go compress something streamy πŸ’–πŸŽ€

πŸ“¦ where this page comes from