Comments (14)
Same issue here with the python-version: https://github.com/gkovacs/lz-string-python
from lz-string.
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.
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.
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.
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.
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.
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.
Is this issue resolved with the latest js version and the PHP port?
from lz-string.
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.
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.
Any updates here?
from lz-string.
From what I understand nullpunkt has written a php version that is compatible with the latest release...
What are your expectations?
from lz-string.
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.
I'm closing the issue as I don't own the various ports of lz-string.
from lz-string.
Related Issues (20)
- Crash with large strings when running on Hermes (React Native)
- Is there a way to allow custom dictionaries? HOT 9
- How to realize that only specified characters are allowed to appear in the compression result? HOT 1
- LZ-String port to current typescript HOT 9
- Tag for v1.5.0 HOT 2
- Version 2 TODO list HOT 15
- Feature request: compress to source-compatible character set HOT 1
- New port for a linux executable HOT 1
- Can utf-8 codes be avoided in the output? HOT 10
- `decompressFromBase64` can return `null` HOT 7
- Docs: JSPerf.com links are no longer valid
- Docs: A Complete Demo for various compression/decompression HOT 3
- Docs: TSDoc HOT 3
- License Inconsistencies HOT 5
- Community Question: Breaking Changes and Version 2! HOT 10
- [email protected] build with warnings HOT 4
- Feature request: a non minified js file as a result of building v2 HOT 2
- Chrome virus warning with compressToEncodedURIComponent URL HOT 2
- CLI support for decompressing base64 encoded files HOT 1
- Please investigate the slow (irresponsible) LZString issue in Edge HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lz-string.