We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using @ErikSom's trick of compressing JSON, then turning it into base64 so prefabs can be shared on Discord.
Let's use https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs as the format. A good compression algorithm is necessary because Discord's character limit per message is presently 2000.
data:application/bombhopperio-prefab+json;compression=lz-string;base64,NobwRALgngDgpmAXJOAPCYA0YYEMBOuAtgM5LipIBMADDdlEgKy3YDGA9jI4uHAHZIwAFQAWASxIACSVIii4UgCZwAZrgCuAGwhStcAG5wtAQgA6/AKJLxuiBylQOG/HvEBrcfwDmYAL7YuPxsohz45GCUiDQAdEwMSLFMAWBB3vqJfgHg0PBC/GFEuFpYOATEZLxgRvgQ4mxwlaCRSAAsdAmIABy02S2I7fRgPF1dNH1RLEMjYxPMrMNIPeMAutiSAMoQuHVsSBD4GnBZmDmwCMj1CNh4hKQRNbuNSM1RALRUAGzTzLOn/R9vp1lnMBh1Ft1ev8ooNOgB2b6ggCMQIhCPG0KQHx+iE+7VBbyR7U6eNW6xIWx29X2h2OfVyFzAAiUMA4XgwN3K9yqkyYOM+AGYhpttrsaUdsPhxN5RBAAGK4NheXyIA4S1I+DLRE5nPLIGBaXBQODhTl3SoULGonifBZpLXCimi6mIdRaEhwbBFby4ABeXguwDA3nwAlwKlKcCIMGgpQARtp9BgVjrIOd8oViqVbhUHiank1LYgPgLPp0qABOKgEpEI8tVmt1iEClgEqilzot6trMAiql7V3FD1ZFZAA
How small can the entities in this level can turn out to be?
The comparisons below are done on base64 strings, close to real-world.
Some naive non-base64 benchmarks (because they all use the default paramters)
615 msgPacked.bin.br 638 msgPacked.bin.zopfli.deflate 644 msgPacked.bin.zopfli.zlib 652 msgPacked.bin.lzma 656 msgPacked.bin.zopfli.gzip 668 msgPacked.bin.lz 682 msgPacked.bin.bz2 690 msgPacked.bin.gz 700 msgPacked.bin.xz 721 msgPacked.bin.lzham 762 msgPacked.bin.zst 1018 msgPacked.bin.lzo 1035 msgPacked.bin.lz4 1065 msgPacked.bin.Z 2464 msgPacked.bin
TL;DR: the lzma module is sturdy and has a good ratio, so let's use that. (but let's make sure the service worker works since it's slow!)
The prefix will be as follow: data:application/vnd.bombhopperio-prefab+msgpack;compression=lzma;base64
data:application/vnd.bombhopperio-prefab+msgpack;compression=lzma;base64
The text was updated successfully, but these errors were encountered:
Closed by the series of commits leading up to cdcb7d4!
Sorry, something went wrong.
No branches or pull requests
Using @ErikSom's trick of compressing JSON, then turning it into base64 so prefabs can be shared on Discord.
Let's use https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs as the format.
A good compression algorithm is necessary because Discord's character limit per message is presently 2000.
Tour of the compression algorithms
My tests
How small can the entities in this level can turn out to be?
The comparisons below are done on base64 strings, close to real-world.
Some naive non-base64 benchmarks (because they all use the default paramters)
615 msgPacked.bin.br
638 msgPacked.bin.zopfli.deflate
644 msgPacked.bin.zopfli.zlib
652 msgPacked.bin.lzma
656 msgPacked.bin.zopfli.gzip
668 msgPacked.bin.lz
682 msgPacked.bin.bz2
690 msgPacked.bin.gz
700 msgPacked.bin.xz
721 msgPacked.bin.lzham
762 msgPacked.bin.zst
1018 msgPacked.bin.lzo
1035 msgPacked.bin.lz4
1065 msgPacked.bin.Z
2464 msgPacked.bin
TL;DR: the lzma module is sturdy and has a good ratio, so let's use that. (but let's make sure the service worker works since it's slow!)
The prefix will be as follow:
data:application/vnd.bombhopperio-prefab+msgpack;compression=lzma;base64
The text was updated successfully, but these errors were encountered: