Then there's the Lempel-Ziv compression!
This includes 2 variants of a routine to locate the longest match from a hashmap, possibly a microoptimized LZ-pass favoring how long it takes over how few bytes it outputs, some serialization utils for outputting LZ-results, & a normal implementation maintaing a ringbuffer & consulting (with shortcuts) the lookup routine to which backrefs or literals it should output, & a routine to output remaining text from the buffer.
4/5!