LZ4_compress_fast(9)
Hiii bestie π welcome to the LZ4_compress_fast(9) page β this is the Kernel API Manual, and weβre about to make this acceleration param make sense, fr fr. β¨
πΈ NAME πΈ
LZ4_compress_fast β itβs literally as LZ4_compress_default, providing an acceleration param. Same bestie energy, but with a speed dial. π
β¨ SYNOPSIS β¨
Okay, the exact signature is giving main character energy:
int LZ4_compress_fast (const char *source , char *dest , int inputSize ,
int maxOutputSize , int acceleration , void *wrkmem );
π ARGUMENTS π
sourceβ source address of the original data. Thatβs where the original data starts, bestie. π¦destβ output buffer address of the compressed data. The compressed output goes here. πinputSizeβ size of the input data. Max supported value isLZ4_MAX_INPUT_SIZE. πmaxOutputSizeβ full or partial size of buffer'dest'which must be already allocated. No surprise mallocs, okay? πaccelerationβ acceleration factor. This is the speed dial, lowkey. π₯wrkmemβ address of the working memory. This requires'workmem'ofLZ4_MEM_COMPRESS. π§
π DESCRIPTION π
Same as LZ4_compress_default, but it allows you to select an "acceleration" factor. The larger the acceleration value, the faster the algorithm, but also the lesser the compression. Itβs a trade-off, no cap. βοΈ
It can be fine tuned, with each successive value providing roughly +~3% to speed. An acceleration value of "1" is the same as regular LZ4_compress_default. Values <= 0 will be replaced by LZ4_ACCELERATION_DEFAULT, which is 1. Periodt. π«
π₯ RETURN π₯
Number of bytes written into buffer 'dest' (necessarily <= maxOutputSize) or 0 if compression fails. Thatβs the whole vibe: bytes written, or a dramatic little zero. π
π¦ SEE ALSO π¦
Kernel file ./include/linux/lz4.h β and the whole friend group is LZ4_compressBound(9), LZ4_compress_default(9), LZ4_compress_destSize(9), LZ4_decompress_fast(9), LZ4_decompress_safe(9), LZ4_decompress_safe_partial(9), LZ4_compress_HC(9), LZ4_resetStreamHC(9), LZ4_loadDictHC(9), LZ4_compress_HC_continue(9), LZ4_saveDictHC(9), LZ4_resetStream(9), LZ4_loadDict(9), LZ4_saveDict(9), LZ4_compress_fast_continue(9), LZ4_setStreamDecode(9), LZ4_decompress_safe_continue(9), LZ4_decompress_fast_continue(9), LZ4_decompress_safe_usingDict(9), LZ4_decompress_fast_usingDict(9). π«Ά
Cute sign-off: this page comes from./include/linuxπΈ, datedOctober 2026, forLZ4_compress_fast(9). Bye bestie, go compress something iconic πβ¨
π¦ 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