Comments (4)
Please do not use the compress
method, which produces an output that cannot be reliably stored in some some browsers, as specified in the documentation. Use compressToUTF16
instead (and decompressFromUTF16
to decompress)
from lz-string.
got it. thanks very much!
from lz-string.
I have had issues with UTF16,
check this issue:
from lz-string.
@yarden-app There is no issue with compressToUTF16
if you feed decompress with the exact output of compress. If, however, you convert that UTF16 to something else, such as UTF8 then back to UTF16, chances are the UTF16 string you get back is not what you had in the beginning, so obviously you cannot decompress it.
from lz-string.
Related Issues (20)
- Newbie question: How would I go about downloading / uploading a file? HOT 2
- Does `compressToUint8Array()` output smaller than `compress()` ? HOT 1
- Quotes in the compressed string HOT 3
- Implement IRI Encoding HOT 1
- 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
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.