LZ4_resetStreamHC(9)
π LZ4_resetStreamHC β like, the Kernel API Manual girlies know (section 9, bestie)
okay so real talk, this one's a lil kernel API function from the Kernel API Manual, and honestly? it's giving "reset the vibes so the compression can start fresh" and we're obsessed.
β¨ NAME β¨
LZ4_resetStreamHC β the glow-up function that inits an allocated LZ4_streamHC_t structure π
β¨ SYNOPSIS β¨
void LZ4_resetStreamHC (LZ4_streamHC_t *streamHCPtr , int
compressionLevel );
like, that's the whole signature, no cap. void return, two args, she's simple and she serves.
β¨ ARGUMENTS β¨
streamHCPtrβ a pointer to theLZ4_streamHC_tstructure. yes queen, the pointer. hand her over π«ΆcompressionLevelβ okay so the recommended values are between4and9(that's the sweet spot, highkey), although literally any value between1andLZ4HC_MAX_CLEVELwill work. and if you're feeling chaotic: values>LZ4HC_MAX_CLEVELbehave the same as16. periodt. π₯
β¨ DESCRIPTION β¨
bestie listen β an LZ4_streamHC_t structure can be allocated once and re-used multiple times. that's the whole point, she's reusable, she's sustainable, she's main character energy β¨
use this function to init an allocated LZ4_streamHC_t structure and start a new compression. so like, you don't allocate a new one every time, you just hit reset and go again. iconic behavior, honestly π
ngl, this is the "new compression, who dis" button. wipe the slate, keep the memory, slay.
β¨ SEE ALSO β¨
- Kernel file
./include/linux/lz4.h 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_compress_HC(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)
and that's the page, bestie π¦ this lil cutie lives in ./include/linux and the version we're looking at is dated October 2026 β so yeah, future girlies are still resetting streams π mwah, study hard, iykyk π
π¦ 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