feat: Add compression support for wasm binary#990
Open
bigsaltyfishes wants to merge 8 commits intotrunk-rs:mainfrom
Open
feat: Add compression support for wasm binary#990bigsaltyfishes wants to merge 8 commits intotrunk-rs:mainfrom
bigsaltyfishes wants to merge 8 commits intotrunk-rs:mainfrom
Conversation
* Add data-gzip-compression attribute. * Enable compression by default on release build. * Use DecompressionStream API to decompress at runtime. Signed-off-by: bigsaltyfishes <bigsaltyfishes@gmail.com>
* Remove `data-gzip-compression` attribute. * Add `data-compression-algorithm` and `data-compression-level` attributes. * Add support for zlib(deflate) and deflate(deflate-raw) algorithm. Signed-off-by: bigsaltyfishes <bigsaltyfishes@gmail.com>
Signed-off-by: bigsaltyfishes <bigsaltyfishes@gmail.com>
Collaborator
|
Thanks for the PR. I guess this could be a valuable addition. There are two things:
|
Signed-off-by: bigsaltyfishes <bigsaltyfishes@gmail.com>
Signed-off-by: bigsaltyfishes <bigsaltyfishes@gmail.com>
Signed-off-by: bigsaltyfishes <bigsaltyfishes@gmail.com>
a42dc04 to
80bc851
Compare
…ure `init_with_object` Signed-off-by: bigsaltyfishes <bigsaltyfishes@gmail.com>
Author
I've merged repeat code and add missing compression support for custom initializer. Here are the file size savings with compression enabled. All examples were built with the release profile. By default, gzip compression is enabled with the default compression level:
All examples save about 50% to 70% in size. |
Signed-off-by: bigsaltyfishes <bigsaltyfishes@gmail.com>
db8d1c8 to
4758424
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an attempt to add compression support for wasm binary.
data-compression-algorithmanddata-compression-levelattributes.data-compression-level="0".