payload: {"action":"created","issue":{"url":"https://api.github.com/repos/rustasync/tide/issues/194","repository_url":"https://api.github.com/repos/rustasync/tide","labels_url":"https://api.github.com/repos/rustasync/tide/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/rustasync/tide/issues/194/comments","events_url":"https://api.github.com/repos/rustasync/tide/issues/194/events","html_url":"https://github.com/rustasync/tide/pull/194","id":438013683,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjc0MTUyMDI4","number":194,"title":"Middleware-based compression and decompression","user":{"login":"fairingrey","id":31905380,"node_id":"MDQ6VXNlcjMxOTA1Mzgw","avatar_url":"https://avatars2.githubusercontent.com/u/31905380?v=4","gravatar_id":"","url":"https://api.github.com/users/fairingrey","html_url":"https://github.com/fairingrey","followers_url":"https://api.github.com/users/fairingrey/followers","following_url":"https://api.github.com/users/fairingrey/following{/other_user}","gists_url":"https://api.github.com/users/fairingrey/gists{/gist_id}","starred_url":"https://api.github.com/users/fairingrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fairingrey/subscriptions","organizations_url":"https://api.github.com/users/fairingrey/orgs","repos_url":"https://api.github.com/users/fairingrey/repos","events_url":"https://api.github.com/users/fairingrey/events{/privacy}","received_events_url":"https://api.github.com/users/fairingrey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2019-04-28T04:53:47Z","updated_at":"2019-05-13T05:14:52Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/rustasync/tide/pulls/194","html_url":"https://github.com/rustasync/tide/pull/194","diff_url":"https://github.com/rustasync/tide/pull/194.diff","patch_url":"https://github.com/rustasync/tide/pull/194.patch"},"body":"<!--- Provide a general summary of your changes in the Title above -->\r\nProvides compression middleware for outgoing HTTP responses and decompression middleware for incoming HTTP requests.\r\n\r\n## Description\r\n<!--- Describe your changes in detail -->\r\nThese two middlewares do the following:\r\n\r\n* Automatically handle incoming request decompression for `Content-Encoding` headers that contain one or more applications of `gzip`, `deflate`, `br`, or `zstd`.\r\n* Encode outgoing responses with preferred encoding behavior for any incoming request with a valid `Accept-Encoding` header.\r\n* Allow one to define compression levels for each compression algorithm available.\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\nSuch a middleware would address https://github.com/rustasync/tide/issues/26.\r\n\r\nTide currently has no way of handling encoded requests or handling outgoing request compression. This middleware is one approach to solve that problem, although there exist a multitude of approaches that may work. This middleware may also serve as a point of discussion for https://github.com/rustasync/team/issues/52.\r\n\r\nAnother PR that seeks to do the same is https://github.com/rustasync/tide/pull/117, but it's currently outdated as it relies on an older version of Tide (pre-revamp and other changes).\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\nTests are written! They're not very thorough, but that's because it's only to test their functionality. More rigorous tests for each of the stream encoders/decoders are in the async-compression-rs crate.\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] My change requires a change to the documentation.\r\n- [x] I have updated the documentation accordingly.\r\n- [x] I have read the [CONTRIBUTING](https://github.com/rustasync/tide/blob/master/.github/CONTRIBUTING.md) document.\r\n- [x] I have added tests to cover my changes.\r\n- [x] All new and existing tests passed.\r\n"},"comment":{"url":"https://api.github.com/repos/rustasync/tide/issues/comments/491678477","html_url":"https://github.com/rustasync/tide/pull/194#issuecomment-491678477","issue_url":"https://api.github.com/repos/rustasync/tide/issues/194","id":491678477,"node_id":"MDEyOklzc3VlQ29tbWVudDQ5MTY3ODQ3Nw==","user":{"login":"fairingrey","id":31905380,"node_id":"MDQ6VXNlcjMxOTA1Mzgw","avatar_url":"https://avatars2.githubusercontent.com/u/31905380?v=4","gravatar_id":"","url":"https://api.github.com/users/fairingrey","html_url":"https://github.com/fairingrey","followers_url":"https://api.github.com/users/fairingrey/followers","following_url":"https://api.github.com/users/fairingrey/following{/other_user}","gists_url":"https://api.github.com/users/fairingrey/gists{/gist_id}","starred_url":"https://api.github.com/users/fairingrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fairingrey/subscriptions","organizations_url":"https://api.github.com/users/fairingrey/orgs","repos_url":"https://api.github.com/users/fairingrey/repos","events_url":"https://api.github.com/users/fairingrey/events{/privacy}","received_events_url":"https://api.github.com/users/fairingrey/received_events","type":"User","site_admin":false},"created_at":"2019-05-13T05:14:52Z","updated_at":"2019-05-13T05:14:52Z","author_association":"CONTRIBUTOR","body":"Oh, that's a good approach. Using `Option<Encoding>` actually hadn't crossed my mind while writing it, but I think it'd look pretty decent.\r\n\r\nI can rewrite that part in the Accept-Encoding crate such that when its' re-exported here I don't have to special-case it. I'll try it in a moment."}}
other: {"actor":{"display_login":"fairingrey"}}