A
A
alex2016-12-09 16:06:55
Node.js
alex, 2016-12-09 16:06:55

How to parse file.gz in Node.js?

Good afternoon friends. Help me to understand.
There is a file - site.com/path/to/file.gz
It contains .json with the content of the form:

{"key":"value", "anotherKey":"anotherValue"}
{"key2":"value2", "anotherKey2":"anotherValue2"}
{"key3":"value3", "anotherKey3":"anotherValue3"}
...

How to download and unzip this .gz into a valid .json using nodejs?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Sharihin, 2016-12-09
@Pinsky

https://nodejs.org/api/zlib.html

V
Vitaly, 2016-12-09
@vitali1995

There are good zip modules like easy-zip

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question