Giter Club home page Giter Club logo

Comments (3)

pieroxy avatar pieroxy commented on August 28, 2024 2

LZ-String is specifically tailored to compress a string into another string, making the best use of the UTF-16 encoding. If you can store other type of data (uint8array, etc.) then it makes sense to use a library that will return this kind of data.

LZ4 should provide the same compression level but should be much faster.

from lz-string.

gblazex avatar gblazex commented on August 28, 2024

@pieroxy

My question is if you plan to release the 15bit character encoding as a separate project?
How hard would it be?

As you noted on your page some browsers might have problems with arbitrary 16bit characters shoved into localStorage.
This library solves that problem but only for the current compression algo.

A more general solution would be welcome to allow any binary data to be efficiently stored into such places with your excellent 15bit encoding. This would work well with other compression outputs and even binary images.

Yes there are other solutions for binary data (like IndexDB) but I found that some browsers (e.g. Safari) have way better performance when reading from localStorage during the initial rendering of the page. So for first paint critical resources this would be very helpful.

from lz-string.

gblazex avatar gblazex commented on August 28, 2024

I found a library for it

https://github.com/qntm/base32768/

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.