{"action":"created","issue":{"url":"https://api.github.com/repos/cloudant/nodejs-cloudant/issues/72","labels_url":"https://api.github.com/repos/cloudant/nodejs-cloudant/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/cloudant/nodejs-cloudant/issues/72/comments","events_url":"https://api.github.com/repos/cloudant/nodejs-cloudant/issues/72/events","html_url":"https://github.com/cloudant/nodejs-cloudant/issues/72","id":91143630,"number":72,"title":"GZip attachments","user":{"login":"random6886","id":11774102,"avatar_url":"https://avatars.githubusercontent.com/u/11774102?v=3","gravatar_id":"","url":"https://api.github.com/users/random6886","html_url":"https://github.com/random6886","followers_url":"https://api.github.com/users/random6886/followers","following_url":"https://api.github.com/users/random6886/following{/other_user}","gists_url":"https://api.github.com/users/random6886/gists{/gist_id}","starred_url":"https://api.github.com/users/random6886/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/random6886/subscriptions","organizations_url":"https://api.github.com/users/random6886/orgs","repos_url":"https://api.github.com/users/random6886/repos","events_url":"https://api.github.com/users/random6886/events{/privacy}","received_events_url":"https://api.github.com/users/random6886/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cloudant/nodejs-cloudant/milestones/2","html_url":"https://github.com/cloudant/nodejs-cloudant/milestones/1.2.0","labels_url":"https://api.github.com/repos/cloudant/nodejs-cloudant/milestones/2/labels","id":814989,"number":2,"title":"1.2.0","description":"","creator":{"login":"mikerhodes","id":453210,"avatar_url":"https://avatars.githubusercontent.com/u/453210?v=3","gravatar_id":"","url":"https://api.github.com/users/mikerhodes","html_url":"https://github.com/mikerhodes","followers_url":"https://api.github.com/users/mikerhodes/followers","following_url":"https://api.github.com/users/mikerhodes/following{/other_user}","gists_url":"https://api.github.com/users/mikerhodes/gists{/gist_id}","starred_url":"https://api.github.com/users/mikerhodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikerhodes/subscriptions","organizations_url":"https://api.github.com/users/mikerhodes/orgs","repos_url":"https://api.github.com/users/mikerhodes/repos","events_url":"https://api.github.com/users/mikerhodes/events{/privacy}","received_events_url":"https://api.github.com/users/mikerhodes/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":16,"state":"open","created_at":"2014-10-06T12:37:12Z","updated_at":"2015-07-27T10:40:21Z","due_on":"2016-06-27T23:00:00Z","closed_at":null},"comments":13,"created_at":"2015-06-26T03:41:00Z","updated_at":"2015-07-27T10:40:21Z","closed_at":"2015-07-27T10:40:21Z","body":"This might be already implemented, but I wasn't having any luck looking through here or nano. \r\n\r\n```\r\nvar fs = require('fs');\r\n\r\nalice.attachment.get('rabbit', 'rabbit.png').pipe(fs.createWriteStream('rabbit.png'));\r\n```\r\n\r\nThe above is an example for producing a stream, which I've been able to do successfully. Is there a way to have the stream comeback gzipped though? For example, if I do a:\r\n\r\n```\r\ncurl https://(my_account).cloudant.com/db/doc/attachment --silent --write-out \"%{size_download} - Took: %{time_total}s\\n\" --output /dev/null -u (my_account)\r\n```\r\n\r\nIt produces: `2047050 - Took: 0.993s`\r\n\r\nNow if I include the gzip/deflate header:\r\n\r\n```\r\ncurl https://(my_account).cloudant.com/db/doc/attachment --silent --write-out \"%{size_download} - Took: %{time_total}s\\n\" --output /dev/null -u (my_account) -H \"Accept-encoding: gzip,deflate\"\r\n```\r\n\r\nIt produces: `134440 - Took: 0.383s`\r\n\r\nThanks!\r\n"},"comment":{"url":"https://api.github.com/repos/cloudant/nodejs-cloudant/issues/comments/125161389","html_url":"https://github.com/cloudant/nodejs-cloudant/issues/72#issuecomment-125161389","issue_url":"https://api.github.com/repos/cloudant/nodejs-cloudant/issues/72","id":125161389,"user":{"login":"jhs","id":17575,"avatar_url":"https://avatars.githubusercontent.com/u/17575?v=3","gravatar_id":"","url":"https://api.github.com/users/jhs","html_url":"https://github.com/jhs","followers_url":"https://api.github.com/users/jhs/followers","following_url":"https://api.github.com/users/jhs/following{/other_user}","gists_url":"https://api.github.com/users/jhs/gists{/gist_id}","starred_url":"https://api.github.com/users/jhs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhs/subscriptions","organizations_url":"https://api.github.com/users/jhs/orgs","repos_url":"https://api.github.com/users/jhs/repos","events_url":"https://api.github.com/users/jhs/events{/privacy}","received_events_url":"https://api.github.com/users/jhs/received_events","type":"User","site_admin":false},"created_at":"2015-07-27T10:40:21Z","updated_at":"2015-07-27T10:40:21Z","body":"Fixed in fb5c9e33"}}