MACHIN
This commit is contained in:
13
12/app.js
Normal file
13
12/app.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const fs = require('fs');
|
||||
const zlib = require('zlib');
|
||||
|
||||
let readableStream = fs.createReadStream(
|
||||
'hello.txt',
|
||||
'utf8'
|
||||
);
|
||||
|
||||
let writeableStream = fs.createWriteStream('hello.txt.gz');
|
||||
|
||||
let gzip = zlib.createGzip();
|
||||
|
||||
readableStream.pipe(gzip).pipe(writeableStream);
|
||||
0
12/hello.txt.gz
Normal file
0
12/hello.txt.gz
Normal file
1
12/some.txt
Normal file
1
12/some.txt
Normal file
@@ -0,0 +1 @@
|
||||
hello 1
|
||||
1
12/some2.txt
Normal file
1
12/some2.txt
Normal file
@@ -0,0 +1 @@
|
||||
hello 2
|
||||
Reference in New Issue
Block a user