Commit c09b4a0
committed
fix(handlers): improve gzip reader according to recent changes in cpython.
The gzip._GzipReader we're inheriting from had some changes to stay up
to date with changes in zlib library and to perform some optimization.
Specifically:
- GzipFile.read has been optimized. There is no longer a unconsumed_tail
member to write back to padded file. This is instead handled by the
ZlibDecompressor itself, which has an internal buffer.
- _add_read_data has been inlined, as it was just two calls.
We've adapted our own code to reflect these changes.
More info: python/cpython#976641 parent 43dc0c7 commit c09b4a0
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
13 | 18 | | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
20 | | - | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
| |||
0 commit comments