Add zlib in settings.js, if you don’t already have it:
Then create a new function node with the following code:
This won’t yield the best performance, but it works in my case. Most likely, if could be done better by using the callback version of gunzip, and then using send to pass the msg to the next node.