Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tkvogt/streamly-judy
Stream the key/value-pairs of a judy array into an arbitrary data structure
https://github.com/tkvogt/streamly-judy
Last synced: 7 days ago
JSON representation
Stream the key/value-pairs of a judy array into an arbitrary data structure
- Host: GitHub
- URL: https://github.com/tkvogt/streamly-judy
- Owner: tkvogt
- License: bsd-3-clause
- Created: 2022-01-20T12:41:36.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-12T16:45:55.000Z (about 1 year ago)
- Last Synced: 2023-11-12T17:57:12.966Z (about 1 year ago)
- Language: Haskell
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# streamly-judy
Stream the key/value-pairs of a judy array, dumping it to a file.In the [judy](https://hackage.haskell.org/package/judy-0.4.1) library the functions
```bash
keys :: JudyImmutable a -> IO [Key]
elems :: JE a => JudyImmutable a -> IO [a]
toList :: JE a => JudyImmutable a -> IO [(Key, a)]
```return lists, which can use quite a lot of memory. This is problematic when the array is big.
It makes much more sense to stream a judy array into an arbitrary data structure.
This way much bigger judy arrays can be loaded from/stored into a file, which is also in my use case faster than the construction of the judy array and reduces startup time.Instead of adding these functions to [judy](https://hackage.haskell.org/package/judy-0.4.1/docs/Data-Judy.html) or [streamly](https://hackage.haskell.org/package/streamly-0.8.1),
we make a new library to not force new dependencies on either of the two.