···11+Permission is hereby granted, free of charge, to any person obtaining a copy
22+of this software and associated documentation files (the "Software"), to deal
33+in the Software without restriction, including without limitation the rights
44+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
55+copies of the Software, and to permit persons to whom the Software is
66+furnished to do so, subject to the following conditions:
77+88+The above copyright notice and this permission notice shall be included in all
99+copies or substantial portions of the Software.
1010+1111+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1212+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1313+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1414+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1515+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1616+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1717+SOFTWARE.
+13
README.md
···11+# maybe-decompression-stream
22+33+decompresses a stream of data if it is compressed with gzip, otherwise it passes the data through.
44+55+```ts
66+const response = await fetch('resource.tgz');
77+88+const stream = response.body.pipeThrough(new MaybeDecompressionStream());
99+1010+for await (const chunk of stream) {
1111+ // ...
1212+}
1313+```