feathers-hooks-common
feathers-hooks-common copied to clipboard
enhancement: transparent data compression hook
trafficstars
In-browser storage size is limited, so for offline-first PWAs you may end up needing some kind of data compression. A hook that handles compression transparently could be useful here.
Possible config options:
- idField
- compression / decompression callback
- compression level
- field blacklist / whitelist (you may want to exclude some data from compression for querying / sorting )
http://pieroxy.net/blog/pages/lz-string/index.html
I'm open to a PR that de/compresses. Please inject the compression dependency.