How to Compress and Un-compress files using Node JS ZLIB module

preview_player
Показать описание
The zlib module can be accessed using:
const zlib = require('zlib');
Compressing and decompressing a file can be done by piping the source stream data into a destination stream through zlib stream.

You can download code of this video from my github repository:

Рекомендации по теме
Комментарии
Автор

does the browser decompress the data/file on its own? or you need to write code in frontend, to decompress files?

mandlankosi
Автор

i have some video game files in .ar format.i decompress them through a software name 'dear2' After editing the files i want to compress them again in .ar format.to play it in a game...how can i do that...when i compress them through winrar game does not work."dear2" just have the option of decompress but not compress...

bilalafzal
Автор

Please can you show string compression and decompression? Not file just string in node js

vladostema