Hi everyone
I've been going through my head about using zlib in synchronous mode, (Is important to me to be Sync mode)
I have tried and failed multiple times, the node documentation is not entirely clear and use examples are missing
What I intend to do is:
A function for compress a text file "myfile.txt" that contains some data as text as "Some text" and save it as "myfile.txt.gz"
function zip(fullPathToFile){
const zlib= require('zlib');
//some cool stuff...using:
zlib.gzipSync(buffer[, options])
}
A function for unzip "myfile.txt.gz" into "myfile.txt"
function unZip(fullPathToFile){
const zlib= require('zlib');
//some cool stuff...using:
zlib.gunzipSync(buffer[, options])
}
all in the same directory
any idea?
thanks for all the reading and helping time