LZ4_compress_HC(9)
okay so bestie, welcome to the LZ4_compress_HC(9) page from the Kernel API Manual β itβs all about compressing data from src into dst with the HC algorithm, and the whole vibe is βpowerful but slower, know what youβre doingβ π
β¨
π NAME π
LZ4_compress_HC β compress data from src into dst, using the HC algorithm.
β¨ SYNOPSIS β¨
int LZ4_compress_HC (const char *src , char *dst , int srcSize , int
dstCapacity , int compressionLevel , void *wrkmem );
π«Ά ARGUMENTS π«Ά
srcβ source address of the original data. This is where the uncomressed data lives, bestie πdstβ output buffer address of the compressed data. This is where the glow-up happens πsrcSizeβ size of the input data. Max supported value isLZ4_MAX_INPUT_SIZE, so donβt try to be extra beyond that πdstCapacityβ full or partial size of buffer'dst', which must be already allocated. Like, allocate first, compress second, no shortcuts πcompressionLevelβ recommended values are between4and9, although any value between1andLZ4HC_MAX_CLEVELwill work. Values>LZ4HC_MAX_CLEVELbehave the same as16. Lowkey pick your level with intention πwrkmemβ address of the working memory. This requires'wrkmem'of sizeLZ4HC_MEM_COMPRESS. Donβt forget the scratch space, bestie π§ β¨
π¦ DESCRIPTION π¦
Compress data from 'src' into 'dst', using the more powerful but slower "HC" algorithm. Itβs giving main character compression β stronger, but it takes its time πΈ
Compression is guaranteed to succeed if dstCapacity >= LZ4_compressBound(srcSize). Thatβs the capacity check to care about, fr fr π₯
π RETURN π
the number of bytes written into 'dst' or 0 if compression fails. So if you get 0, bestie, it did not slay π
π SEE ALSO π
Kernel file ./include/linux/lz4.h β and please also peek at these iconique pages:
LZ4_compressBound(9)LZ4_compress_default(9)LZ4_compress_fast(9)LZ4_compress_destSize(9)LZ4_decompress_fast(9)LZ4_decompress_safe(9)LZ4_decompress_safe_partial(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)
okay thatβs the whole page, bestie β from ./include/linux, dated October 2026, mwah πβ¨
π¦ 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