LZ4_saveDictHC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’Ύ LZ4_saveDictHC(9) β€” Save static dictionary from LZ4HC_stream πŸ’Ύ

okay bestie, this is the Kernel API Manual page for LZ4_saveDictHC(9), and we’re about to make dictionary-saving make sense. no cap. 🫢

πŸ’– NAME πŸ’–

LZ4_saveDictHC - Save static dictionary from LZ4HC_stream.

✨ SYNOPSIS ✨

int LZ4_saveDictHC (LZ4_streamHC_t *streamHCPtr , char *safeBuffer , int
maxDictSize );

That signature is the whole vibe check, bestie. πŸ’…

πŸŽ€ ARGUMENTS πŸŽ€

  • streamHCPtr β€” pointer to the LZ4HC_stream_t structure. main character energy.
  • safeBuffer β€” buffer to save dictionary to, must be already allocated. don’t forget this part. πŸ™ˆ
  • maxDictSize β€” size of safeBuffer. the limit is real. ✨

πŸ’… DESCRIPTION πŸ’…

Okay so here’s the tea: if a previously compressed data block is not guaranteed to remain available at its memory location, save it into a safer place (char *safeBuffer). That’s the whole save-dict moment. πŸ’–

πŸ”₯ NOTE πŸ”₯

You don’t need to call LZ4_loadDictHC afterwards β€” the dictionary is immediately usable, so you can therefore call LZ4_compress_HC_continue. slay, no extra step. 🧚

πŸ’– RETURN πŸ’–

saved dictionary size in bytes (necessarily <= maxDictSize), or 0 if error. that’s the whole return vibe. 😭

🌈 SEE ALSO 🌈

Kernel file ./include/linux/lz4.h β€” and bestie, here’s the whole friend group:

mwah πŸ’‹ from ./include/linux, dated October 2026, and this is literally the LZ4_saveDictHC(9) page. periodt. 🫢
πŸ“¦ where this page comes from