LZJB in pure functional Haskell