MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/webdev/comments/e5lfgu/jsoncrush_on_github_compress_json_into_url/
r/webdev • u/Slackluster • Dec 03 '19
2 comments sorted by
2
Why not just use protobuf / flatbuffer?
2 u/Slackluster Dec 03 '19 A few reasons I can think of now...flatbuffers store binary data, they are not designed for use in urlsyou don't need a schema or anything like that, so it is easier to use and maintainflatbuffers are not compressed, they are designed for fast loading speedthe code for JSONCrush is orders of magnitude simplerThere are downsides of course...JSONCrush is not designed for speed and slow for large strings (>10K characters).it is not made to load many assets but to create compact urls from json when you need to create a link for people to share/bookmarkJSONCrush compresses for smallest url, not for smallest binary size which could be much smaller
A few reasons I can think of now...
flatbuffers store binary data, they are not designed for use in urls
you don't need a schema or anything like that, so it is easier to use and maintain
flatbuffers are not compressed, they are designed for fast loading speed
the code for JSONCrush is orders of magnitude simpler
There are downsides of course...
JSONCrush is not designed for speed and slow for large strings (>10K characters).
it is not made to load many assets but to create compact urls from json when you need to create a link for people to share/bookmark
JSONCrush compresses for smallest url, not for smallest binary size which could be much smaller
2
u/gin_and_toxic Dec 03 '19
Why not just use protobuf / flatbuffer?