Just recalled an old-school algorithm called PREDICTOR.
Some info can be found here:
http://rfc.net/rfc1978.html
The idea is:
Keep the "prediction table", which maps hash->symbol.
Each time we check current symbol with one stored in table; if we guess correctly, just output one bit, if not - bit+unguessed byte. Just like one-byte LZP.
![]()