Giter Club home page Giter Club logo

Comments (14)

ValentinH avatar ValentinH commented on July 24, 2024

Same issue here with the python-version: https://github.com/gkovacs/lz-string-python

from lz-string.

pieroxy avatar pieroxy commented on July 24, 2024

It looks as if the PHP and python versions don't produce the correct string (and can't parse it either.) Wouldn't it be easier and cleaner to fix the PHP and python version?

from lz-string.

CityofStw avatar CityofStw commented on July 24, 2024

From what I can tell, both the PHP and Python versions support UTF8 on the (de)compressToBase64 functions, which is where the difference seems to stem from. So it is either remove that support from those, or add it to the JS version.

from lz-string.

CityofStw avatar CityofStw commented on July 24, 2024

Oddly enough, if you go back to version 1.3.7 of the JS, the To/From Base64 functions match what is in PHP and Python. So far that seems to have resolved my problem, still testing though.

from lz-string.

pieroxy avatar pieroxy commented on July 24, 2024

Ah, I see, you're right. Version 1.3.8 did introduce a change in how the Base64 is generated, introducing small changes. It is fully compatible both ways with the JS version (all versions can decompress the result of all versions).

But I didn't think of the various ports.

So you're completely right: version 1.3.7 of the JS library will fix your problem.

I'll look into the various ports and apply the proper fixes in the coming days.

from lz-string.

rufushuang avatar rufushuang commented on July 24, 2024

Glad to see this issue?

pieroxy you really found out the porting version incompatible problem, which cause me some trouble when I port 1.4.4 version to java. https://github.com/rufushuang/lz-string4java

So, what's your opinion if one want to port a version with Base64 and uri support?
Or some version compatible hint or so?

from lz-string.

pieroxy avatar pieroxy commented on July 24, 2024

I am going to rewrite a reference implementation (https://github.com/pieroxy/lz-string/blob/master/reference/lz-string-1.0.2.js at the moment) which will include the newer base64 routine. This is the version you're supposed to port whenever porting to any language as mentioned in the doc.

from lz-string.

netgfx avatar netgfx commented on July 24, 2024

Is this issue resolved with the latest js version and the PHP port?

from lz-string.

CityofStw avatar CityofStw commented on July 24, 2024

I’d found a mixture of versions which worked for me, and haven’t updated.

When I get a chance to revisit, I may try the newest, but not sure when that would be.

Gene Comer
Application Developer & Network Specialist

From: Michael Dobekidis [mailto:[email protected]]
Sent: Monday, December 28, 2015 11:23 AM
To: pieroxy/lz-string
Cc: Gene Comer
Subject: Re: [lz-string] Base64 issue, lz-string.js -> lz-string-php (#62)

Is this issue resolved with the latest js version and the PHP port?


Reply to this email directly or view it on GitHubhttps://github.com//issues/62#issuecomment-167606881.

from lz-string.

nullpunkt avatar nullpunkt commented on July 24, 2024

Hi, just to inform you: i rewrote the php implementation to be compatible with current js version (and just to let you know: added composer support and wrote some unit tests to be more stable).

from lz-string.

SiliconValet avatar SiliconValet commented on July 24, 2024

Any updates here?

from lz-string.

pieroxy avatar pieroxy commented on July 24, 2024

From what I understand nullpunkt has written a php version that is compatible with the latest release...

What are your expectations?

from lz-string.

SiliconValet avatar SiliconValet commented on July 24, 2024

I guess I misunderstood the problem. I thought that the changes introduced in 1.3.8 caused the problems and that nullpunkt had simply worked around it. That appears to be the narrative above.

I wanted the assurance of portability across implementations, which to me means that I've got to use 1.3.7.

from lz-string.

pieroxy avatar pieroxy commented on July 24, 2024

I'm closing the issue as I don't own the various ports of lz-string.

from lz-string.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.