feathers-hooks-common icon indicating copy to clipboard operation
feathers-hooks-common copied to clipboard

enhancement: transparent data compression hook

Open j2L4e opened this issue 6 years ago • 2 comments
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 )

j2L4e avatar Dec 03 '18 10:12 j2L4e

http://pieroxy.net/blog/pages/lz-string/index.html

j2L4e avatar Dec 03 '18 11:12 j2L4e

I'm open to a PR that de/compresses. Please inject the compression dependency.

eddyystop avatar Dec 03 '18 13:12 eddyystop