How to install Brotli on Ubuntu 17.04

How to install Brotli on Ubuntu 17.04

The Brotli is a generic purpose lossless compression algorithm that compresses the data using a combination of modern variant of lz77 algorithm, and huffman coding. It is similar in speed with deflate but offers more dense compression.This tutorial explains the installation procedure of Brotli on Ubuntu.

Installation procedure

To begin with the installation procedure, add the repo in the target system using the following command.

root@linuxhelp1:~# add-apt-repository ppa:eugenesan/ppa
 This repository contains collection of customized, updated, ported and backported
packages for two last LTS releases and latest pre-LTS release.
Packages for older releases relocated to ppa:eugenesan/archive or deleted
+-------------------------------------------------------------------------------------+
| Disclaimer:
+-------------------------------------------------------------------------------------+
* Packages in this a nd related PPAs are for personal use only.
  They developed specifically for several custom environments and may not work for you.
* Usage of packages in this PPA, in some forms, might contradict licenses of software
  packaged in this and related PPAs. End users and administrator are responsible for
.
.
.
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keybox ' /tmp/tmpu23ps0kc/pubring.gpg'  created
gpg: /tmp/tmpu23ps0kc/trustdb.gpg: trustdb created
gpg: key E61380B28313A596: public key " Launchpad synergy+"  imported
gpg: Total number processed: 1
gpg:               imported: 1
OK

The repositories are added successfully, update the repo using the apt-get update command.

root@linuxhelp1:~# apt-get update
Get:1 http://ppa.launchpad.net/eugenesan/ppa/ubuntu zesty InRelease [15.4 kB]
Hit:2 http://security.ubuntu.com/ubuntu zesty-security InRelease                                               
Hit:3 http://in.archive.ubuntu.com/ubuntu zesty InRelease                                                      
Hit:4 http://in.archive.ubuntu.com/ubuntu zesty-updates InRelease                  
Hit:5 http://in.archive.ubuntu.com/ubuntu zesty-backports InRelease     
Get:6 http://ppa.launchpad.net/eugenesan/ppa/ubuntu zesty/main amd64 Packages [1,100 B]
Get:7 http://ppa.launchpad.net/eugenesan/ppa/ubuntu zesty/main i386 Packages [1,108 B]
Get:8 http://ppa.launchpad.net/eugenesan/ppa/ubuntu zesty/main Translation-en [1,288 B]
Fetched 18.9 kB in 2s (6,640 B/s)
Reading package lists... Done

The system is updated with the added repositories. Install the Brotli package by executing the following command.

root@linuxhelp1:~# apt-get install brotli -y
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libbase58-0 libblkmaker-0.1-6 libmicrohttpd10
Use ' apt autoremove'  to remove them.
The following NEW packages will be installed:
  brotli
0 upgraded, 1 newly installed, 0 to remove and 28 not upgraded.
Need to get 268 kB of archives.
After this operation, 709 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu zesty/universe amd64 brotli amd64 0.5.2+dfsg-2 [268 kB]
Fetched 268 kB in 13s (19.2 kB/s)                                                                                                  
Selecting previously unselected package brotli.
(Reading database ... 172246 files and directories currently installed.)
Preparing to unpack .../brotli_0.5.2+dfsg-2_amd64.deb ...
Unpacking brotli (0.5.2+dfsg-2) ...
Setting up brotli (0.5.2+dfsg-2) ...

For using the package, execute the following command. It lists the options that can be used with brotli.

root@linuxhelp1:~# brotli --help
Usage: brotli [--force] [--quality n] [--decompress] [--input filename] [--output filename] [--repeat iters] [--verbose] [--window n] [--custom-dictionary filename]

To remove the package, run the following command to remove the Brotli package and all of its repositories.

root@linuxhelp1:~# apt-get remove brotli -y
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libbase58-0 libblkmaker-0.1-6 libmicrohttpd10
Use ' apt autoremove'  to remove them.
The following packages will be REMOVED:
  brotli
0 upgraded, 0 newly installed, 1 to remove and 28 not upgraded.
After this operation, 709 kB disk space will be freed.
(Reading database ... 172249 files and directories currently installed.)
Removing brotli (0.5.2+dfsg-2) ...

Wasn' t that an easy installation procedure? Brotli has a compression ratio comparable to the currently available general-purpose compression methods.

FAQ
Q
how to check the options in brotli in ubuntu?
A
For using the package, execute the following command. It lists the options that can be used with brotli.
# brotli --help
Q
which command to remove the package of Brotli in ubuntu?
A
To remove the package, run the following command to remove the Brotli package and all of its repositories.
# apt-get remove brotli -y
Q
How to check version of Brotli?
A
use the following command to check version of Brotli
# brotli -V
Q
what is the syntax of brotli?
A
the syntax of brotli are
brotli [OPTION|FILE]
unbrotli is equivalent to brotli --decompress
Q
what is the supported languages of brotli?
A
the supported languages of brotli is "C".