pieroxy / lz-string

LZ-based compression algorithm for JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Confused about compatibility between browser and server versions

alexandernst opened this issue · comments

In the README there is a section with a warning stating that version 1.3.8 (and later?) should be avoided if the library is being used to compress on the client side (browser) and decompressed on the server side (python in my specific case).

Is this correct? Should I stay on 1.3.7 on the client side and use https://github.com/eduardtomasek/lz-string-python/blob/master/lzstring.py on the backend?

Hello

Yes, I would advise to stay at version 1.3.7. There was a bug in the 1.3.7 that made the lib sometimes waste one or two characters. It is fixed but most of the server side ports were developed with this bug so it's best to stay as 1.3.7 IMO.

As always, do a little testing to make your own opinion.

Just in case anybody ends up here while searching for the same, another Python lz-string lib claims to be compatible with 1.4.4: https://github.com/marcel-dancak/lz-string-python

Thanks for the link. I added it to the README.