aboutsummaryrefslogtreecommitdiff
path: root/c/tools
diff options
context:
space:
mode:
authorEvgenii Kliuchnikov <eustas.ru@gmail.com>2022-11-17 13:03:09 +0000
committerEvgenii Kliuchnikov <eustas.ru@gmail.com>2022-11-17 13:03:09 +0000
commita8f5813b843b7ec469dbd3d8a6a8743395359964 (patch)
treee349a984eac9404db22a662e579fe47953dc47fe /c/tools
parent388d0d53fb29271492537015beeed91b74076411 (diff)
downloadbrotli-a8f5813b843b7ec469dbd3d8a6a8743395359964.zip
brotli-a8f5813b843b7ec469dbd3d8a6a8743395359964.tar.gz
brotli-a8f5813b843b7ec469dbd3d8a6a8743395359964.tar.bz2
Update
Documentation: - add note that brotli is a "stream" format, not an archive-like - regenerate .1 with Pandoc Build: - drop legacy "BROTLI_BUILD_PORTABLE" option - drop "BROTLI_SANITIZED" definition Code: - c: comb includes - c/enc: extract encoder state into separate header - c/enc: drop designated q10 codepath - c/enc: dealing better with flushing of empty stream - fix MSVC compilation API: - py: use library version instead of one in version.h - c: add plugable API to report consumed input / produced output - c/java: support "lean" prepared dictionaries (without copy of source)
Diffstat (limited to 'c/tools')
-rw-r--r--c/tools/brotli.c5
-rw-r--r--c/tools/brotli.md24
2 files changed, 14 insertions, 15 deletions
diff --git a/c/tools/brotli.c b/c/tools/brotli.c
index 0ea45d3..80ead72 100644
--- a/c/tools/brotli.c
+++ b/c/tools/brotli.c
@@ -20,11 +20,12 @@
#include <sys/types.h>
#include <time.h>
-#include "../common/constants.h"
-#include "../common/version.h"
#include <brotli/decode.h>
#include <brotli/encode.h>
+#include "../common/constants.h"
+#include "../common/version.h"
+
#if !defined(_WIN32)
#include <unistd.h>
#include <utime.h>
diff --git a/c/tools/brotli.md b/c/tools/brotli.md
index 895c955..cb6d6f3 100644
--- a/c/tools/brotli.md
+++ b/c/tools/brotli.md
@@ -1,15 +1,15 @@
+# NAME
+
brotli(1) -- brotli, unbrotli - compress or decompress files
-================================================================
-SYNOPSIS
---------
+# SYNOPSIS
`brotli` [*OPTION|FILE*]...
`unbrotli` is equivalent to `brotli --decompress`
-DESCRIPTION
------------
+# DESCRIPTION
+
`brotli` is a generic-purpose lossless compression algorithm that compresses
data using a combination of a modern variant of the **LZ77** algorithm, Huffman
coding and 2-nd order context modeling, with a compression ratio comparable to
@@ -52,8 +52,7 @@ Default suffix is `.br`, but it could be specified with `--suffix` option.
Conflicting or duplicate _options_ are not allowed.
-OPTIONS
--------
+# OPTIONS
* `-#`:
compression level (0-9); bigger values cause denser, but slower compression
@@ -81,8 +80,8 @@ OPTIONS
increase output verbosity
* `-w NUM`, `--lgwin=NUM`:
set LZ77 window size (0, 10-24) (default: 24); window size is
- `(2**NUM - 16)`; 0 lets compressor decide over the optimal value; bigger
- windows size improve density; decoder might require up to window size
+ `(pow(2, NUM) - 16)`; 0 lets compressor decide over the optimal value;
+ bigger windows size improve density; decoder might require up to window size
memory to operate
* `-D FILE`, `--dictionary=FILE`:
use FILE as raw (LZ77) dictionary; same dictionary MUST be used both for
@@ -94,8 +93,7 @@ OPTIONS
* `-Z`, `--best`:
use best compression level (default); same as "`-q 11`"
-SEE ALSO
---------
+# SEE ALSO
`brotli` file format is defined in
[RFC 7932](https://www.ietf.org/rfc/rfc7932.txt).
@@ -105,6 +103,6 @@ SEE ALSO
Mailing list: https://groups.google.com/forum/#!forum/brotli
-BUGS
-----
+# BUGS
+
Report bugs at: https://github.com/google/brotli/issues