brozip
is a fast command line tool to concurrently compress,
decompress files using the Brotli compression algorithm. If can handle
arbitrary number of files given and if none are given it will perform
an operation on stdin
and push the results to stdout
Well, Google calls Brotli the …new compression algorithm for the internet with improvements up to 25% over other zipping algorithms, see the comparison shootout here.
I assume you have opam installed, it is OCaml's package manager.
$ opam install brozip
and you'll have the brozip
executable installed.
I tested this on OS X
and Debian Jessie
, both worked. It should
work on Windows as well but you will have to put in more effort
although it should be fine if run under cygwin
(I think)
NOTE You might get a shared library error on Linux, like on
Debian. This is most likely an issue with where your system looks for
shared libraries. Do the following, edit your /etc/ld.so.conf
and
add /usr/local/lib
, then as root
run ldconfig
.
brozip
keeps some common interfaces like other zipping utilities,
like if no files are given, then it will just take stdin
and process
to stdout
so you should be able to drop it in some shell scripts
now.
$ brozip < asyoulik.txt.compressed | wc -l
4122
The default action is decompression, tell brozip
to compress input
with the --compress
, -c
flag.
If multiple files are given then brozip
will act on them
concurrently, you can control this with the flag --serial
, -s
which when given will make brozip
process files one by one.
Some compression tuning options are specific to the Brotli
algorithm
but all default to the settings used by Google, Look at the man page
for all details, accessible with either man brozip
or brozip --help
As always, please report bugs and PRs are always welcome.
- Even though this is only 250 lines of Code, there are still places
that can be refactored and made more
DRY
or just generally improved.