GithubHelp home page GithubHelp logo

Comments (4)

erinpentecost avatar erinpentecost commented on April 28, 2024 1

It might also be worth running files through a minifier like tdewolff/minify before compression.

from vugu.

bradleypeabody avatar bradleypeabody commented on April 28, 2024

Brotli has good browser support (https://caniuse.com/#feat=brotli ) and from my initial testing reduces wasm file size by about an additional 1/3 (e.g. www.vugu.org/main.wasm is 13.4M uncompressed, 2.8M with gzip -9 and 1.9M with brotli).

This should be used as an alternative to gzip where possible (request header needs to have Accept-Encoding with br in it and server needs to have brotli compressor available). But also, this may not be a good choice during development - since gzip is much faster for compression. If the wasm file is changing all the time, it will slow things down a lot.

Check out https://github.com/dsnet/compress/tree/master/brotli

Or possibly could be called through CGO or even just command line.

from vugu.

JalonSolov avatar JalonSolov commented on April 28, 2024

Slightly more recently updated brotli lib, with both encode/decode:

https://github.com/andybalholm/brotli

from vugu.

bradleypeabody avatar bradleypeabody commented on April 28, 2024

Thanks @JalonSolov that definitely looks promising.

from vugu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.