Compressing and Decompressing Data with Zlib

When working with large systems or moving large amounts of data around, it is extremely helpful to be able to compress/decompress the data. Node.js provides an excellent library in the Zlib module that allows you to compress and decompress data in buffers very easily and efficiently.

You need to keep in mind that compressing data takes CPU cycles, so you should be certain of the benefits of compressing data before you incur the compression/decompression cost. Zlib supports these compression methods:

Image gzip/gunzip: Standard gzip compression.

Image deflate/inflate: Standard deflate compression algorithm, based on Huffman coding.

Image deflateRaw/inflateRaw: Deflate compression algorithm on a raw buffer.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.52.124