• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<p align="center"><img src="https://brotli.org/brotli.svg" alt="Brotli" width="64"></p>
2
3### Introduction
4
5Brotli is a generic-purpose lossless compression algorithm that compresses data
6using a combination of a modern variant of the LZ77 algorithm, Huffman coding
7and 2nd order context modeling, with a compression ratio comparable to the best
8currently available general-purpose compression methods. It is similar in speed
9with deflate but offers more dense compression.
10
11The specification of the Brotli Compressed Data Format is defined in [RFC 7932](https://www.ietf.org/rfc/rfc7932.txt).
12
13Brotli is open-sourced under the MIT License, see the LICENSE file.
14
15Brotli mailing list:
16https://groups.google.com/forum/#!forum/brotli
17
18[![Build Status](https://travis-ci.org/google/brotli.svg?branch=master)](https://travis-ci.org/google/brotli)
19
20### Build instructions
21
22#### Make
23
24To build and run tests, simply do:
25
26    $ ./configure && make
27
28If you want to install brotli, use one of the more advanced build systems below.
29
30#### Bazel
31
32See [Bazel](http://www.bazel.build/)
33
34#### CMake
35
36The basic commands to build, test and install brotli are:
37
38    $ mkdir out && cd out && ../configure-cmake && make
39    $ make test
40    $ make install
41
42You can use other [CMake](https://cmake.org/) configuration. For example, to
43build static libraries and use a custom installation directory:
44
45    $ mkdir out-static && \
46      cd out-static && \
47      ../configure-cmake --disable-shared-libs --prefix='/my/prefix/dir/'
48    $ make install
49
50#### Premake5
51
52See [Premake5](https://premake.github.io/)
53
54#### Python
55
56To install the Python module from source, run the following:
57
58    $ python setup.py install
59
60See the [Python readme](python/README.md) for more details on testing
61and development.
62
63### Benchmarks
64* [Squash Compression Benchmark](https://quixdb.github.io/squash-benchmark/) / [Unstable Squash Compression Benchmark](https://quixdb.github.io/squash-benchmark/unstable/)
65* [Large Text Compression Benchmark](http://mattmahoney.net/dc/text.html)
66* [Lzturbo Benchmark](https://sites.google.com/site/powturbo/home/benchmark)
67
68### Related projects
69Independent [decoder](https://github.com/madler/brotli) implementation by Mark Adler, based entirely on format specification.
70
71JavaScript port of brotli [decoder](https://github.com/devongovett/brotli.js). Could be used directly via `npm install brotli`
72