I'm trying to compress a buffer, and it works fine on my local machine, but when I upload the service to Cloud Foundry on IBM Cloud, it doesn't work (no errors in logs). Sample code is here:
const {gzip} = require('node-gzip')
gzip(buf)
.then((compressed) => {
logger.debug('buffer has been compressed')
})
Here is package.json:
"dependencies": {
"bluemix-autoscaling-agent": "1.0.14",
"cfenv": "1.1.0",
"cors": "2.8.5",
"express": "4.16.4",
"lodash": "4.17.11",
"node-gzip": "1.1.2",
"object-path": "0.11.4",
"path": "0.12.7"
}
Cloud Foundry service LOG_LEVEL=debug so I can see logs output for other part of my code. Do you know any other alternative to node-gzip to compress/decompress a buffer? ZLIB is too old - last updated 7 years ago. We don't want to use it as a matter of code integrity and security.