Coder Social home page Coder Social logo

Comments (11)

rpannell avatar rpannell commented on September 14, 2024

When I was using local storage directly and before I found angular-localforage I was using that compression. Worked very well, but there was a small slow down.

It good 2.9 mb of data down to 0.16mb. So a huge difference!

from angular-localforage.

ocombe avatar ocombe commented on September 14, 2024

Wow that's huge, it could really be a good feature. You were using "pako" ?
The slow down is expected, and that's why it will be optional.

from angular-localforage.

mavrick avatar mavrick commented on September 14, 2024

+1 for lzstring

from angular-localforage.

JobaDiniz avatar JobaDiniz commented on September 14, 2024

+1
Is there any news on this one?

from angular-localforage.

ocombe avatar ocombe commented on September 14, 2024

Not much, I don't have a lot of free time for now, but if you want to try to do that and do a PR, feel free to do so :)

from angular-localforage.

scotttrinh avatar scotttrinh commented on September 14, 2024

Let's put this back in the queue for 1.4.0.

from angular-localforage.

siddo420 avatar siddo420 commented on September 14, 2024

+1
any updates on this issue?

from angular-localforage.

scotttrinh avatar scotttrinh commented on September 14, 2024

nothing new to report, but it is definitely on the road map. PRs welcome!

from angular-localforage.

scotttrinh avatar scotttrinh commented on September 14, 2024

Quick question for those who would want to use this functionality: what about making a custom localForage driver that does this compression? That would keep our codebase cleaner by still just wrapping localForage and would help the upstream community. The downside is that we'd be subject to localForage's opinions and timeframes.

from angular-localforage.

scotttrinh avatar scotttrinh commented on September 14, 2024

Or maybe a separate compression decorator that just wraps the getItem/setItem calls to compress and decompress on the way in and out?

from angular-localforage.

scotttrinh avatar scotttrinh commented on September 14, 2024

Here is an example decorator using LZString:

http://plnkr.co/edit/r0tSMFNJwsbyUdLT35Or?p=preview

Not cut-n-paste production ready, but is a good starting point for those wishing to do this. Maybe we can just document this pattern and be done with it?

from angular-localforage.

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.