Commit 1627bfc
authored
Optimize GzipDecoder (#430)
* Optimize GzipDecoder
- no heap allocation for footer which has fixed 8-byte size
- do not store unused header
- reset CrC instead of reassigning a new one
- optimize check_crc: rm unnecessary size check
Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
* Fix GzipDecoder
Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
---------
Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>1 parent 7bf1b99 commit 1627bfc
1 file changed
+8
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 22 | + | |
31 | 23 | | |
32 | 24 | | |
33 | 25 | | |
| |||
54 | 46 | | |
55 | 47 | | |
56 | 48 | | |
57 | | - | |
58 | 49 | | |
59 | 50 | | |
60 | 51 | | |
| |||
73 | 64 | | |
74 | 65 | | |
75 | 66 | | |
76 | | - | |
77 | | - | |
| 67 | + | |
78 | 68 | | |
79 | 69 | | |
80 | 70 | | |
| |||
92 | 82 | | |
93 | 83 | | |
94 | 84 | | |
95 | | - | |
| 85 | + | |
96 | 86 | | |
97 | 87 | | |
98 | 88 | | |
99 | 89 | | |
100 | 90 | | |
101 | 91 | | |
102 | 92 | | |
103 | | - | |
104 | | - | |
| 93 | + | |
| 94 | + | |
105 | 95 | | |
106 | 96 | | |
107 | 97 | | |
| |||
122 | 112 | | |
123 | 113 | | |
124 | 114 | | |
125 | | - | |
| 115 | + | |
126 | 116 | | |
127 | | - | |
128 | 117 | | |
129 | 118 | | |
130 | 119 | | |
| |||
0 commit comments