Skip to content
New issue

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

Size comparison with brotli #2

Open
ralscha opened this issue Jan 23, 2018 · 1 comment
Open

Size comparison with brotli #2

ralscha opened this issue Jan 23, 2018 · 1 comment

Comments

@ralscha
Copy link

ralscha commented Jan 23, 2018

Hi
I'm fiddling a bit with brotli compression and compare the size of the compressed files from this library with https://www.npmjs.com/package/brotli
The compressed files with brotli are sometimes much smaller. I'm wondering if there are options I can set with wasm-brotli?

Testfile: https://bayden.com/dl/brotli.exe
Uncompressed: 780'536 bytes
wasm-brotli: 351'404 bytes
brotli: 297'835 bytes ({ mode: 1, quality: 11, lgwin: 22 })
brotli.exe: 297'789 bytes (default settings)

Testfile: index.html
Uncompressed: 179 bytes
wasm-brotli: 118 bytes
brotli: 110 bytes
brotli.exe: 110 bytes

Contents of index.html test file

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Demo</title> </head> <body> <script src="/dist/65c9596f6a25cd16e8e55874a574b359.js"></script> </body> </html>
@dfrankland
Copy link
Owner

My best guess at the moment is like you said, probably the default settings don't compress as well as the other programs you listed. For now, let's track the issue of options on #3.

Let's leave this open for trying to create benchmarks for size as a part of the tests for the module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants