fent/node-torrent — pull request #21 by solatis (2014-03-12 16:01:59+00:00)
Title: Implements decompression if a gzip/deflate encoded http response is sent.

NodeJS' request module is used a lot, but doesn't decompress the body if the data is sent in compressed form. Many people have to re-implement the decompression of their requests themselves.

I ran into this problem with node-torrent. The compressed data is received and sent through bncode.decode(), which fails since it cannot read compressed data.

Whether this fix should be in node-torrent or in Node.Request is open for discussion, but here is a patch that does this automatically in the nt.readURL() function.