| 1 |
Enhanced Deflate note |
| 2 |
===================== |
| 3 |
|
| 4 |
Enhanced Deflate is a slightly modified variant of the Deflate procedure. |
| 5 |
The fundamental mechanisms remained completely unchanged, only the following features were improved. |
| 6 |
|
| 7 |
Dictionary size to 64 Kbytes |
| 8 |
---------------------------- |
| 9 |
|
| 10 |
The addressable size of the sliding dictionary is extended from 32 kbytes to 64 kbytes. |
| 11 |
Enhanced deflate detects matches from 65536 bytes distance and maximum 65530 bytes length. |
| 12 |
A definition is placed in ``inflate64_config.h``. |
| 13 |
|
| 14 |
Length code |
| 15 |
------------ |
| 16 |
|
| 17 |
Last length code (285) will be extended by 16 extra bits. |
| 18 |
It represent length 258 and extension bit width is 0 in deflate. |
| 19 |
Otherwise it represent length 258-65536 and extension bit widths are 16 in enhanced deflate |
| 20 |
The code defines lengths in a range between 3 and 65.538 byte. |
| 21 |
The original limitation to 258 byte sequences is dropped with that. |
| 22 |
|
| 23 |
.. list-table:: Length code table |
| 24 |
:widths: 40, 40, 25 |
| 25 |
:header-rows: 1 |
| 26 |
|
| 27 |
* - Length |
| 28 |
- Code |
| 29 |
- Ext bitwidth |
| 30 |
* - 3 |
| 31 |
- 257 |
| 32 |
- 0 |
| 33 |
* - 4 |
| 34 |
- 258 |
| 35 |
- 0 |
| 36 |
* - 5 |
| 37 |
- 259 |
| 38 |
- 0 |
| 39 |
* - 6 |
| 40 |
- 260 |
| 41 |
- 0 |
| 42 |
* - 7 |
| 43 |
- 261 |
| 44 |
- 0 |
| 45 |
* - 8 |
| 46 |
- 262 |
| 47 |
- 0 |
| 48 |
* - 9 |
| 49 |
- 263 |
| 50 |
- 0 |
| 51 |
* - 10 |
| 52 |
- 264 |
| 53 |
- 0 |
| 54 |
* - 11,12 |
| 55 |
- 265 |
| 56 |
- 1 |
| 57 |
* - 13,14 |
| 58 |
- 266 |
| 59 |
- 1 |
| 60 |
* - 15,16 |
| 61 |
- 267 |
| 62 |
- 1 |
| 63 |
* - 17,18 |
| 64 |
- 268 |
| 65 |
- 1 |
| 66 |
* - 19-22 |
| 67 |
- 269 |
| 68 |
- 2 |
| 69 |
* - 23-26 |
| 70 |
- 270 |
| 71 |
- 2 |
| 72 |
* - 27-30 |
| 73 |
- 271 |
| 74 |
- 2 |
| 75 |
* - 31-34 |
| 76 |
- 272 |
| 77 |
- 2 |
| 78 |
* - 35-42 |
| 79 |
- 273 |
| 80 |
- 3 |
| 81 |
* - 43-50 |
| 82 |
- 274 |
| 83 |
- 3 |
| 84 |
* - 51-58 |
| 85 |
- 275 |
| 86 |
- 3 |
| 87 |
* - 59-66 |
| 88 |
- 276 |
| 89 |
- 3 |
| 90 |
* - 67-82 |
| 91 |
- 277 |
| 92 |
- 4 |
| 93 |
* - 83-98 |
| 94 |
- 278 |
| 95 |
- 4 |
| 96 |
* - 99-114 |
| 97 |
- 279 |
| 98 |
- 4 |
| 99 |
* - 115-130 |
| 100 |
- 280 |
| 101 |
- 4 |
| 102 |
* - 131-162 |
| 103 |
- 281 |
| 104 |
- 5 |
| 105 |
* - 163-194 |
| 106 |
- 282 |
| 107 |
- 5 |
| 108 |
* - 195-226 |
| 109 |
- 283 |
| 110 |
- 5 |
| 111 |
* - 227-258 |
| 112 |
- 284 |
| 113 |
- 5 |
| 114 |
* - 259-65536 |
| 115 |
- 285 |
| 116 |
- 16 |
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
Distance code |
| 121 |
------------- |
| 122 |
|
| 123 |
The distance codes (30 and 31) not used until now are extended to address a range of 64 kbytes. |
| 124 |
According to the conventional Deflate definition these codes were not used. |
| 125 |
14 extra bits are assigned to each of them. |
| 126 |
Details definition is described following. |
| 127 |
|
| 128 |
.. list-table:: Distance code table |
| 129 |
:widths: 40, 40, 25 |
| 130 |
:header-rows: 1 |
| 131 |
|
| 132 |
* - Distance |
| 133 |
- Code |
| 134 |
- Ext bitwidth |
| 135 |
* - 1 |
| 136 |
- 0 |
| 137 |
- 0 |
| 138 |
* - 2 |
| 139 |
- 1 |
| 140 |
- 0 |
| 141 |
* - 3 |
| 142 |
- 2 |
| 143 |
- 0 |
| 144 |
* - 4 |
| 145 |
- 3 |
| 146 |
- 0 |
| 147 |
* - 5,6 |
| 148 |
- 4 |
| 149 |
- 1 |
| 150 |
* - 7,8 |
| 151 |
- 5 |
| 152 |
- 1 |
| 153 |
* - 9-12 |
| 154 |
- 6 |
| 155 |
- 2 |
| 156 |
* - 13-16 |
| 157 |
- 7 |
| 158 |
- 2 |
| 159 |
* - 17-24 |
| 160 |
- 8 |
| 161 |
- 3 |
| 162 |
* - 25-32 |
| 163 |
- 9 |
| 164 |
- 3 |
| 165 |
* - 33-48 |
| 166 |
- 10 |
| 167 |
- 4 |
| 168 |
* - 49-64 |
| 169 |
- 11 |
| 170 |
- 4 |
| 171 |
* - 65-96 |
| 172 |
- 12 |
| 173 |
- 5 |
| 174 |
* - 97-128 |
| 175 |
- 13 |
| 176 |
- 5 |
| 177 |
* - 129-192 |
| 178 |
- 14 |
| 179 |
- 6 |
| 180 |
* - 193-256 |
| 181 |
- 15 |
| 182 |
- 6 |
| 183 |
* - 257-384 |
| 184 |
- 16 |
| 185 |
- 7 |
| 186 |
* - 385-512 |
| 187 |
- 17 |
| 188 |
- 7 |
| 189 |
* - 513-768 |
| 190 |
- 18 |
| 191 |
- 8 |
| 192 |
* - 769-1024 |
| 193 |
- 19 |
| 194 |
- 8 |
| 195 |
* - 1025-1536 |
| 196 |
- 20 |
| 197 |
- 9 |
| 198 |
* - 1537-2048 |
| 199 |
- 21 |
| 200 |
- 9 |
| 201 |
* - 2049-3072 |
| 202 |
- 22 |
| 203 |
- 10 |
| 204 |
* - 3073-4096 |
| 205 |
- 23 |
| 206 |
- 10 |
| 207 |
* - 4097-6144 |
| 208 |
- 24 |
| 209 |
- 11 |
| 210 |
* - 6145-8192 |
| 211 |
- 25 |
| 212 |
- 11 |
| 213 |
* - 8193-12288 |
| 214 |
- 26 |
| 215 |
- 12 |
| 216 |
* - 12289-16384 |
| 217 |
- 27 |
| 218 |
- 12 |
| 219 |
* - 16385-24576 |
| 220 |
- 28 |
| 221 |
- 13 |
| 222 |
* - 24577-32768 |
| 223 |
- 29 |
| 224 |
- 13 |
| 225 |
* - 32769-49152 |
| 226 |
- 30 |
| 227 |
- 14 |
| 228 |
* - 49153-65536 |
| 229 |
- 31 |
| 230 |
- 14 |
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
|