Rack::Brotli
compresses Rack
responses using Google's Brotli compression algorithm.
Brotli generally compresses better than gzip
for the same CPU cost and is supported by Chrome, Firefox, IE and Opera.
Install gem:
gem install rack-easy_brotli
Requiring 'rack/brotli'
will autoload Rack::Brotli
module. The following example shows what a simple rackup
(config.ru
) file might look like:
require 'rack'
require 'rack/brotli'
use Rack::Brotli
run theapp
bundler
gem 'rack-easy_brotli'
To run the entire test suite, run
rake test
- rack-brotli on GitHub:: http://github.com/marcotc/rack-brotli
- Rack:: http://rack.rubyforge.org/
- Rack On GitHub:: http://github.com/rack/rack