Show HN: FSP2 Tested on excerpt "Romeo and Juliet" impressive compresion results
2 Forgret 4 9/11/2025, 11:36:23 AM
Hi HN, I want to share my updated FSP (Find Similar Patterns) v2 text compression algorithm. I tested it on a non-trivial excerpt from Romeo and Juliet, and it achieved impressive results: original size 437 bytes, compressed size 358 bytes, compression ratio 1.22. Unlike traditional methods like LZMA or Huffman, FSP v2 searches for repeating 3–5 character patterns, storing references (REF) alongside literal characters (LITERAL). This allows it to compress real-world text, maintain lossless decompression, and achieve compressed sizes smaller than the original. The algorithm works on any byte stream or text and can scale to larger files, potentially outperforming classical compression on texts with repetitive or near-repetitive patterns. Code and implementation details are available upon request.
GitHub: https://github.com/Ferki-git-creator/fsp
Website(more info): https://ferki-git-creator.github.io/fsp/
If I made a mistake somewhere, please tell me.
Note that on this particular small sample of text, Zstandard `zstd -13` compresses it to 288 bytes, and with default settings, 292 bytes. Brotli using default settings compresses it to 236 bytes.
It's definitely interesting that your method competes with Zip and such though. Keep it up!