idnits 2.17.1 draft-snell-httpbis-bohe-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Introduction section. ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 189 has weird spacing: '... bit coun...' == Line 191 has weird spacing: '... bit coun...' == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (April 22, 2013) is 3993 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- -- Looks like a reference, but probably isn't: '25' on line 730 -- Looks like a reference, but probably isn't: '24' on line 821 -- Looks like a reference, but probably isn't: '12' on line 855 -- Looks like a reference, but probably isn't: '14' on line 823 -- Looks like a reference, but probably isn't: '15' on line 768 -- Looks like a reference, but probably isn't: '6' on line 856 -- Looks like a reference, but probably isn't: '7' on line 827 -- Looks like a reference, but probably isn't: '10' on line 819 -- Looks like a reference, but probably isn't: '5' on line 845 -- Looks like a reference, but probably isn't: '18' on line 789 -- Looks like a reference, but probably isn't: '17' on line 854 -- Looks like a reference, but probably isn't: '9' on line 851 -- Looks like a reference, but probably isn't: '13' on line 793 -- Looks like a reference, but probably isn't: '8' on line 907 -- Looks like a reference, but probably isn't: '11' on line 804 -- Looks like a reference, but probably isn't: '19' on line 825 -- Looks like a reference, but probably isn't: '4' on line 830 == Unused Reference: 'RFC2119' is defined on line 540, but no explicit reference was found in the text Summary: 2 errors (**), 0 flaws (~~), 5 warnings (==), 18 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group J.M. Snell 3 Internet-Draft April 22, 2013 4 Intended status: Informational 5 Expires: October 24, 2013 7 HTTP/2.0 Discussion: Stored Header Encoding 8 draft-snell-httpbis-bohe-06 10 Abstract 12 This memo describes a proposed alternative encoding for headers that 13 combines the best concepts from the proposed Delta and HeaderDiff 14 options with the typed value codecs introduced by previous versions 15 of this draft. 17 Status of This Memo 19 This Internet-Draft is submitted to IETF in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF). Note that other groups may also distribute 24 working documents as Internet-Drafts. The list of current Internet- 25 Drafts is at http://datatracker.ietf.org/drafts/current/. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 This Internet-Draft will expire on October 24, 2013. 34 Copyright Notice 36 Copyright (c) 2013 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (http://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. 46 Table of Contents 48 1. Stored Header Encoding . . . . . . . . . . . . . . . . . . . 2 49 2. State Model . . . . . . . . . . . . . . . . . . . . . . . . . 2 50 3. Header Serialization . . . . . . . . . . . . . . . . . . . . 4 51 3.1. Header Group Prefix . . . . . . . . . . . . . . . . . . . 6 52 3.2. Index Header Group . . . . . . . . . . . . . . . . . . . 7 53 3.3. Index Range Header Group . . . . . . . . . . . . . . . . 7 54 3.4. Cloned Index Header Group . . . . . . . . . . . . . . . . 8 55 3.5. Literal Header Group . . . . . . . . . . . . . . . . . . 8 56 4. Header Values . . . . . . . . . . . . . . . . . . . . . . . . 9 57 4.1. UTF-8 Text Values . . . . . . . . . . . . . . . . . . . . 10 58 4.2. Numeric Values . . . . . . . . . . . . . . . . . . . . . 10 59 4.3. Timestamp Values . . . . . . . . . . . . . . . . . . . . 10 60 4.4. Raw Binary Octet Values . . . . . . . . . . . . . . . . . 10 61 4.5. Unsigned Variable Length Integer Syntax . . . . . . . . . 10 62 4.6. Huffman Coding . . . . . . . . . . . . . . . . . . . . . 11 63 5. Security Considerations . . . . . . . . . . . . . . . . . . . 12 64 6. Normative References . . . . . . . . . . . . . . . . . . . . 12 65 Appendix A. Huffman Tables . . . . . . . . . . . . . . . . . . . 12 66 Appendix B. Static Storage Cache . . . . . . . . . . . . . . . . 20 67 Appendix C. State Management Alternatives . . . . . . . . . . . 23 68 Appendix D. Alternative uvarint encodings . . . . . . . . . . . 23 69 D.1. Option 1: . . . . . . . . . . . . . . . . . . . . . . . . 24 70 D.2. Option 2: . . . . . . . . . . . . . . . . . . . . . . . . 24 71 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 25 73 1. Stored Header Encoding 75 The Stored Header Encoding is an alternative "binary header encoding" 76 for HTTP/2.0 that combines the best elements from three other 77 proposed encodings, including: 79 o The "Header Delta Compression" scheme proposed by Roberto Peon in 80 http://tools.ietf.org/html/draft-rpeon-httpbis-header- 81 compression-03 83 o The "Header Diff" encoding proposed by Herve Reullan, Jun 84 Fujisawa, Romain Bellessort, and Youenn Fablet in http:// 85 tools.ietf.org/html/draft-ruellan-headerdiff-00 87 o The "Binary Optimized Header Encoding" proposed by James Snell 88 (me) in http://tools.ietf.org/html/draft-snell-httpbis-bohe-03 90 The Stored Header Encoding seeks to find an elegant, efficient and 91 simple marriage of the best concepts from each of these separate 92 proposals. 94 2. State Model 95 The compressor and decompressor each maintain a cache of header value 96 pairs. There is a static cache, prepopulated by the specification, 97 and a dynamic cache, populated through the compression and 98 decompression process. Each cache contains a maximum of 128 99 individual key+value pairs. 101 Each item in the index is referenced by an 8-bit identifier. The 102 most significant bit identifies whether an item from the static or 103 dynamic cache is being referenced. Note: the Nil byte (0x00) is a 104 valid identifier for the dynamic cache. 106 0xxxxxxx -- Dynamic Cache 107 1xxxxxxx -- Static Cache 109 The dynamic cache is managed in a "least recently written" style, 110 that is, as the cache fills to capacity in both number of entries and 111 maximum stored byte size, the least recently written items are 112 dropped and those index positions are reused. 114 Index positions from the dynamic cache are assigned in "encounter 115 order", beginning from 0x00 and increasing monotonically to 0x7F. 116 That is to say, the positions are assigned in precisely the same 117 order that they are serialized, and thereby encountered by the 118 decompressor upon reading and processing the block. 120 Each item in the store consists of a Header Name and a Value. The 121 Name is a lower-case ISO-8859-1 character sequence. The Value is 122 either a UTF-8 string, a number, a Timestamp or an arbitrary sequence 123 of binary octets. 125 The available size of the stored compression state can be capped by 126 the decompressor. Each stored value contributes to the accumulated 127 size of the storage state. As new key+value pairs are assigned 128 positions in the dynamic cache, the least-recently assigned items 129 must be removed if necessary to free up the required space. 131 The size of string values is measured by the number of UTF-8 bytes 132 required for the character sequence. 134 The size of number and timestamp values are measured by the number of 135 unsigned variable length integer (uvarint) encoded bytes it takes to 136 represent the value (see the section of value types below). 138 The size of raw binary values is measured by the number of octets. 140 Header names DO NOT contribute to the stored state size of the 141 compressor; only the size of the value is considered. Duplicate 142 values MUST be counted individually. 144 3. Header Serialization 146 Headers are serialized into four typed header groups, each 147 represented by a two-bit identifier. These groups are serialized 148 sequentially. A serialized header block can contain, at most 256 149 header groups. The first byte of the serialized block is an 150 unsigned, 0-based counter indicating the number of groups. A 151 serialized block MUST contain at least one header group. 153 00 -- Index Header Group 154 01 -- Index Range Header Group 155 10 -- Cloned Index Header Group 156 11 -- Literal Header Group 158 The Cloned Index (10) and Literal (11) header group types have an 159 additional "ephemeral" property that indicates whether or not the 160 group affects the compression state. 162 Each header group contains a single 8-bit prefix and up to 32 163 distinct header instances. 165 Wire Format 167 header-block = OCTET *(index-header-group / 168 index-range-header-group / 169 cloned-index-header-group / 170 literal-header-group) 172 ; Header Group Prefix = 8 bits ... 173 ; First two bits = header-group-type 174 ; Third bit = ephemeral flag 175 ; Final five bits = instance counter 176 ; 177 index-header-group-type = 00 178 index-range-group-type = 01 179 cloned-index-group-type = 10 180 literal-group-type = 11 181 count = 5bit 183 index-header-prefix = index-header-group-type 184 unset count ; 000xxxxx 185 index-range-header-prefix = index-header-group-type 186 unset count ; 010xxxxx 188 cloned-index-header-prefix = cloned-index-group-type 189 bit count ; 10?xxxxx 190 literal-header-prefix = literal-group-type 191 bit count ; 11?xxxxx 193 ; Cache Index Identifier = 8 bits ... 194 ; 0xxxxxxx = Dynamic Cache Identifier 195 ; 1xxxxxxx = Static Cache Identifier 196 cache-index = %x00-FF 198 ; Index Header Group 199 index-header-group = index-header-prefix 200 1*32cache-index 202 ; Index-Range Header Group 203 ; Contains a pair of cache-index values, second MUST 204 ; me strictly higher in value than the first... 205 index-range-header-group = index-range-header-prefix 206 1*32(cache-index cache-index) 208 ; Cloned-Index Header Group 209 cloned-index-header-group = cloned-index-header-prefix 210 1*32(cache-index value) 212 ; Literal Header Group 213 literal-header-group = literal-header-prefix 214 1*32(name value) 216 value = text-value / 217 number-value / 218 timestamp-value / 219 binary-value 221 text-value-type = 00 ; two bits 222 number-value-type = 01 223 timestamp-value-type = 10 224 binary-value-type = 11 226 text-value-prefix = text-value-type 227 unset count ; 000xxxxx 228 number-value-prefix = number-value-type 229 unset count ; 010xxxxx 230 timestamp-value-prefix = timestamp-value-type 231 unset count ; 100xxxxx 232 binary-value-prefix = binary-value-type 233 unset count ; 110xxxxx 235 text-value = text-value-prefix *32string 236 number-value = number-value-type *32uvarint 237 timestamp-value = timestamp-value-prefix *32uvarint 238 binary-value = binary-value-prefix uvarint *OCTET 240 uvarint = *uvarint-continuation uvarint-final 241 uvarint-continuation = %x80-FF 242 uvarint-final = %x00-7F 244 name = 1*tchar 245 tchar = "!" / "#" / "$" / "%" / "&" / 246 "'" / "*" / "+" / "-" / "." / 247 "^" / "_" / "`" / "|" / "~" 248 / DIGIT / ALPHA 250 string = uvarint *(HUFFMAN-ENCODED-CHAR) 251 HUFFMAN-EOF 252 padding-to-nearest-byte; 253 padding-to-nearest-byte = *7unset 255 bit = set / unset 256 unset = 0 257 set = 1 259 3.1. Header Group Prefix 261 The Header Group Prefix is a single octet that provides three 262 distinct pieces of information: 264 00 0 00000 266 The first two most significant bits of the header group prefix 267 identify the group type. 269 The next bit is the "ephemeral flag" and is used only for Cloned and 270 Literal group types. This bit indicates whether or not the group 271 alters the stored compression state. 273 The remaining five bits specify the number of header instances in the 274 group, with 00000 indicating that the group contains 1 instance and 275 11111 contains 32. A header group MUST contain at least one 276 instance. 278 The remaining serialization of the header group depends entirely on 279 the group type. 281 3.2. Index Header Group 283 The serialization of the Index Header Group consists of the Header 284 Group Prefix and up to 32 additional octets, each referencing a 285 single 8-bit storage index identifier for items in either the Static 286 or Dynamic Cache. 288 For instance 290 00000000 00000000 = References item #0 from 291 the dynamic cache 293 00000001 00000000 10000000 = References item #0 from the 294 dynamic cache and item #0 295 from the static cache 297 Index Header Groups do not affect the stored compression state. If 298 an Index Header Group references a header index that has not yet been 299 allocated, the deserialization MUST terminate with an error. This 300 likely means that the compression state has become out of sync and 301 needs to be reestablished. 303 3.3. Index Range Header Group 305 The serialization of the Index Range Header Group consists of the 306 Header Group Prefix and up to 32 additional 2-octet (16 bits) pairs 307 of 8-bit storage index identifiers. Each pair specifies a sequential 308 range of adjacent ranges. 310 For instance: 312 01000000 00000000 00000100 = References items #0-#4 from 313 the dynamic cache. 314 (five distinct items total) 316 A range MAY span dynamic and static index values. Index values are 317 treated as unsigned byte values, so indices from the static cache are 318 numerically greater than dynamic cache values.. e.g. 320 01000000 01111111 10000001 = References item #127 from the 321 dynamic cache, and items #0 322 and #1 from the static cache. 324 Index Range Header Groups do not affect the stored compression state. 325 If a range references a header index that has not yet been allocated, 326 the deserialization MUST terminate with an error. This likely means 327 that the compression state has become out of sync and needs to be 328 reestablished. 330 3.4. Cloned Index Header Group 332 The serialization of the Cloned Index Header Group consists of the 333 Header Group Prefix and up to 32 Index+Value pairs. Each Index+Value 334 pair consists of a leading 8-bit storage index of an existing stored 335 header followed by a new serialized value. The serialization of the 336 value depends on the value type (see discussion of Value 337 serialization below). 339 The Cloned Header Group affects the stored compression state if, and 340 only if, the "ephemeral" flag in the Header Group Prefix is NOT set. 341 If the header group is not marked as being ephemeral, then the 342 specified value is stored in the next available storage index using 343 the key name from the referenced storage index. 345 For instance, assume the dynamic cache currently contains an item at 346 index #1 with key name "foo" and value "bar", the following causes a 347 new item to be added to the storage with key name "foo" and value 348 "baz": 350 10000000 00000001 00000000 00000100 351 10111000 01001111 10110101 00100000 353 An explanation of the value syntax is given a bit later. 355 If a Cloned Header Group references a header index that has not yet 356 been allocated, the deserialization MUST terminate with an error. 357 This likely means that the compression state has become out of sync 358 and needs to be reestablished. 360 3.5. Literal Header Group 362 The serialization of the Literal Header Group consists of the Header 363 Group Prefix and up to 32 Name+Value pairs. Each Name+Value pair 364 consists of a length-prefixed sequence of ASCII bytes specifying the 365 Header Name followed by the serialized value. The serialization of 366 the value depends on the value type. The length prefix is encoded as 367 an unsigned variable length integer (uvarint). The length prefix 368 SHOULD NOT be longer than five octets and SHOULD NOT specify a value 369 larger than 0xFFFF. 371 The Literal Heaer Group affects the stored compression state if, and 372 only if, the "ephemeral" flag in the Header Group Prefix is NOT set. 374 If the header group is not marked as being ephemeral, then the 375 specified key name and value is stored in the next available storage 376 index. 378 For instance: 380 11000000 00000011 01100110 01101111 381 01101111 00000000 00000010 10111000 382 01000100 11010010 384 Stores a new header with name "foo" and value "baz" in the dynamic 385 cache. 387 Each Header Group consists of up to 32 distinct Header Instances. If 388 a particular serialization block contains more than 32 intances of a 389 given type, then multiple instances of the Header Group Type can be 390 included in the serialized block. For instance, if a given message 391 contains 33 index references, the serialized block may contain two 392 separate Index Header Groups. While this is allowed, it is expected 393 to be rare. 395 4. Header Values 397 Header Values can be one of four types, each identified by a two-bit 398 identifier. 400 o 00 -- UTF-8 Text 402 o 01 -- Numeric 404 o 10 -- Timetamp 406 o 11 -- Raw Binary Octets 408 An individual value MAY consist of up to 32 distinct discreet "value 409 instances". A value with multiple instances is considered, for all 410 intensive purposes, to be a single value. 412 Each serialized value is preceded by an 8-bit Value Prefix. 414 00 0 00000 416 The first two most significant bits specifies the value type. 418 The third significant bit is a reserved flag. Future iterations of 419 this specification might make use of this bit. 421 The final five least-significant bits specify the number of discreet 422 instances in the value. 00000 indicates that one instance is 423 included, 11111 indicates that 32 instances are included. The value 424 MUST contain at least one instance. 426 The remaining serialization depends entirely on the type. 428 4.1. UTF-8 Text Values 430 UTF-8 Text is encoded as a length-prefixed sequence of Huffman- 431 encoded UTF-8 octets. The length prefix is encoded as an unsigned 432 variable-length integer specifying the number of octets after 433 applying the Huffman-encoding. 435 4.2. Numeric Values 437 Numeric values are encoded as unsigned variable-length integers 438 (uvarint) of up to a maximum of 10-octets. Unsigned values larger 439 than 64-bits (0xFFFFFFFF) MUST NOT be used. Negative values cannot 440 be represented using this syntax. The uvarint syntax is described 441 below. 443 4.3. Timestamp Values 445 Timestamp values are encoded as unsigned variable-length integers 446 specifying the number of seconds that have passed since the standard 447 Epoch. The syntax is identical that used for Numeric Values. Dates 448 prior to the epoch cannot be represented using this syntax. 450 4.4. Raw Binary Octet Values 452 Binary values are encoded as a length prefixed sequence of arbitrary 453 octets. The length prefix is encoded as an unsigned variable length 454 integer. 456 4.5. Unsigned Variable Length Integer Syntax 458 The uvarint syntax is identical to that used by Google's protobufs. 459 They are serialized with the least-significant bytes first in batches 460 of 7-bits, with the most significant bit per byte reserved as a 461 continuation bit. Values less than or equal to 127 are serialized 462 using at most one byte; values less than or equal to 16383 are 463 serialized using at most two bytes; values less than or equal to 464 2097151 are serialized using at most three bytes. 466 def uvarint(num): 467 return [] if num = 0 468 ret = [] 469 while(num != 0): 470 m = num >>> 7 ; unsigned shift left 7 bits 471 ret.push (byte)((num & ~0x80) | ( m > 0 ? 0x80 : 0x00 )); 472 num = m; 473 return ret; 475 For example, the binary representation of the 32-bit integer 217 is: 477 00000000 00000000 00000000 11011001 479 The variable length encoding is: 481 11011001 00000001 483 The binary representation of the 32-bit integer 1386210052 is: 485 01010010 10011111 11100011 00000100 487 The variable length encoding is: 489 10000100 11000110 11111111 10010100 00000101 491 4.6. Huffman Coding 493 All UTF-8 text values are compressed using a modified static huffman 494 code. "Modified" because the encoded version may contain compact- 495 representations of raw, arbitrary UTF-8 bytes that are not covered by 496 the static huffman code table. 498 There are two huffman tables in use, one for HTTP Requests and 499 another for HTTP Responses, each covers UTF-8 codepoints strictly 500 less than 128 as well the fifty possible UTF-8 leading octets. 502 The encoded result MUST end with a specific terminal sequence of bits 503 called the "HUFFMAN_EOF". Currently, the HUFFMAN_EOF is the same for 504 both the Request and Response tables, but that could change if the 505 tables are regenerated. Currently, the HUFFMAN_EOF sequence is 506 101001. 508 Codepoints >= 128 are handled by first taking the leading octet of 509 the UTF-8 representation and serializing it's associated huffman code 510 from the table to the output stream, then, depending on the octets 511 value, serializing the six least significant bits from each of the 512 remaining trailing octets. 514 For instance, the UTF-8 character U+00D4 (LATIN CAPITAL LETTER O WITH 515 CIRCUMFLEX), with UTF-8 representation of C394 (hex) is encoded as: 517 11000100 01010010 10010000 519 The first 8-bits represents the huffman-table prefix, the first six 520 most significant bytes of the second octet are taken directly from 521 the six least significant bits of the second UTF-8 byte (0x94). 522 Following those six bits are the six bits of the HUFFMAN_EOF 101001, 523 followed by four unset padding bits. 525 The number of raw UTF-8 bits to write depends on the value of the 526 leading octet. If the value is between 0xC2 and 0xDF (inclusive), 527 six bits from the second continuation byte is encoded. If the value 528 is between 0xE0 and 0xEF (inclusive), six bits from the second and 529 third continuation bytes are encoded. If the value is between 0xF0 530 and 0xF4 (inclusive), six bits from the second, third and fourth 531 continuation bytes are encoded. UTF-8 codepoints that require 532 greater than four bytes to encode cannot be represented. 534 5. Security Considerations 536 TBD 538 6. Normative References 540 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 541 Requirement Levels", BCP 14, RFC 2119, March 1997. 543 Appendix A. Huffman Tables 545 Request Table 547 ( 0) |11111111|11111111|11111111|0 [25] 1fffffe [25] 548 ( 1) |11111111|11111111|11111111|1 [25] 1ffffff [25] 549 ( 2) |11111111|11111111|11100000 [24] ffffe0 [24] 550 ( 3) |11111111|11111111|11100001 [24] ffffe1 [24] 551 ( 4) |11111111|11111111|11100010 [24] ffffe2 [24] 552 ( 5) |11111111|11111111|11100011 [24] ffffe3 [24] 553 ( 6) |11111111|11111111|11100100 [24] ffffe4 [24] 554 ( 7) |11111111|11111111|11100101 [24] ffffe5 [24] 555 ( 8) |11111111|11111111|11100110 [24] ffffe6 [24] 556 ( 9) |11111111|11111111|11100111 [24] ffffe7 [24] 557 ( 10) |11111111|11111111|11101000 [24] ffffe8 [24] 558 ( 11) |11111111|11111111|11101001 [24] ffffe9 [24] 559 ( 12) |11111111|11111111|11101010 [24] ffffea [24] 560 ( 13) |11111111|11111111|11101011 [24] ffffeb [24] 561 ( 14) |11111111|11111111|11101100 [24] ffffec [24] 562 ( 15) |11111111|11111111|11101101 [24] ffffed [24] 563 ( 16) |11111111|11111111|11101110 [24] ffffee [24] 564 ( 17) |11111111|11111111|11101111 [24] ffffef [24] 565 ( 18) |11111111|11111111|11110000 [24] fffff0 [24] 566 ( 19) |11111111|11111111|11110001 [24] fffff1 [24] 567 ( 20) |11111111|11111111|11110010 [24] fffff2 [24] 568 ( 21) |11111111|11111111|11110011 [24] fffff3 [24] 569 ( 22) |11111111|11111111|11110100 [24] fffff4 [24] 570 ( 23) |11111111|11111111|11110101 [24] fffff5 [24] 571 ( 24) |11111111|11111111|11110110 [24] fffff6 [24] 572 ( 25) |11111111|11111111|11110111 [24] fffff7 [24] 573 ( 26) |11111111|11111111|11111000 [24] fffff8 [24] 574 ( 27) |11111111|11111111|11111001 [24] fffff9 [24] 575 ( 28) |11111111|11111111|11111010 [24] fffffa [24] 576 ( 29) |11111111|11111111|11111011 [24] fffffb [24] 577 ( 30) |11111111|11111111|11111100 [24] fffffc [24] 578 ( 31) |11111111|11111111|11111101 [24] fffffd [24] 579 ' ' ( 32) |11111111|0110 [12] ff6 [12] 580 '!' ( 33) |11111111|0111 [12] ff7 [12] 581 '"' ( 34) |11111111|111010 [14] 3ffa [14] 582 '#' ( 35) |11111111|1111100 [15] 7ffc [15] 583 '$' ( 36) |11111111|1111101 [15] 7ffd [15] 584 '%' ( 37) |011000 [6] 18 [6] 585 '&' ( 38) |1010100 [7] 54 [7] 586 ''' ( 39) |11111111|1111110 [15] 7ffe [15] 587 '(' ( 40) |11111111|1000 [12] ff8 [12] 588 ')' ( 41) |11111111|1001 [12] ff9 [12] 589 '*' ( 42) |11111111|1010 [12] ffa [12] 590 '+' ( 43) |11111111|1011 [12] ffb [12] 591 ',' ( 44) |11111011|10 [10] 3ee [10] 592 '-' ( 45) |011001 [6] 19 [6] 593 '.' ( 46) |00010 [5] 2 [5] 594 '/' ( 47) |00011 [5] 3 [5] 595 '0' ( 48) |011010 [6] 1a [6] 596 '1' ( 49) |011011 [6] 1b [6] 597 '2' ( 50) |011100 [6] 1c [6] 598 '3' ( 51) |011101 [6] 1d [6] 599 '4' ( 52) |1010101 [7] 55 [7] 600 '5' ( 53) |1010110 [7] 56 [7] 601 '6' ( 54) |1010111 [7] 57 [7] 602 '7' ( 55) |1011000 [7] 58 [7] 603 '8' ( 56) |1011001 [7] 59 [7] 604 '9' ( 57) |1011010 [7] 5a [7] 605 ':' ( 58) |011110 [6] 1e [6] 606 ';' ( 59) |11111011|11 [10] 3ef [10] 607 '<' ( 60) |11111111|11111111|10 [18] 3fffe [18] 608 '=' ( 61) |011111 [6] 1f [6] 609 '>' ( 62) |11111111|11111110|0 [17] 1fffc [17] 610 '?' ( 63) |11110110|0 [9] 1ec [9] 611 '@' ( 64) |11111111|11100 [13] 1ffc [13] 612 'A' ( 65) |10111010 [8] ba [8] 613 'B' ( 66) |11110110|1 [9] 1ed [9] 614 'C' ( 67) |10111011 [8] bb [8] 615 'D' ( 68) |10111100 [8] bc [8] 616 'E' ( 69) |11110111|0 [9] 1ee [9] 617 'F' ( 70) |10111101 [8] bd [8] 618 'G' ( 71) |11111100|00 [10] 3f0 [10] 619 'H' ( 72) |11111100|01 [10] 3f1 [10] 620 'I' ( 73) |11110111|1 [9] 1ef [9] 621 'J' ( 74) |11111100|10 [10] 3f2 [10] 622 'K' ( 75) |11111111|010 [11] 7fa [11] 623 'L' ( 76) |11111100|11 [10] 3f3 [10] 624 'M' ( 77) |11111000|0 [9] 1f0 [9] 625 'N' ( 78) |11111101|00 [10] 3f4 [10] 626 'O' ( 79) |11111101|01 [10] 3f5 [10] 627 'P' ( 80) |11111000|1 [9] 1f1 [9] 628 'Q' ( 81) |11111101|10 [10] 3f6 [10] 629 'R' ( 82) |11111001|0 [9] 1f2 [9] 630 'S' ( 83) |11111001|1 [9] 1f3 [9] 631 'T' ( 84) |11111010|0 [9] 1f4 [9] 632 'U' ( 85) |11111101|11 [10] 3f7 [10] 633 'V' ( 86) |11111110|00 [10] 3f8 [10] 634 'W' ( 87) |11111110|01 [10] 3f9 [10] 635 'X' ( 88) |11111110|10 [10] 3fa [10] 636 'Y' ( 89) |11111110|11 [10] 3fb [10] 637 'Z' ( 90) |11111111|00 [10] 3fc [10] 638 '[' ( 91) |11111111|111011 [14] 3ffb [14] 639 '\' ( 92) |11111111|11111111|11111110 [24] fffffe [24] 640 ']' ( 93) |11111111|111100 [14] 3ffc [14] 641 '^' ( 94) |11111111|111101 [14] 3ffd [14] 642 '_' ( 95) |1011011 [7] 5b [7] 643 '`' ( 96) |11111111|11111111|110 [19] 7fffe [19] 644 'a' ( 97) |00100 [5] 4 [5] 645 'b' ( 98) |1011100 [7] 5c [7] 646 'c' ( 99) |00101 [5] 5 [5] 647 'd' (100) |100000 [6] 20 [6] 648 'e' (101) |0000 [4] 0 [4] 649 'f' (102) |100001 [6] 21 [6] 650 'g' (103) |100010 [6] 22 [6] 651 'h' (104) |100011 [6] 23 [6] 652 'i' (105) |00110 [5] 6 [5] 653 'j' (106) |10111110 [8] be [8] 654 'k' (107) |10111111 [8] bf [8] 655 'l' (108) |100100 [6] 24 [6] 656 'm' (109) |100101 [6] 25 [6] 657 'n' (110) |100110 [6] 26 [6] 658 'o' (111) |00111 [5] 7 [5] 659 'p' (112) |01000 [5] 8 [5] 660 'q' (113) |11111010|1 [9] 1f5 [9] 661 'r' (114) |01001 [5] 9 [5] 662 's' (115) |01010 [5] a [5] 663 't' (116) |01011 [5] b [5] 664 'u' (117) |100111 [6] 27 [6] 665 'v' (118) |11000000 [8] c0 [8] 666 'w' (119) |101000 [6] 28 [6] 667 'x' (120) |11000001 [8] c1 [8] 668 'y' (121) |11000010 [8] c2 [8] 669 'z' (122) |11111011|0 [9] 1f6 [9] 670 '{' (123) |11111111|11111110|1 [17] 1fffd [17] 671 '|' (124) |11111111|1100 [12] ffc [12] 672 '}' (125) |11111111|11111111|0 [17] 1fffe [17] 673 '~' (126) |11111111|1101 [12] ffd [12] 674 (127) |101001 [6] 29 [6] 675 (0xC2) |11000011 [8] c3 [8] 676 (0xC3) |11000100 [8] c4 [8] 677 (0xC4) |11000101 [8] c5 [8] 678 (0xC5) |11000110 [8] c6 [8] 679 (0xC6) |11000111 [8] c7 [8] 680 (0xC7) |11001000 [8] c8 [8] 681 (0xC8) |11001001 [8] c9 [8] 682 (0xC9) |11001010 [8] ca [8] 683 (0xCA) |11001011 [8] cb [8] 684 (0xCB) |11001100 [8] cc [8] 685 (0xCC) |11001101 [8] cd [8] 686 (0xCD) |11001110 [8] ce [8] 687 (0xCE) |11001111 [8] cf [8] 688 (0xCF) |11010000 [8] d0 [8] 689 (0xD0) |11010001 [8] d1 [8] 690 (0xD1) |11010010 [8] d2 [8] 691 (0xD2) |11010011 [8] d3 [8] 692 (0xD3) |11010100 [8] d4 [8] 693 (0xD4) |11010101 [8] d5 [8] 694 (0xD5) |11010110 [8] d6 [8] 695 (0xD6) |11010111 [8] d7 [8] 696 (0xD7) |11011000 [8] d8 [8] 697 (0xD8) |11011001 [8] d9 [8] 698 (0xD9) |11011010 [8] da [8] 699 (0xDA) |11011011 [8] db [8] 700 (0xDB) |11011100 [8] dc [8] 701 (0xDC) |11011101 [8] dd [8] 702 (0xDD) |11011110 [8] de [8] 703 (0xDE) |11011111 [8] df [8] 704 (0xDF) |11100000 [8] e0 [8] 705 (0xE0) |11100001 [8] e1 [8] 706 (0xE1) |11100010 [8] e2 [8] 707 (0xE2) |11100011 [8] e3 [8] 708 (0xE3) |11100100 [8] e4 [8] 709 (0xE4) |11100101 [8] e5 [8] 710 (0xE5) |11100110 [8] e6 [8] 711 (0xE6) |11100111 [8] e7 [8] 712 (0xE7) |11101000 [8] e8 [8] 713 (0xE8) |11101001 [8] e9 [8] 714 (0xE9) |11101010 [8] ea [8] 715 (0xEA) |11101011 [8] eb [8] 716 (0xEB) |11101100 [8] ec [8] 717 (0xEC) |11101101 [8] ed [8] 718 (0xED) |11101110 [8] ee [8] 719 (0xEE) |11101111 [8] ef [8] 720 (0xEF) |11110000 [8] f0 [8] 721 (0xF0) |11110001 [8] f1 [8] 722 (0xF1) |11110010 [8] f2 [8] 723 (0xF2) |11110011 [8] f3 [8] 724 (0xF3) |11110100 [8] f4 [8] 725 (0xF4) |11110101 [8] f5 [8] 727 Response Table: 729 ( 0) |11111111|11111111|11111111|0 [25] 1fffffe [25] 730 ( 1) |11111111|11111111|11111111|1 [25] 1ffffff [25] 731 ( 2) |11111111|11111111|11100000 [24] ffffe0 [24] 732 ( 3) |11111111|11111111|11100001 [24] ffffe1 [24] 733 ( 4) |11111111|11111111|11100010 [24] ffffe2 [24] 734 ( 5) |11111111|11111111|11100011 [24] ffffe3 [24] 735 ( 6) |11111111|11111111|11100100 [24] ffffe4 [24] 736 ( 7) |11111111|11111111|11100101 [24] ffffe5 [24] 737 ( 8) |11111111|11111111|11100110 [24] ffffe6 [24] 738 ( 9) |11111111|11111111|11100111 [24] ffffe7 [24] 739 ( 10) |11111111|11111111|11101000 [24] ffffe8 [24] 740 ( 11) |11111111|11111111|11101001 [24] ffffe9 [24] 741 ( 12) |11111111|11111111|11101010 [24] ffffea [24] 742 ( 13) |11111111|11111111|11101011 [24] ffffeb [24] 743 ( 14) |11111111|11111111|11101100 [24] ffffec [24] 744 ( 15) |11111111|11111111|11101101 [24] ffffed [24] 745 ( 16) |11111111|11111111|11101110 [24] ffffee [24] 746 ( 17) |11111111|11111111|11101111 [24] ffffef [24] 747 ( 18) |11111111|11111111|11110000 [24] fffff0 [24] 748 ( 19) |11111111|11111111|11110001 [24] fffff1 [24] 749 ( 20) |11111111|11111111|11110010 [24] fffff2 [24] 750 ( 21) |11111111|11111111|11110011 [24] fffff3 [24] 751 ( 22) |11111111|11111111|11110100 [24] fffff4 [24] 752 ( 23) |11111111|11111111|11110101 [24] fffff5 [24] 753 ( 24) |11111111|11111111|11110110 [24] fffff6 [24] 754 ( 25) |11111111|11111111|11110111 [24] fffff7 [24] 755 ( 26) |11111111|11111111|11111000 [24] fffff8 [24] 756 ( 27) |11111111|11111111|11111001 [24] fffff9 [24] 757 ( 28) |11111111|11111111|11111010 [24] fffffa [24] 758 ( 29) |11111111|11111111|11111011 [24] fffffb [24] 759 ( 30) |11111111|11111111|11111100 [24] fffffc [24] 760 ( 31) |11111111|11111111|11111101 [24] fffffd [24] 761 ' ' ( 32) |11111111|0110 [12] ff6 [12] 762 '!' ( 33) |11111111|0111 [12] ff7 [12] 763 '"' ( 34) |11111111|111010 [14] 3ffa [14] 764 '#' ( 35) |11111111|1111100 [15] 7ffc [15] 765 '$' ( 36) |11111111|1111101 [15] 7ffd [15] 766 '%' ( 37) |011000 [6] 18 [6] 767 '&' ( 38) |1010100 [7] 54 [7] 768 ''' ( 39) |11111111|1111110 [15] 7ffe [15] 769 '(' ( 40) |11111111|1000 [12] ff8 [12] 770 ')' ( 41) |11111111|1001 [12] ff9 [12] 771 '*' ( 42) |11111111|1010 [12] ffa [12] 772 '+' ( 43) |11111111|1011 [12] ffb [12] 773 ',' ( 44) |11111011|10 [10] 3ee [10] 774 '-' ( 45) |011001 [6] 19 [6] 775 '.' ( 46) |00010 [5] 2 [5] 776 '/' ( 47) |00011 [5] 3 [5] 777 '0' ( 48) |011010 [6] 1a [6] 778 '1' ( 49) |011011 [6] 1b [6] 779 '2' ( 50) |011100 [6] 1c [6] 780 '3' ( 51) |011101 [6] 1d [6] 781 '4' ( 52) |1010101 [7] 55 [7] 782 '5' ( 53) |1010110 [7] 56 [7] 783 '6' ( 54) |1010111 [7] 57 [7] 784 '7' ( 55) |1011000 [7] 58 [7] 785 '8' ( 56) |1011001 [7] 59 [7] 786 '9' ( 57) |1011010 [7] 5a [7] 787 ':' ( 58) |011110 [6] 1e [6] 788 ';' ( 59) |11111011|11 [10] 3ef [10] 789 '<' ( 60) |11111111|11111111|10 [18] 3fffe [18] 790 '=' ( 61) |011111 [6] 1f [6] 791 '>' ( 62) |11111111|11111110|0 [17] 1fffc [17] 792 '?' ( 63) |11110110|0 [9] 1ec [9] 793 '@' ( 64) |11111111|11100 [13] 1ffc [13] 794 'A' ( 65) |10111010 [8] ba [8] 795 'B' ( 66) |11110110|1 [9] 1ed [9] 796 'C' ( 67) |10111011 [8] bb [8] 797 'D' ( 68) |10111100 [8] bc [8] 798 'E' ( 69) |11110111|0 [9] 1ee [9] 799 'F' ( 70) |10111101 [8] bd [8] 800 'G' ( 71) |11111100|00 [10] 3f0 [10] 801 'H' ( 72) |11111100|01 [10] 3f1 [10] 802 'I' ( 73) |11110111|1 [9] 1ef [9] 803 'J' ( 74) |11111100|10 [10] 3f2 [10] 804 'K' ( 75) |11111111|010 [11] 7fa [11] 805 'L' ( 76) |11111100|11 [10] 3f3 [10] 806 'M' ( 77) |11111000|0 [9] 1f0 [9] 807 'N' ( 78) |11111101|00 [10] 3f4 [10] 808 'O' ( 79) |11111101|01 [10] 3f5 [10] 809 'P' ( 80) |11111000|1 [9] 1f1 [9] 810 'Q' ( 81) |11111101|10 [10] 3f6 [10] 811 'R' ( 82) |11111001|0 [9] 1f2 [9] 812 'S' ( 83) |11111001|1 [9] 1f3 [9] 813 'T' ( 84) |11111010|0 [9] 1f4 [9] 814 'U' ( 85) |11111101|11 [10] 3f7 [10] 815 'V' ( 86) |11111110|00 [10] 3f8 [10] 816 'W' ( 87) |11111110|01 [10] 3f9 [10] 817 'X' ( 88) |11111110|10 [10] 3fa [10] 818 'Y' ( 89) |11111110|11 [10] 3fb [10] 819 'Z' ( 90) |11111111|00 [10] 3fc [10] 820 '[' ( 91) |11111111|111011 [14] 3ffb [14] 821 '\' ( 92) |11111111|11111111|11111110 [24] fffffe [24] 822 ']' ( 93) |11111111|111100 [14] 3ffc [14] 823 '^' ( 94) |11111111|111101 [14] 3ffd [14] 824 '_' ( 95) |1011011 [7] 5b [7] 825 '`' ( 96) |11111111|11111111|110 [19] 7fffe [19] 826 'a' ( 97) |00100 [5] 4 [5] 827 'b' ( 98) |1011100 [7] 5c [7] 828 'c' ( 99) |00101 [5] 5 [5] 829 'd' (100) |100000 [6] 20 [6] 830 'e' (101) |0000 [4] 0 [4] 831 'f' (102) |100001 [6] 21 [6] 832 'g' (103) |100010 [6] 22 [6] 833 'h' (104) |100011 [6] 23 [6] 834 'i' (105) |00110 [5] 6 [5] 835 'j' (106) |10111110 [8] be [8] 836 'k' (107) |10111111 [8] bf [8] 837 'l' (108) |100100 [6] 24 [6] 838 'm' (109) |100101 [6] 25 [6] 839 'n' (110) |100110 [6] 26 [6] 840 'o' (111) |00111 [5] 7 [5] 841 'p' (112) |01000 [5] 8 [5] 842 'q' (113) |11111010|1 [9] 1f5 [9] 843 'r' (114) |01001 [5] 9 [5] 844 's' (115) |01010 [5] a [5] 845 't' (116) |01011 [5] b [5] 846 'u' (117) |100111 [6] 27 [6] 847 'v' (118) |11000000 [8] c0 [8] 848 'w' (119) |101000 [6] 28 [6] 849 'x' (120) |11000001 [8] c1 [8] 850 'y' (121) |11000010 [8] c2 [8] 851 'z' (122) |11111011|0 [9] 1f6 [9] 852 '{' (123) |11111111|11111110|1 [17] 1fffd [17] 853 '|' (124) |11111111|1100 [12] ffc [12] 854 '}' (125) |11111111|11111111|0 [17] 1fffe [17] 855 '~' (126) |11111111|1101 [12] ffd [12] 856 (127) |101001 [6] 29 [6] 857 (0xC2) |11000011 [8] c3 [8] 858 (0xC3) |11000100 [8] c4 [8] 859 (0xC4) |11000101 [8] c5 [8] 860 (0xC5) |11000110 [8] c6 [8] 861 (0xC6) |11000111 [8] c7 [8] 862 (0xC7) |11001000 [8] c8 [8] 863 (0xC8) |11001001 [8] c9 [8] 864 (0xC9) |11001010 [8] ca [8] 865 (0xCA) |11001011 [8] cb [8] 866 (0xCB) |11001100 [8] cc [8] 867 (0xCC) |11001101 [8] cd [8] 868 (0xCD) |11001110 [8] ce [8] 869 (0xCE) |11001111 [8] cf [8] 870 (0xCF) |11010000 [8] d0 [8] 871 (0xD0) |11010001 [8] d1 [8] 872 (0xD1) |11010010 [8] d2 [8] 873 (0xD2) |11010011 [8] d3 [8] 874 (0xD3) |11010100 [8] d4 [8] 875 (0xD4) |11010101 [8] d5 [8] 876 (0xD5) |11010110 [8] d6 [8] 877 (0xD6) |11010111 [8] d7 [8] 878 (0xD7) |11011000 [8] d8 [8] 879 (0xD8) |11011001 [8] d9 [8] 880 (0xD9) |11011010 [8] da [8] 881 (0xDA) |11011011 [8] db [8] 882 (0xDB) |11011100 [8] dc [8] 883 (0xDC) |11011101 [8] dd [8] 884 (0xDD) |11011110 [8] de [8] 885 (0xDE) |11011111 [8] df [8] 886 (0xDF) |11100000 [8] e0 [8] 887 (0xE0) |11100001 [8] e1 [8] 888 (0xE1) |11100010 [8] e2 [8] 889 (0xE2) |11100011 [8] e3 [8] 890 (0xE3) |11100100 [8] e4 [8] 891 (0xE4) |11100101 [8] e5 [8] 892 (0xE5) |11100110 [8] e6 [8] 893 (0xE6) |11100111 [8] e7 [8] 894 (0xE7) |11101000 [8] e8 [8] 895 (0xE8) |11101001 [8] e9 [8] 896 (0xE9) |11101010 [8] ea [8] 897 (0xEA) |11101011 [8] eb [8] 898 (0xEB) |11101100 [8] ec [8] 899 (0xEC) |11101101 [8] ed [8] 900 (0xED) |11101110 [8] ee [8] 901 (0xEE) |11101111 [8] ef [8] 902 (0xEF) |11110000 [8] f0 [8] 903 (0xF0) |11110001 [8] f1 [8] 904 (0xF1) |11110010 [8] f2 [8] 905 (0xF2) |11110011 [8] f3 [8] 906 (0xF3) |11110100 [8] f4 [8] 907 (0xF4) |11110101 [8] f5 [8] 909 Appendix B. Static Storage Cache 911 0x80 "date" = NIL 912 0x81 ":scheme" = "https" 913 0x82 ":scheme" = "http" 914 0x83 ":scheme" = "ftp" 915 0x84 ":method" = "get" 916 0x85 ":method" = "post" 917 0x86 ":method" = "put" 918 0x87 ":method" = "delete" 919 0x88 ":method" = "options" 920 0x89 ":method" = "patch" 921 0x8A ":method" = "connect" 922 0x8B ":path" = "/" 923 0x8C ":host" = NIL 924 0x8D "cookie" = NIL 925 0x8E ":status" = 100 926 0x8F ":status" = 101 927 0x90 ":status" = 102 928 0x91 ":status" = 200 929 0x92 ":status" = 201 930 0x93 ":status" = 202 931 0x94 ":status" = 203 932 0x95 ":status" = 204 933 0x96 ":status" = 205 934 0x97 ":status" = 206 935 0x98 ":status" = 207 936 0x99 ":status" = 208 937 0x9A ":status" = 300 938 0x9B ":status" = 301 939 0x9C ":status" = 302 940 0x9D ":status" = 303 941 0x9E ":status" = 304 942 0x9F ":status" = 305 943 0xA0 ":status" = 307 944 0xA1 ":status" = 308 945 0xA2 ":status" = 400 946 0xA3 ":status" = 401 947 0xA4 ":status" = 402 948 0xA5 ":status" = 403 949 0xA6 ":status" = 404 950 0xA7 ":status" = 405 951 0xA8 ":status" = 406 952 0xA9 ":status" = 407 953 0xAA ":status" = 408 954 0xAB ":status" = 409 955 0xAC ":status" = 410 956 0xAD ":status" = 411 957 0xAE ":status" = 412 958 0xAF ":status" = 413 959 0xB0 ":status" = 414 960 0xB1 ":status" = 415 961 0xB2 ":status" = 416 962 0xB3 ":status" = 417 963 0xB4 ":status" = 500 964 0xB5 ":status" = 501 965 0xB6 ":status" = 502 966 0xB7 ":status" = 503 967 0xB8 ":status" = 504 968 0xB9 ":status" = 505 969 0xBA ":status-text" = "OK" 970 0xBB ":version" = "1.1" 971 0xBC "accept" = NIL 972 0xBD "accept-charset" = NIL 973 0xBE "accept-encoding" = NIL 974 0xBF "accept-language" = NIL 975 0xC0 "accept-ranges" = NIL 976 0xC1 "allow" = NIL 977 0xC2 "authorization" = NIL 978 0xC3 "cache-control" = NIL 979 0xC4 "content-base" = NIL 980 0xC5 "content-encoding" = NIL 981 0xC6 "content-length" = NIL 982 0xC7 "content-location" = NIL 983 0xC8 "content-md5" = NIL 984 0xC9 "content-range" = NIL 985 0xCA "content-type" = NIL 986 0xCB "content-disposition" = NIL 987 0xCC "content-language" = NIL 988 0xCD "etag" = NIL 989 0xCE "expect" = NIL 990 0xCF "expires" = NIL 991 0xD0 "from" = NIL 992 0xD1 "if-match" = NIL 993 0xD2 "if-modified-since" = NIL 994 0xD3 "if-none-match" = NIL 995 0xD4 "if-range" = NIL 996 0xD5 "if-unmodified-since" = NIL 997 0xD6 "last-modified" = NIL 998 0xD7 "location" = NIL 999 0xD8 "max-forwards" = NIL 1000 0xD9 "origin" = NIL 1001 0xDA "pragma" = NIL 1002 0xDB "proxy-authenticate" = NIL 1003 0xDC "proxy-authorization" = NIL 1004 0xDD "range" = NIL 1005 0xDE "referer" = NIL 1006 0xDF "retry-after" = NIL 1007 0xE0 "server" = NIL 1008 0xE1 "set-cookie" = NIL 1009 0xE2 "status" = NIL 1010 0xE3 "te" = NIL 1011 0xE4 "trailer" = NIL 1012 0xE5 "transfer-encoding" = NIL 1013 0xE6 "upgrade" = NIL 1014 0xE7 "user-agent" = NIL 1015 0xE8 "vary" = NIL 1016 0xE9 "via" = NIL 1017 0xEA "warning" = NIL 1018 0xEB "www-authenticate" = NIL 1019 0xEC "access-control-allow-origin" = NIL 1020 0xED "get-dictionary" = NIL 1021 0xEE "p3p" = NIL 1022 0xEF "link" = NIL 1023 0xF0 "prefer" = NIL 1024 0xF1 "preference-applied" = NIL 1025 0xF2 "accept-patch" = NIL 1026 0xF3 NIL 1027 0xF4 NIL 1028 0xF5 NIL 1029 0xF6 NIL 1030 0xF7 NIL 1031 0xF8 NIL 1032 0xF9 NIL 1033 0xFA NIL 1034 0xFB NIL 1035 0xFC NIL 1036 0xFD NIL 1037 0xFE NIL 1038 0xFF NIL 1040 Appendix C. State Management Alternatives 1042 In the current design, dynamic cache storage slots are assigned by 1043 the decompressor in "encounter order". While this is effective, it 1044 requires that all compressor and decompressor implementations utilize 1045 the exact same algorithm for assigning storage slots, precluding any 1046 implementation from experimenting with more efficient algorithms. An 1047 alternative approach is to allow the compressor to assign the slots 1048 and communicate the assigned slots with each header. This would 1049 require a single additional byte per header instance in the Literal 1050 and Cloned Header Groups. 1052 The serialization syntax for Cloned and Literal Header Groups would 1053 change to: 1055 ; Cloned-Index Header Group 1056 cloned-index-header-group = cloned-index-header-prefix 1057 1*32(cache-index cache-index value) 1059 ; Literal Header Group 1060 literal-header-group = literal-header-prefix 1061 1*32(cache-index name value) 1063 The decompressor would used the specified storage index locations to 1064 store header values rather than relying on the encounter order, 1065 increasing the general efficiency of the algorithm with a minimal 1066 impact on transmission size. 1068 Appendix D. Alternative uvarint encodings 1070 The uvarint encoding currently specified by this specification is 1071 certainly not the only possible option we can use. I chose it simply 1072 because it is drop dead simple to implement. There are quite a few 1073 other approaches we can take, each of which can be used as drop-in 1074 replacements for the current approach. Below are just a couple 1075 alternatives. There are plenty others. We just need to pick the one 1076 that we feel will work the best. 1078 D.1. Option 1: 1080 With this option, leading bits are used to indicate the total number 1081 of bytes used to encode the number value, with no fixed upper limit. 1082 Values strictly less than 128 are encoded using a single byte. 1084 0 xxxxxxx 1085 10 xxxxxx OCTET 1086 110 xxxxx 2OCTET 1087 1110 xxxx 3OCTET 1088 11110 xxx 4OCTET 1089 111110 xx 5OCTET 1090 1111110 x 6OCTET 1091 11111110 7OCTET 1092 11111111 0xxxxxxx 7OCTET 1093 11111111 10xxxxxx 8OCTET 1094 ... 1096 The number of leading 1 bits specify the number of additional bytes 1097 used to serialize the value. A single 0 bit is used to mark the end 1098 of this prefix, the remaining bits are used to encode the minimum 1099 bits necessary to encode the value (with appropriate leading 0 bits 1100 to ensure proper byte-alignment). 1102 For instance, the integer value 500, which is represented in binary 1103 as 00000001 11110100, can be encoded using two bytes, 10000001 1104 11110100 1106 The integer value 9770098, which is represented in binary as 10010101 1107 00010100 01110010, can be encoded using four bytes: 11100000 10010101 1108 00010100 01110010 1110 D.2. Option 2: 1112 This option is generally identical to the previous with the exception 1113 of being capped at a maximum of nine encoded octets total. Rather 1114 than growing indefinitely, the encoded value must never require more 1115 then eight continuation bytes to encode. Because of this 1116 restriction, there is no need for a trailing 0-bit spilling over past 1117 the first leading byte. 1119 0 xxxxxxx 1120 10 xxxxxx OCTET 1121 110 xxxxx 2OCTET 1122 1110 xxxx 3OCTET 1123 11110 xxx 4OCTET 1124 111110 xx 5OCTET 1125 1111110 x 6OCTET 1126 11111110 7OCTET 1127 11111111 8OCTET 1128 ... 1130 The number of leading 1 bits specify the number of additional bytes 1131 used to serialize the value. If the number of bytes required is less 1132 than 8, a single 0 bit is used to mark the end of this prefix, the 1133 remaining bits are used to encode the minimum bits necessary to 1134 encode the value (with appropriate leading 0 bits to ensure proper 1135 byte-alignment). 1137 For instance, the integer value 500, which is represented in binary 1138 as 00000001 11110100, can be encoded using two bytes, 10000001 1139 11110100 1141 The integer value 9770098, which is represented in binary as 10010101 1142 00010100 01110010, can be encoded using four bytes: 11100000 10010101 1143 00010100 01110010 1145 This format is not capable of encoding any number requiring more than 1146 64-bits. 1148 Author's Address 1150 James M Snell 1152 Email: jasnell@gmail.com