LZ4_compress_fast_continue(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the Kernel API Manual page for LZ4_compress_fast_continue β€” section 9 energy, no cap. πŸ’…πŸ«Ά

✨ NAME ✨

LZ4_compress_fast_continue β€” compress src using data from previously compressed blocks as a dictionary. It's giving "reuse the lore" but for compression. πŸ’–

πŸ¦‹ SYNOPSIS πŸ¦‹

int LZ4_compress_fast_continue (LZ4_stream_t *streamPtr , const char
       *src , char *dst , int srcSize , int maxDstSize , int acceleration );

πŸŽ€ ARGUMENTS πŸŽ€

  • streamPtr β€” pointer to the previous LZ4_stream_t structure. It's the bestie that remembers the last block. 🫢
  • src β€” source address of the original data. The raw material, the main character.
  • dst β€” output buffer address of the compressed data, which must be already allocated. No last-minute "alloc bestie?" okay? 😭
  • srcSize β€” size of the input data. Max supported value is LZ4_MAX_INPUT_SIZE. Do not exceed it, fr fr.
  • maxDstSize β€” full or partial size of buffer dest which must be already allocated. Yes, the original says dest here β€” we keep it exactly. πŸ’…
  • acceleration β€” acceleration factor. That's the whole vibe of this one.

πŸ’– DESCRIPTION πŸ’–

Compress buffer content src, using data from previously compressed blocks as a dictionary to improve compression ratio. The previous blocks are doing unpaid dictionary labor, and honestly they ate. πŸ”₯

Important, bestie: previous data blocks are assumed to still be present and unmodified! Like, do not move them, do not edit them, do not let them vanish. They gotta stay right there. 😭

If maxDstSize >= LZ4_compressBound(srcSize), compression is guaranteed to succeed, and runs faster. That's the good path. ✨

🌈 RETURN 🌈

Number of bytes written into buffer dst or 0 if compression fails. So 0 means it did not slay. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/lz4.h β€” and the whole friend group:


signed off with love by source ./include/linux, dated October 2026, and filed under LZ4_compress_fast_continue(9) πŸŽ€πŸ’–

πŸ“¦ where this page comes from