I'm using the ZLibDeflater to compress a file, by reading it as a stream and transforming it:
new File(filePath)
.openRead()
.transform(new ZLibDeflater())
.pipe(new File(gzipPath).openWrite())
.then(...);
As the ZLibDeflater is now deprecated, how can I convert the code to use the new GZipCodec class?
You can also use ZLIB :