João Paulo Cercal

Staff Security Engineer at LastPass

  • DevOps

Downloading and Installing the Zlib library

  • Share on Facebook
  • Share on Twitter
  • Share on LinkedIn

Read this article in

The zlib compression library is intended for the compression and decompression of files, including integrity checks of decompressed data. This library can also optionally read and write gzip streams in memory.

The zlib format was primarily designed to be compact and fast, for use in memory and communication channels.

So, let’s get our hands dirty!

Visit the official website and download the latest stable version:

http://zlib.net/

Open the terminal and enter the directory where the library was saved:

1
$ cd ./Download/

Extract the file into the "/opt" directory:

1
$ sudo tar xvfz zlib-1.2.5.tar.gz -C /opt/

Enter the directory where the file was extracted:

1
$ sudo cd /opt/zlib-1.2.5/

For a standard installation run the command below, you can change the installation directory if you want.

1
$ sudo ./configure --prefix=/usr/local/zlib

Now just install:

1
$ sudo make && make install