Commit 21364c9
committed
Address review feedback on GzipDecompressor
- Remove unnecessary getattr() guard on unused_data since it's a
documented member of zlib.Decompress
- Simplify decompress loop by always passing remaining to
decompressobj.decompress() (0 means unlimited)
- Fix remaining calculation to not clamp negative values to 0,
which would incorrectly mean "no limit"1 parent b4baad1 commit 21364c9
1 file changed
Lines changed: 5 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 94 | + | |
99 | 95 | | |
100 | 96 | | |
101 | | - | |
102 | | - | |
103 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
104 | 100 | | |
105 | 101 | | |
106 | 102 | | |
107 | | - | |
| 103 | + | |
108 | 104 | | |
109 | 105 | | |
110 | 106 | | |
| |||
0 commit comments