3 ms·
Fleece: A super-fast, compact, JSON-equivalent binary data format
- ebb_earl_co 3y agoInteresting that this is on the front page(ish) at the same time as SQLite’s JSONB announcement.
- paulddraper 3y agoin what way is that interesting
- paulddraper 3y agoFWIW the README is excellent. Background, goals, and comparisons. Also lol > Q: Why didn't you write this in $NEW_LANGUAGE instead of crufty C++? > A: I probably should have! $NEW_LANGUAGE is deservedly attracting a lot of attention for its combination of safety, readable syntax, and support for modern programming paradigms. I've been trying out $NEW_LANGUAGE and want to write more code in it. But for this I chose C++ because it's supported on all platforms, lots of people know how to use it, and it still supports high-level abstractions (unlike C.)
- shaftway 3y agoI'd be curious to see the difference in size / performance with gzipped data in the mix. My guess is that gzipping will make the size difference negligable (may actually be worse in Fleece due to the abundance of pointers that can't be easily compressed). The times might be worse, but if this is intended as a wire format then that might not matter as much.
- jvalencia 3y agoHow does it compare to: https://msgpack.org/index.html https://msgpack.org/index.html ?
- c-cube 3y agoIt seems to be maybe a bit less compact in terms of absolute number of bytes, but faster to parse. That is, parsing is just one-pass validation, and then data can be read directly from the buffer without an intermediate structure, with random access. It also has a notion of "pointer" so you can introduce sharing (a smart-ish encoder might use that to reuse common keys or strings, making the result smaller).
- Kiuhrly1 3y agoI went down the rabbit hole of trying to find the best binary JSON-ish format a couple of years ago, it's very interesting to compare their different design choices. Having read the specification, this looks to be a fresh and minimalist take on a binary format, which is great. In general, it seems CBOR won the standardisation and support battle while also being one of the more complex and ambiguous (in terms of the number of ways to encode something) formats. I think MessagePack is nicer, though I still wish UBJSON caught on.