{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/socket.io/pulls/comments/23330196","id":23330196,"diff_hunk":"@@ -135,17 +135,18 @@ Client.prototype.close = function(){\n  * @param {Object} packet object\n  * @param {Boolean} whether packet is already encoded\n  * @param {Boolean} whether packet is volatile\n+ * @param {Boolean} whether packet should be compressed\n  * @api private\n  */\n \n-Client.prototype.packet = function(packet, preEncoded, volatile){\n+Client.prototype.packet = function(packet, preEncoded, volatile, compress){\n   var self = this;\n \n   // this writes to the actual connection\n   function writeToEngine(encodedPackets) {\n     if (volatile && !self.conn.transport.writable) return;\n     for (var i = 0; i < encodedPackets.length; i++) {\n-      self.conn.write(encodedPackets[i]);\n+      self.conn.write(encodedPackets[i], { compress: compress });","path":"lib/client.js","position":26,"original_position":26,"commit_id":"ac8e8598d7dea67fbe5347a2b45e6f92d68df025","original_commit_id":"ac8e8598d7dea67fbe5347a2b45e6f92d68df025","user":{"login":"rauchg","id":13041,"avatar_url":"https://avatars.githubusercontent.com/u/13041?v=3","gravatar_id":"","url":"https://api.github.com/users/rauchg","html_url":"https://github.com/rauchg","followers_url":"https://api.github.com/users/rauchg/followers","following_url":"https://api.github.com/users/rauchg/following{/other_user}","gists_url":"https://api.github.com/users/rauchg/gists{/gist_id}","starred_url":"https://api.github.com/users/rauchg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rauchg/subscriptions","organizations_url":"https://api.github.com/users/rauchg/orgs","repos_url":"https://api.github.com/users/rauchg/repos","events_url":"https://api.github.com/users/rauchg/events{/privacy}","received_events_url":"https://api.github.com/users/rauchg/received_events","type":"User","site_admin":false},"body":"Just curious, is this the same signature the WS client would use? I mention this since it'd be nice to maintain parity so that you could technically replace `engine.io-client` with a `WebSocket` client altogether.","created_at":"2015-01-21T20:10:51Z","updated_at":"2015-01-21T20:10:51Z","html_url":"https://github.com/Automattic/socket.io/pull/1958#discussion_r23330196","pull_request_url":"https://api.github.com/repos/Automattic/socket.io/pulls/1958","_links":{"self":{"href":"https://api.github.com/repos/Automattic/socket.io/pulls/comments/23330196"},"html":{"href":"https://github.com/Automattic/socket.io/pull/1958#discussion_r23330196"},"pull_request":{"href":"https://api.github.com/repos/Automattic/socket.io/pulls/1958"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/socket.io/pulls/1958","id":27790063,"html_url":"https://github.com/Automattic/socket.io/pull/1958","diff_url":"https://github.com/Automattic/socket.io/pull/1958.diff","patch_url":"https://github.com/Automattic/socket.io/pull/1958.patch","issue_url":"https://api.github.com/repos/Automattic/socket.io/issues/1958","number":1958,"state":"open","locked":false,"title":"Support compression","user":{"login":"nkzawa","id":775227,"avatar_url":"https://avatars.githubusercontent.com/u/775227?v=3","gravatar_id":"","url":"https://api.github.com/users/nkzawa","html_url":"https://github.com/nkzawa","followers_url":"https://api.github.com/users/nkzawa/followers","following_url":"https://api.github.com/users/nkzawa/following{/other_user}","gists_url":"https://api.github.com/users/nkzawa/gists{/gist_id}","starred_url":"https://api.github.com/users/nkzawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkzawa/subscriptions","organizations_url":"https://api.github.com/users/nkzawa/orgs","repos_url":"https://api.github.com/users/nkzawa/repos","events_url":"https://api.github.com/users/nkzawa/events{/privacy}","received_events_url":"https://api.github.com/users/nkzawa/received_events","type":"User","site_admin":false},"body":"Support compression and add the `compress` method which user can set the `compress` flag for a subsequent event emission.","created_at":"2015-01-21T20:03:33Z","updated_at":"2015-01-21T20:10:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad6bd03527f505c671049c60704ca50f5b2c4a23","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/socket.io/pulls/1958/commits","review_comments_url":"https://api.github.com/repos/Automattic/socket.io/pulls/1958/comments","review_comment_url":"https://api.github.com/repos/Automattic/socket.io/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Automattic/socket.io/issues/1958/comments","statuses_url":"https://api.github.com/repos/Automattic/socket.io/statuses/ac8e8598d7dea67fbe5347a2b45e6f92d68df025","head":{"label":"nkzawa:compress","ref":"compress","sha":"ac8e8598d7dea67fbe5347a2b45e6f92d68df025","user":{"login":"nkzawa","id":775227,"avatar_url":"https://avatars.githubusercontent.com/u/775227?v=3","gravatar_id":"","url":"https://api.github.com/users/nkzawa","html_url":"https://github.com/nkzawa","followers_url":"https://api.github.com/users/nkzawa/followers","following_url":"https://api.github.com/users/nkzawa/following{/other_user}","gists_url":"https://api.github.com/users/nkzawa/gists{/gist_id}","starred_url":"https://api.github.com/users/nkzawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkzawa/subscriptions","organizations_url":"https://api.github.com/users/nkzawa/orgs","repos_url":"https://api.github.com/users/nkzawa/repos","events_url":"https://api.github.com/users/nkzawa/events{/privacy}","received_events_url":"https://api.github.com/users/nkzawa/received_events","type":"User","site_admin":false},"repo":{"id":9322008,"name":"socket.io","full_name":"nkzawa/socket.io","owner":{"login":"nkzawa","id":775227,"avatar_url":"https://avatars.githubusercontent.com/u/775227?v=3","gravatar_id":"","url":"https://api.github.com/users/nkzawa","html_url":"https://github.com/nkzawa","followers_url":"https://api.github.com/users/nkzawa/followers","following_url":"https://api.github.com/users/nkzawa/following{/other_user}","gists_url":"https://api.github.com/users/nkzawa/gists{/gist_id}","starred_url":"https://api.github.com/users/nkzawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkzawa/subscriptions","organizations_url":"https://api.github.com/users/nkzawa/orgs","repos_url":"https://api.github.com/users/nkzawa/repos","events_url":"https://api.github.com/users/nkzawa/events{/privacy}","received_events_url":"https://api.github.com/users/nkzawa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nkzawa/socket.io","description":"Realtime application framework for Node.JS, with HTML5 WebSockets and cross-browser fallbacks support.","fork":true,"url":"https://api.github.com/repos/nkzawa/socket.io","forks_url":"https://api.github.com/repos/nkzawa/socket.io/forks","keys_url":"https://api.github.com/repos/nkzawa/socket.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nkzawa/socket.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nkzawa/socket.io/teams","hooks_url":"https://api.github.com/repos/nkzawa/socket.io/hooks","issue_events_url":"https://api.github.com/repos/nkzawa/socket.io/issues/events{/number}","events_url":"https://api.github.com/repos/nkzawa/socket.io/events","assignees_url":"https://api.github.com/repos/nkzawa/socket.io/assignees{/user}","branches_url":"https://api.github.com/repos/nkzawa/socket.io/branches{/branch}","tags_url":"https://api.github.com/repos/nkzawa/socket.io/tags","blobs_url":"https://api.github.com/repos/nkzawa/socket.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nkzawa/socket.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nkzawa/socket.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/nkzawa/socket.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nkzawa/socket.io/statuses/{sha}","languages_url":"https://api.github.com/repos/nkzawa/socket.io/languages","stargazers_url":"https://api.github.com/repos/nkzawa/socket.io/stargazers","contributors_url":"https://api.github.com/repos/nkzawa/socket.io/contributors","subscribers_url":"https://api.github.com/repos/nkzawa/socket.io/subscribers","subscription_url":"https://api.github.com/repos/nkzawa/socket.io/subscription","commits_url":"https://api.github.com/repos/nkzawa/socket.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/nkzawa/socket.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/nkzawa/socket.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/nkzawa/socket.io/issues/comments/{number}","contents_url":"https://api.github.com/repos/nkzawa/socket.io/contents/{+path}","compare_url":"https://api.github.com/repos/nkzawa/socket.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nkzawa/socket.io/merges","archive_url":"https://api.github.com/repos/nkzawa/socket.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nkzawa/socket.io/downloads","issues_url":"https://api.github.com/repos/nkzawa/socket.io/issues{/number}","pulls_url":"https://api.github.com/repos/nkzawa/socket.io/pulls{/number}","milestones_url":"https://api.github.com/repos/nkzawa/socket.io/milestones{/number}","notifications_url":"https://api.github.com/repos/nkzawa/socket.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nkzawa/socket.io/labels{/name}","releases_url":"https://api.github.com/repos/nkzawa/socket.io/releases{/id}","created_at":"2013-04-09T13:34:09Z","updated_at":"2015-01-21T18:45:41Z","pushed_at":"2015-01-21T20:01:57Z","git_url":"git://github.com/nkzawa/socket.io.git","ssh_url":"git@github.com:nkzawa/socket.io.git","clone_url":"https://github.com/nkzawa/socket.io.git","svn_url":"https://github.com/nkzawa/socket.io","homepage":"http://socket.io","size":12198,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"9ba6d47ec728129e44773f1cdb376a14a132dce4","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":557980,"name":"socket.io","full_name":"Automattic/socket.io","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/socket.io","description":"Realtime application framework (Node.JS server)","fork":false,"url":"https://api.github.com/repos/Automattic/socket.io","forks_url":"https://api.github.com/repos/Automattic/socket.io/forks","keys_url":"https://api.github.com/repos/Automattic/socket.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/socket.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/socket.io/teams","hooks_url":"https://api.github.com/repos/Automattic/socket.io/hooks","issue_events_url":"https://api.github.com/repos/Automattic/socket.io/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/socket.io/events","assignees_url":"https://api.github.com/repos/Automattic/socket.io/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/socket.io/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/socket.io/tags","blobs_url":"https://api.github.com/repos/Automattic/socket.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/socket.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/socket.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/socket.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/socket.io/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/socket.io/languages","stargazers_url":"https://api.github.com/repos/Automattic/socket.io/stargazers","contributors_url":"https://api.github.com/repos/Automattic/socket.io/contributors","subscribers_url":"https://api.github.com/repos/Automattic/socket.io/subscribers","subscription_url":"https://api.github.com/repos/Automattic/socket.io/subscription","commits_url":"https://api.github.com/repos/Automattic/socket.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/socket.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/socket.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/socket.io/issues/comments/{number}","contents_url":"https://api.github.com/repos/Automattic/socket.io/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/socket.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/socket.io/merges","archive_url":"https://api.github.com/repos/Automattic/socket.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/socket.io/downloads","issues_url":"https://api.github.com/repos/Automattic/socket.io/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/socket.io/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/socket.io/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/socket.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/socket.io/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/socket.io/releases{/id}","created_at":"2010-03-11T18:24:48Z","updated_at":"2015-01-21T16:24:26Z","pushed_at":"2015-01-19T15:14:22Z","git_url":"git://github.com/Automattic/socket.io.git","ssh_url":"git@github.com:Automattic/socket.io.git","clone_url":"https://github.com/Automattic/socket.io.git","svn_url":"https://github.com/Automattic/socket.io","homepage":"http://socket.io","size":17260,"stargazers_count":14897,"watchers_count":14897,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2791,"mirror_url":null,"open_issues_count":111,"forks":2791,"open_issues":111,"watchers":14897,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/socket.io/pulls/1958"},"html":{"href":"https://github.com/Automattic/socket.io/pull/1958"},"issue":{"href":"https://api.github.com/repos/Automattic/socket.io/issues/1958"},"comments":{"href":"https://api.github.com/repos/Automattic/socket.io/issues/1958/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/socket.io/pulls/1958/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/socket.io/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Automattic/socket.io/pulls/1958/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/socket.io/statuses/ac8e8598d7dea67fbe5347a2b45e6f92d68df025"}}}}