idnits 2.17.1 draft-ietf-hybi-permessage-compression-18.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (May 13, 2014) is 3607 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Downref: Normative reference to an Informational RFC: RFC 1951 -- Possible downref: Non-RFC (?) normative reference: ref. 'LZ77' Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 HyBi Working Group T. Yoshino 3 Internet-Draft Google, Inc. 4 Intended status: Standards Track May 13, 2014 5 Expires: November 14, 2014 7 Compression Extensions for WebSocket 8 draft-ietf-hybi-permessage-compression-18 10 Abstract 12 This document specifies a framework for creating WebSocket extensions 13 that add compression functionality to the WebSocket Protocol. An 14 extension based on this framework compresses the payload data portion 15 of non-control WebSocket messages on a per-message basis using 16 parameters negotiated during the opening handshake. This framework 17 provides a general method to apply a compression algorithm to the 18 contents of WebSocket messages. For each compression algorithm, an 19 extension is defined by specifying parameter negotiation and payload 20 transformation algorithm in detail. This document also specifies one 21 specific compression extension using the DEFLATE algorithm. 23 Please send feedback to the hybi@ietf.org mailing list. 25 Status of this Memo 27 This Internet-Draft is submitted to IETF in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at http://datatracker.ietf.org/drafts/current. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on November 14, 2014. 42 Copyright Notice 44 Copyright (c) 2014 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (http://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 60 2. Conformance Requirements and Terminology . . . . . . . . . . . 4 61 3. Complementary Terminology . . . . . . . . . . . . . . . . . . 5 62 4. WebSocket Per-message Compression Extension . . . . . . . . . 6 63 5. Extension Negotiation . . . . . . . . . . . . . . . . . . . . 7 64 5.1. Negotiation Examples . . . . . . . . . . . . . . . . . . . 9 65 6. Framing . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 66 6.1. Compression . . . . . . . . . . . . . . . . . . . . . . . 11 67 6.2. Decompression . . . . . . . . . . . . . . . . . . . . . . 12 68 7. Intermediaries . . . . . . . . . . . . . . . . . . . . . . . . 14 69 8. permessage-deflate extension . . . . . . . . . . . . . . . . . 15 70 8.1. Method Parameters . . . . . . . . . . . . . . . . . . . . 16 71 8.1.1. Context Takeover Control . . . . . . . . . . . . . . . 16 72 8.1.2. Limiting the LZ77 sliding window size . . . . . . . . 18 73 8.1.3. Example . . . . . . . . . . . . . . . . . . . . . . . 20 74 8.2. Message Payload Transformation . . . . . . . . . . . . . . 21 75 8.2.1. Compression . . . . . . . . . . . . . . . . . . . . . 21 76 8.2.2. Decompression . . . . . . . . . . . . . . . . . . . . 22 77 8.2.3. Examples . . . . . . . . . . . . . . . . . . . . . . . 23 78 8.3. Implementation Notes . . . . . . . . . . . . . . . . . . . 26 79 8.4. Intermediaries . . . . . . . . . . . . . . . . . . . . . . 27 80 9. Security Considerations . . . . . . . . . . . . . . . . . . . 28 81 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29 82 10.1. Registration of the "permessage-deflate" WebSocket 83 Extension Name . . . . . . . . . . . . . . . . . . . . . . 29 84 10.2. Registration of the "Per-message Compressed" WebSocket 85 Framing Header Bit . . . . . . . . . . . . . . . . . . . . 29 86 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 30 87 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 31 88 12.1. Normative References . . . . . . . . . . . . . . . . . . . 31 89 12.2. Informative References . . . . . . . . . . . . . . . . . . 31 90 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 32 92 1. Introduction 94 This document specifies a framework to add compression functionality 95 to the WebSocket Protocol [RFC6455]. This framework specifies how to 96 define WebSocket Per-message Compression Extensions (PMCEs) 97 individually for various compression algorithms based on the 98 extension concept of the WebSocket Protocol specified in Section 9 of 99 [RFC6455]. A WebSocket client and a peer WebSocket server negotiate 100 use of a PMCE and determine parameters to configure the compression 101 algorithm during the WebSocket opening handshake. The client and 102 server can then exchange non-control messages using frames with 103 compressed data in the payload data portion. 105 This framework only specifies a general method to apply a compression 106 algorithm to the contents of WebSocket messages. A document 107 specifying an individual PMCE describes how to negotiate 108 configuration parameters for the compression algorithm and how to 109 transform (compress and decompress) data in the payload data portion 110 in detail. 112 A WebSocket client may offer multiple PMCEs during the WebSocket 113 opening handshake. A peer WebSocket server received those offers may 114 choose and accept preferred one or decline all of them. PMCEs use 115 the RSV1 bit of the WebSocket frame header to indicate whether a 116 message is compressed or not, so that an endpoint can choose not to 117 compress messages with incompressible contents. 119 This document also specifies one specific PMCE based on the DEFLATE 120 [RFC1951] algorithm. The extension name of the PMCE is "permessage- 121 deflate". We chose DEFLATE since it's widely available as a library 122 on various platforms and the overhead is small. To align the end of 123 compressed data to an octet boundary, this extension uses the 124 algorithm described in Section 2.1 of [RFC1979]. Endpoints can take 125 over the LZ77 sliding window [LZ77] used to build frames for previous 126 messages to get better compression ratio. For resource-limited 127 devices, this extension provides parameters to limit memory usage for 128 compression context. 130 2. Conformance Requirements and Terminology 132 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 133 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 134 document are to be interpreted as described in [RFC2119]. 136 Requirements phrased in the imperative as part of algorithms (such as 137 "strip any leading space characters" or "return false and abort these 138 steps") are to be interpreted with the meaning of the key word 139 ("MUST", "SHOULD", "MAY", etc.) used in introducing the algorithm. 141 Conformance requirements phrased as algorithms or specific steps can 142 be implemented in any manner, so long as the end result is 143 equivalent. In particular, the algorithms defined in this 144 specification are intended to be easy to understand and are not 145 intended to be performant. 147 This document references the procedure to _Fail the WebSocket 148 Connection_. This procedure is defined in Section 7.1.7 of 149 [RFC6455]. 151 This document references the event that _The WebSocket Connection is 152 Established_ and the event that _A WebSocket Message Has Been 153 Received_. These events are defined in Section 4.1 and Section 6.2, 154 respectively, of [RFC6455]. 156 This document uses the Augmented Backus-Naur Form (ABNF) notation of 157 [RFC5234]. The DIGIT (decimal 0-9) rule is included by reference, as 158 defined in the Appendix B.1 of [RFC5234]. 160 3. Complementary Terminology 162 This document defines some terms about WebSocket and WebSocket 163 Extension mechanism that are underspecified or not defined at all in 164 [RFC6455]. This terminology is effective only in this document and 165 any other documents that refer to this section. 167 "A non-control message" means a message that consists of non-control 168 frames as defined in Section 5.6 of [RFC6455]. 170 "A message payload (or payload of a message)" means concatenation of 171 the payload data portion of all frames representing a single message, 172 as well as how /data/ is formed from in Section 6.2 of [RFC6455]. 174 "An extension in use next to extension X" means the extension listed 175 next to X in the "Sec-WebSocket-Extensions" header in the server's 176 opening handshake as defined in Section 9.1 of [RFC6455]. Such an 177 extension is applied to outgoing data from the application right 178 after X on sender side but applied right before X to incoming data 179 from the underlying transport. 181 "An extension in use preceding extension X" means the extension 182 listed right before X in the "Sec-WebSocket-Extensions" header in the 183 server's opening handshake. Such an extension is applied to outgoing 184 data from the application right before X on sender side but applied 185 right after X to incoming data from the underlying transport. 187 "An extension negotiation offer" means each element in the 188 "Sec-WebSocket-Extensions" header in the client's opening handshake. 190 "An extension negotiation response" means each element in the 191 "Sec-WebSocket-Extensions" header in the server's opening handshake. 193 "A corresponding extension negotiation response for an extension 194 negotiation offer" means an extension negotiation response a server 195 sends back to the peer client that contains the same extension name 196 as the offer and meets the requirements represented by the offer. 198 "Accepting an extension negotiation offer" means including a 199 corresponding extension negotiation response for the offer in the 200 "Sec-WebSocket-Extensions" header in the server's opening handshake. 202 "Declining an extension negotiation offer" means not including a 203 corresponding extension negotiation response for the offer in the 204 "Sec-WebSocket-Extensions" header in the server's opening handshake. 206 4. WebSocket Per-message Compression Extension 208 WebSocket Per-message Compression Extensions (PMCEs) are extensions 209 to the WebSocket Protocol enabling compression functionality. PMCEs 210 are built based on the extension concept of the WebSocket Protocol 211 specified in Section 9 of [RFC6455]. PMCEs are individually defined 212 for each compression algorithm to be implemented, and are registered 213 in the WebSocket Extension Name Registry created in Section 11.4 of 214 [RFC6455]. Each PMCE refers to this framework and defines the 215 following: 217 o The contents of its extension negotiation offer/response to 218 include in the "Sec-WebSocket-Extensions" header. The contents 219 include the extension name of the PMCE and any applicable 220 extension parameters. 222 o How to interpret the extension parameters exchanged during the 223 opening handshake 225 o How to transform the payload of a message. 227 One such extension is defined in Section 8 of this document and is 228 registered in Section 10. Other PMCEs may be defined in other 229 documents. 231 Section 5 describes the basic extension negotiation process. 232 Section 6 describes how to apply the compression algorithm with 233 negotiated parameters to the contents of WebSocket messages. 235 5. Extension Negotiation 237 To offer use of a PMCE, a client includes a 238 "Sec-WebSocket-Extensions" header element with the extension name of 239 the PMCE in the "Sec-WebSocket-Extensions" header in the client's 240 opening handshake of the WebSocket connection. Extension parameters 241 in the element represent the PMCE offer in detail. For example, a 242 client lists preferred configuration parameter values for the 243 compression algorithm of the PMCE. A client offers multiple PMCE 244 choices to the server by including multiple elements in the 245 "Sec-WebSocket-Extensions" header, one for each PMCE offered. The 246 set of elements MAY include multiple PMCEs with the same extension 247 name to offer use of the same algorithm with different configuration 248 parameters. The order of elements means the client's preference. An 249 element precedes another element has higher preference. It is 250 RECOMMENDED that a server accepts PMCEs with higher preference if the 251 server supports it. 253 A PMCE negotiation offer informs requests and/or hints to the server. 254 A request in a PMCE negotiation offer indicates constraints on the 255 server's behavior that must be satisfied if the server accepts the 256 offer. A hint in a PMCE negotiation offer indicates information 257 about the client's behavior that the server may either safely ignore 258 or refer to when the server decides its behavior. 260 To accept use of an offered PMCE, a server includes a 261 "Sec-WebSocket-Extensions" header element with the extension name of 262 the PMCE in the "Sec-WebSocket-Extensions" header in the server's 263 opening handshake of the WebSocket connection. Extension parameters 264 in the element represent the configuration parameters of the PMCE to 265 use in detail. We call these extension parameters and their values 266 "agreed parameters". The element MUST represent a PMCE that is fully 267 supported by the server. The contents of the element doesn't need to 268 be exactly the same as one of the received extension negotiation 269 offers. For example, an extension negotiation offer with an 270 extension parameter "X" indicating availability of the feature X may 271 be accepted with an element without the extension parameter meaning 272 that the server declined use of the feature. 274 "Agreed parameters" MUST represent how the requests and hints in the 275 client's extension negotiation offer have been handled in addition to 276 the server's requests and hints on the client's behavior, so that the 277 client can configure its behavior without identifying which PMCE 278 extension negotiation offer has been accepted. 280 For example, if a client sends an extension negotiation offer 281 including a parameter "enable_compression" and another without the 282 parameter, the server accepts the former and tell that to the client 283 by sending back an element including a parameter that acknowledges 284 "enable_compression". The name of the acknowledging parameter 285 doesn't need to be the same as the offer. 287 General negotiation flow will be like the following. How to handle 288 parameters in detail will be specified in the specifications for each 289 PMCE. 291 A client makes an offer including parameters identifying the 292 following: 294 o Hints about how the client is planning to compress data 296 o Requests about how the server compresses data 298 o Limitation of the client's compression functionality 300 The peer server makes a determination of its behavior based on these 301 parameters if it can and wants to proceed with this PMCE enabled, and 302 responds to the client with parameters identifying the following: 304 o Requests about how the client compresses data 306 o How the server will compress data 308 The client makes a determination of its behavior based on these 309 parameters from the server if it can and wants to proceed with this 310 PMCE enabled. Otherwise, the client starts closing handshake with 311 close code 1010. 313 There can be compression features that can be applied separately for 314 each direction. For such features, the acknowledging parameter and 315 the parameter for the reverse direction must be chosen to be 316 distinguishable from each other. For example, we can add "server_" 317 prefix to parameters affecting data sent from a server and "client_" 318 prefix to ones affecting data sent from a client to make them 319 distinguishable. 321 A server MUST NOT accept a PMCE extension negotiation offer together 322 with another extension if the PMCE will conflict with the extension 323 on use of the RSV1 bit. A client that received a response accepting 324 a PMCE extension negotiation offer together with such an extension 325 MUST _Fail the WebSocket Connection_. 327 A server MUST NOT accept a PMCE extension negotiation offer together 328 with another extension if the PMCE will be applied to output of the 329 extension and any of the following conditions applies to the 330 extension: 332 o The extension requires boundary of fragments to be preserved 333 between output from the extension at the sender and input to the 334 extension at the receiver. 336 o The extension uses the "Extension data" field or any of the 337 reserved bits on the WebSocket header as a per-frame attribute. 339 A client that received a response accepting a PMCE extension 340 negotiation offer together with such an extension MUST _Fail the 341 WebSocket Connection_. 343 A server declines all offered PMCEs by not including any element with 344 PMCE names. If a server responds with no PMCE element in the 345 "Sec-WebSocket-Extensions" header, both endpoints proceed without 346 Per-message Compression once _the WebSocket Connection is 347 established_. 349 If a server gives an invalid response, such as accepting a PMCE that 350 the client did not offer, the client MUST _Fail the WebSocket 351 Connection_. 353 If a server responds with a valid PMCE element in the 354 "Sec-WebSocket-Extensions" header and _the WebSocket Connection is 355 established_, both endpoints MUST use the algorithm described in 356 Section 6 and the message payload transformation (compressing and 357 decompressing) procedure of the PMCE configured with the "agreed 358 parameters" returned by the server to exchange messages. 360 5.1. Negotiation Examples 362 The following are example values for the "Sec-WebSocket-Extensions" 363 header offering PMCEs. permessage-foo and permessage-bar in the 364 examples are hypothetical extension names of PMCEs for compression 365 algorithm foo and bar. 367 o Offer the permessage-foo. 369 permessage-foo 371 o Offer the permessage-foo with a parameter x with a value of 10. 373 permessage-foo; x=10 375 The value MAY be quoted. 377 permessage-foo; x="10" 379 o Offer the permessage-foo as first choice and the permessage-bar as 380 a fallback plan. 382 permessage-foo, permessage-bar 384 o Offer the permessage-foo with a parameter use_y which enables a 385 feature y as first choice, and the permessage-foo without the 386 use_y parameter as a fallback plan. 388 permessage-foo; use_y, permessage-foo 390 6. Framing 392 PMCEs operate only on non-control messages. 394 This document allocates the RSV1 bit of the WebSocket header for 395 PMCEs, and calls the bit the "Per-message Compressed" bit. On a 396 WebSocket connection where a PMCE is in use, this bit indicates 397 whether a message is compressed or not. 399 A message with the "Per-message Compressed" bit set on the first 400 fragment of the message is called a "compressed message". Frames of 401 a compressed message have compressed data in the payload data 402 portion. An endpoint received a compressed message decompresses the 403 concatenation of the compressed data of the frames of the message by 404 following the decompression procedure specified by the PMCE in use. 405 The endpoint uses the bytes corresponding to the application data 406 portion in this decompressed data for the _A WebSocket Message Has 407 Been Received_ event instead of the received data as-is. 409 A message with the "Per-message Compressed" bit unset on the first 410 fragment of the message is called an "uncompressed message". Frames 411 of an uncompressed message have uncompressed original data as-is in 412 the payload data portion. An endpoint received an uncompressed 413 message uses the concatenation of the application data portion of the 414 frames of the message as-is for the _A WebSocket Message Has Been 415 Received_ event. 417 6.1. Compression 419 An endpoint MUST use the following algorithm to send a message in the 420 form of a compressed message. 422 1. Compress the message payload of the original message by following 423 the compression procedure of the PMCE. The original message may 424 be input from the application layer or output of another 425 WebSocket extension depending on what extensions were negotiated. 427 2. If this PMCE is the last extension to process outgoing messages, 428 build frame(s) by using the compressed data instead of the 429 original data for the message payload, and setting the 430 "Per-message Compressed" bit of the first frame, then send the 431 frame(s) as described in Section 6.1 of RFC6455. Otherwise, pass 432 the transformed message payload and modified header values 433 including "Per-message Compressed" bit value set to 1 to the 434 extension next to the PMCE. If the extension expects frames for 435 input, build a frame for the message and pass it. 437 An endpoint MUST use the following algorithm to send a message in the 438 form of an uncompressed message. If this PMCE is the last extension 439 to process outgoing messages, build frame(s) by using the original 440 data for the payload data portion as-is and unsetting the 441 "Per-message Compressed" bit of the first frame, then send the 442 frame(s) as described in Section 6.1 of RFC6455. Otherwise, pass the 443 message payload and header values to the extension next to the PMCE 444 as-is. If the extension expects frames for input, build a frame for 445 the message and pass it. 447 An endpoint MUST NOT set the "Per-message Compressed" bit of control 448 frames and non-first fragments of a data message. An endpoint 449 received such a frame MUST _Fail the WebSocket Connection_. 451 PMCEs don't change the opcode field. The opcode of the first frame 452 of a compress message indicates the opcode of the original message. 454 The payload data portion in frames generated by a PMCE is not subject 455 to the constraints for the original data type. For example, the 456 concatenation of the output data corresponding to the application 457 data portion of frames of a compressed text message is not required 458 to be valid UTF-8. At the receiver, the payload data portion after 459 decompression is subject to the constraints for the original data 460 type again. 462 6.2. Decompression 464 An endpoint MUST use the following algorithm to receive a message in 465 the form of a compressed message. 467 1. Concatenate the payload data portion of the received frames of 468 the compressed message. The received frames may be direct input 469 from the underlying transport or output of another WebSocket 470 extension depending on what extensions were negotiated. 472 2. Decompress the concatenation by following the decompression 473 procedure of the PMCE. 475 3. If this is the last extension to process incoming messages, 476 deliver the _A WebSocket Message Has Been Received_ event to the 477 application layer with the decompressed message payload and 478 header values including the "Per-message Compressed" bit unset to 479 0. Otherwise, pass the decompressed message payload and header 480 values including the "Per-message Compressed" bit unset to 0 to 481 the extension preceding the PMCE. If the extension expects 482 frames for input, build a frame for the message and pass it. 484 An endpoint MUST use the following algorithm to receive a message in 485 the form of an uncompressed message. If this PMCE is the last 486 extension to process incoming messages, deliver the _A WebSocket 487 Message Has Been Received_ event to the application layer with the 488 received message payload and header values as-is. Otherwise, pass 489 the message payload and header values to the extension preceding the 490 PMCE as-is. If the extension expects frames for input, build a frame 491 for the message and pass it. 493 7. Intermediaries 495 When an intermediary proxies a WebSocket connection, the intermediary 496 MAY add, change or remove Per-message Compression on proxied messages 497 if the intermediary meets all of the following requirements: 499 o The intermediary understands that Per-message Compression. 501 o The intermediary can read all data of the proxied WebSocket 502 connection including the opening handshake request, opening 503 handshake response, and messages. 505 o The intermediary can alter the proxied data before forwarding them 506 accordingly to conform to the constraints of the new combination 507 of extensions. For example, if Per-message Compression is removed 508 from messages, the corresponding element in the 509 "Sec-WebSocket-Extensions" in the opening handshake response which 510 enabled the Per-message Compression must also be removed. 512 Otherwise, the intermediary MUST NOT add, change or remove Per- 513 message Compression on proxied messages. 515 8. permessage-deflate extension 517 This section specifies a specific PMCE called "permessage-deflate". 518 It compresses the payload of a message using the DEFLATE algorithm 519 [RFC1951] and the byte boundary aligning method introduced in 520 [RFC1979]. 522 This section uses the term "byte" with the same meaning as RFC1951, 523 i.e. 8 bits stored or transmitted as a unit (same as an octet). 525 The registered extension name for this extension is 526 "permessage-deflate". 528 Four extension parameters are defined for permessage-deflate to help 529 endpoints manage per-connection resource usage. 531 o "server_no_context_takeover" 533 o "client_no_context_takeover" 535 o "server_max_window_bits" 537 o "client_max_window_bits" 539 These parameters enable two methods (no_context_takeover and 540 max_window_bits) of constraining memory usage that may be applied 541 independently to either direction of WebSocket traffic. The 542 extension parameters with the "client_" prefix are used to negotiate 543 DEFLATE parameters to control compression on messages sent by a 544 client and received by a server. The client refers to parameters 545 with the "client_" prefix to configure its compressor, while the 546 server refers to them to configure its decompressor. The extension 547 parameters with the "server_" prefix are used to negotiate DEFLATE 548 parameters to control compression on messages sent by a server and 549 received by a client. The server refers to parameters with the 550 "server_" prefix to configure its compressor, while the client refers 551 to them to configure its decompressor. All of these four parameters 552 are defined for both a client's extension negotiation offer and a 553 server's extension negotiation response. 555 A server MUST decline an extension negotiation offer for this 556 extension if any of the following conditions is met: 558 o The offer has any extension parameter not defined for use in an 559 offer. 561 o The offer has any extension parameter with an invalid value. 563 o The offer has multiple extension parameters with the same name. 565 o The server doesn't support the offered configuration. 567 A client MUST _Fail the WebSocket Connection_ if the peer server 568 accepted an extension negotiation offer for this extension with an 569 extension negotiation response meeting any of the following 570 condition: 572 o The response has any extension parameter not defined for use in a 573 response. 575 o The response has any extension parameter with an invalid value. 577 o The response has multiple extension parameters with the same name. 579 o The client doesn't support the configuration that the response 580 represents. 582 The term "LZ77 sliding window" used in this section means the buffer 583 used by the DEFLATE algorithm to store recently processed input. The 584 DEFLATE compression algorithm searches the buffer for match with the 585 next input. 587 The term "use context take over" used in this section means to use 588 the same LZ77 sliding window the endpoint used to build frames of the 589 last sent message to build frames of the next message. 591 8.1. Method Parameters 593 8.1.1. Context Takeover Control 595 8.1.1.1. server_no_context_takeover 597 A client MAY include the "server_no_context_takeover" extension 598 parameter in an extension negotiation offer. This extension 599 parameter has no value. By including this extension parameter in an 600 extension negotiation offer, a client prevents the peer server from 601 using context take over. If the peer server doesn't use context take 602 over, the client doesn't need to reserve memory to retain the LZ77 603 sliding window in between messages. 605 Absence of this extension parameter in an extension negotiation offer 606 indicates that the client can receive a message which the server 607 built using context take over. 609 A server accepts an extension negotiation offer including the 610 "server_no_context_takeover" extension parameter by including the 611 "server_no_context_takeover" extension parameter in the corresponding 612 extension negotiation response to send back to the client. The 613 "server_no_context_takeover" extension parameter in an extension 614 negotiation response has no value. 616 It is RECOMMENDED that a server supports the 617 "server_no_context_takeover" extension parameter in an extension 618 negotiation offer. 620 A server MAY include the "server_no_context_takeover" extension 621 parameter in an extension negotiation response even if the extension 622 negotiation offer being accepted by the extension negotiation 623 response didn't have the "server_no_context_takeover" extension 624 parameter. 626 8.1.1.2. client_no_context_takeover 628 A client MAY include the "client_no_context_takeover" extension 629 parameter in an extension negotiation offer. This extension 630 parameter has no value. By including this extension parameter in an 631 extension negotiation offer, a client informs the peer server of a 632 hint that even if the server won't include the 633 "client_no_context_takeover" extension parameter in the corresponding 634 extension negotiation response to the offer, the client is not going 635 to use context take over. 637 A server MAY include the "client_no_context_takeover" extension 638 parameter in an extension negotiation response. If the received 639 extension negotiation offer includes the "client_no_context_takeover" 640 extension parameter, the server may either ignore the parameter or 641 use the parameter to avoid taking over an LZ77 sliding window 642 unnecessarily by including "client_no_context_takeover" extension 643 parameter in the corresponding extension negotiation response to the 644 offer. The "client_no_context_takeover" extension parameter in an 645 extension negotiation response has no value. By including the 646 "client_no_context_takeover" extension parameter in an extension 647 negotiation response, a server prevents the peer client from using 648 context take over. This reduces the amount of memory that the server 649 has to reserve for the connection. 651 Absence of this extension parameter in an extension negotiation 652 response indicates that the server can receive messages built by the 653 client using context take over. 655 A client MUST support the "client_no_context_takeover" extension 656 parameter in an extension negotiation response. 658 8.1.2. Limiting the LZ77 sliding window size 660 8.1.2.1. server_max_window_bits 662 A client MAY include the "server_max_window_bits" extension parameter 663 in an extension negotiation offer. This parameter has a decimal 664 integer value without leading zeroes between 8 to 15 inclusive 665 indicating the base-2 logarithm of the LZ77 sliding window size and 666 MUST conform to the ABNF below. 668 server_max_window_bits = 1*DIGIT 670 By including this parameter in an extension negotiation offer, a 671 client limits the LZ77 sliding window size that the server uses to 672 compress messages. If the peer server uses small LZ77 sliding window 673 to compress messages, the client can reduce the memory for the LZ77 674 sliding window. 676 A server declines an extension negotiation offer with this parameter 677 if the server doesn't support it. 679 Absence of this parameter in an extension negotiation offer indicates 680 that the client can receive messages compressed using an LZ77 sliding 681 window of up to 32,768 bytes. 683 A server accepts an extension negotiation offer with this parameter 684 by including the "server_max_window_bits" extension parameter in the 685 extension negotiation response to send back to the client with the 686 same or smaller value as the offer. The "server_max_window_bits" 687 extension parameter in an extension negotiation response has a 688 decimal integer value without leading zeroes between 8 to 15 689 inclusive indicating the base-2 logarithm of the LZ77 sliding window 690 size and MUST conform to the ABNF below. 692 server_max_window_bits = 1*DIGIT 694 A server MAY include the "server_max_window_bits" extension parameter 695 in an extension negotiation response even if the extension 696 negotiation offer being accepted by the response didn't include the 697 "server_max_window_bits" extension parameter. 699 8.1.2.2. client_max_window_bits 701 A client MAY include the "client_max_window_bits" extension parameter 702 in an extension negotiation offer. This parameter has no value or a 703 decimal integer value without leading zeroes between 8 to 15 704 inclusive indicating the base-2 logarithm of the LZ77 sliding window 705 size. If a value is specified for this parameter, the value MUST 706 conform to the ABNF below. 708 client_max_window_bits = 1*DIGIT 710 By including this parameter in an offer, a client informs the peer 711 server of that the client supports the "client_max_window_bits" 712 extension parameter in an extension negotiation response, and 713 optionally a hint by attaching a value to the parameter. If the 714 "client_max_window_bits" extension parameter in an extension 715 negotiation offer has a value, the parameter also informs the peer 716 server of a hint that even if the server won't include the 717 "client_max_window_bits" extension parameter in the corresponding 718 extension negotiation response with a value greater than one in the 719 extension negotiation offer or the server doesn't include the 720 extension parameter at all, the client is not going to use LZ77 721 sliding window size greater than the size specified by the value in 722 the extension negotiation offer to compress messages. 724 If a received extension negotiation offer has the 725 "client_max_window_bits" extension parameter, the server MAY include 726 the "client_max_window_bits" extension parameter in the corresponding 727 extension negotiation response to the offer. If the 728 "client_max_window_bits" extension parameter in a received extension 729 negotiation offer has a value, the server may either ignore this 730 value or use this value to avoid allocating an unnecessarily big LZ77 731 sliding window by including the "client_max_window_bits" extension 732 parameter in the corresponding extension negotiation response to the 733 offer with a value equal to or smaller than the received value. The 734 "client_max_window_bits" extension parameter in an extension 735 negotiation response has a decimal integer value without leading 736 zeroes between 8 to 15 inclusive indicating the base-2 logarithm of 737 the LZ77 sliding window size and MUST conform to the ABNF below. 739 client_max_window_bits = 1*DIGIT 741 By including this extension parameter in an extension negotiation 742 response, a server limits the LZ77 sliding window size that the 743 client uses to compress messages. This reduces the amount of memory 744 for decompression context that the server has to reserve for the 745 connection. 747 If a received extension negotiation offer doesn't have the 748 "client_max_window_bits" extension parameter, the corresponding 749 extension negotiation response to the offer MUST NOT include the 750 "client_max_window_bits" extension parameter. 752 Absence of this extension parameter in an extension negotiation 753 response indicates that the server can receive messages compressed 754 using an LZ77 sliding window of up to 32,768 bytes. 756 8.1.3. Example 758 The simplest "Sec-WebSocket-Extensions" header in a client's opening 759 handshake to offer use of the permessage-deflate is as follows: 761 Sec-WebSocket-Extensions: permessage-deflate 763 Since the "client_max_window_bits" extension parameter is not 764 included in this extension negotiation offer, the server must not 765 accept the offer with an extension negotiation response including the 766 "client_max_window_bits" extension parameter. The simplest 767 "Sec-WebSocket-Extensions" header in a server's opening handshake to 768 accept use of the permessage-deflate is the same. 770 The following extension negotiation offer sent by a client is asking 771 the server to use the LZ77 sliding window size of 1,024 bytes or less 772 and declaring that the client supports the "client_max_window_bits" 773 extension parameter in an extension negotiation response. 775 Sec-WebSocket-Extensions: 776 permessage-deflate; 777 client_max_window_bits; server_max_window_bits=10 779 This extension negotiation offer might be rejected by the server 780 because the server doesn't support the "server_max_window_bits" 781 extension parameter in an extension negotiation offer. This is fine 782 if the client cannot receive messages compressed using a larger 783 sliding window size, but if the client just prefers using a small 784 window but wants to fallback to the "permessage-deflate" without the 785 "server_max_window_bits" extension parameter, the client can make an 786 offer with the fallback option like this: 788 Sec-WebSocket-Extensions: 789 permessage-deflate; 790 client_max_window_bits; server_max_window_bits=10, 791 permessage-deflate; 792 client_max_window_bits 794 The server can accept permessage-deflate by picking the supported one 795 from the listed offers. To accept the first option, for example, the 796 server may send back a response as follows: 798 Sec-WebSocket-Extensions: 799 permessage-deflate; server_max_window_bits=10 801 To accept the second option, for example, the server may send back a 802 response as follows: 804 Sec-WebSocket-Extensions: permessage-deflate 806 8.2. Message Payload Transformation 808 8.2.1. Compression 810 An endpoint uses the following algorithm to compress a message. 812 1. Compress all the octets of the payload of the message using 813 DEFLATE. 815 2. If the resulting data does not end with an empty DEFLATE block 816 with no compression (the "BTYPE" bits are set to 00), append an 817 empty DEFLATE block with no compression to the tail end. 819 3. Remove 4 octets (that are 0x00 0x00 0xff 0xff) from the tail end. 820 After this step, the last octet of the compressed data contains 821 (possibly part of) the DEFLATE header bits with the "BTYPE" bits 822 set to 00. 824 When using DEFLATE in the first step above: 826 o An endpoint MAY use multiple DEFLATE blocks to compress one 827 message. 829 o An endpoint MAY use DEFLATE blocks of any type. 831 o An endpoint MAY use both DEFLATE blocks with the "BFINAL" bit set 832 to 0 and DEFLATE blocks with the "BFINAL" bit set to 1. 834 o When any DEFLATE block with the "BFINAL" bit set to 1 doesn't end 835 at a byte boundary, an endpoint MUST add minimal padding bits of 0 836 to make it end at a byte boundary. The next DEFLATE block follows 837 the padded data if any. 839 An endpoint fragments a compressed message by splitting the result of 840 running this algorithm. Even when only a part of payload is 841 available, a fragment can be built by compressing the available data 842 and choosing block type appropriately so that the end of the 843 resulting compressed data is aligned at a byte boundary. Note that 844 for non-final fragments, the removal of 0x00 0x00 0xff 0xff must not 845 be done. 847 An endpoint MUST NOT use an LZ77 sliding window longer than 32,768 848 bytes to compress messages to send. 850 If the "agreed parameters" contain the "client_no_context_takeover" 851 extension parameter, the client MUST start compressing each new 852 message with an empty LZ77 sliding window. Otherwise, the client MAY 853 take over the LZ77 sliding window used to build the last compressed 854 message. Note that even if the client has included the 855 "client_no_context_takeover" extension parameter in its offer, the 856 client MAY take over the LZ77 sliding window used to build the last 857 compressed message if the "agreed parameters" don't contain the 858 "client_no_context_takeover" extension parameter. The client-to- 859 server "client_no_context_takeover" extension parameter is just a 860 hint for the server to build an extension negotiation response. 862 If the "agreed parameters" contain the "server_no_context_takeover" 863 extension parameter, the server MUST start compressing each new 864 message with an empty LZ77 sliding window. Otherwise, the server MAY 865 take over the LZ77 sliding window used to build the last compressed 866 message. 868 If the "agreed parameters" contain the "client_max_window_bits" 869 extension parameter with a value of w, the client MUST NOT use an 870 LZ77 sliding window longer than the w-th power of 2 bytes to compress 871 messages to send. Note that even if the client has included in its 872 offer the "client_max_window_bits" extension parameter with a value 873 smaller than one in the "agreed parameters", the client MAY use an 874 LZ77 sliding window with any size to compress messages to send as 875 long as the size conforms to the "agreed parameters". The client-to- 876 server "client_max_window_bits" extension parameter is just a hint 877 for the server to build an extension negotiation response. 879 If the "agreed parameters" contain the "server_max_window_bits" 880 extension parameter with a value of w, the server MUST NOT use an 881 LZ77 sliding window longer than the w-th power of 2 bytes to compress 882 messages to send. 884 8.2.2. Decompression 886 An endpoint uses the following algorithm to decompress a message. 888 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the 889 payload of the message. 891 2. Decompress the resulting data using DEFLATE. 893 If the "agreed parameters" contain the "server_no_context_takeover" 894 extension parameter, the client MAY decompress each new message with 895 an empty LZ77 sliding window. Otherwise, the client MUST decompress 896 each new message using the LZ77 sliding window used to process the 897 last compressed message. 899 If the "agreed parameters" contain the "client_no_context_takeover" 900 extension parameter, the server MAY decompress each new message with 901 an empty LZ77 sliding window. Otherwise, the server MUST decompress 902 each new message using the LZ77 sliding window used to process the 903 last compressed message. Note that even if the client has included 904 the "client_no_context_takeover" extension parameter in its offer, 905 the server MUST decompress each new message using the LZ77 sliding 906 window used to process the last compressed message if the "agreed 907 parameters" don't contain the "client_no_context_takeover" extension 908 parameter. The client-to-server "client_no_context_takeover" 909 extension parameter is just a hint for the server to build an 910 extension negotiation response. 912 If the "agreed parameters" contain the "server_max_window_bits" 913 extension parameter with a value of w, the client MAY reduce the size 914 of its LZ77 sliding window to decompress received messages down to 915 the w-th power of 2 bytes. Otherwise, the client MUST use a 32,768 916 byte LZ77 sliding window to decompress received messages. 918 If the "agreed parameters" contain the "client_max_window_bits" 919 extension parameter with a value of w, the server MAY reduce the size 920 of its LZ77 sliding window to decompress received messages down to 921 the w-th power of 2 bytes. Otherwise, the server MUST use a 32,768 922 byte LZ77 sliding window to decompress received messages. Note that 923 even if the client has included in its offer the 924 "client_max_window_bits" extension parameter with a value smaller 925 than one in the "agreed parameters", the client MUST use an LZ77 926 sliding window of a size that conforms the "agreed parameters" to 927 compress messages to send. The client-to-server 928 "client_max_window_bits" extension parameter is just a hint for the 929 server to build an extension negotiation response. 931 8.2.3. Examples 933 This section introduces examples of how the permessage-deflate 934 transforms messages. 936 8.2.3.1. A message compressed using 1 compressed DEFLATE block 938 Suppose that an endpoint sends a text message "Hello". If the 939 endpoint uses 1 compressed DEFLATE block (compressed with fixed 940 Huffman code and the "BFINAL" bit is not set) to compress the 941 message, the endpoint obtains the compressed data to use for the 942 message payload as follows. 944 The endpoint compresses "Hello" into 1 compressed DEFLATE block and 945 flushes the resulting data into a byte array using an empty DEFLATE 946 block with no compression: 948 0xf2 0x48 0xcd 0xc9 0xc9 0x07 0x00 0x00 0x00 0xff 0xff 950 By stripping 0x00 0x00 0xff 0xff from the tail end, the endpoint gets 951 the data to use for the message payload: 953 0xf2 0x48 0xcd 0xc9 0xc9 0x07 0x00 955 Suppose that the endpoint sends this compressed message without 956 fragmentation. The endpoint builds one frame by putting the whole 957 compressed data in the payload data portion of the frame: 959 0xc1 0x07 0xf2 0x48 0xcd 0xc9 0xc9 0x07 0x00 961 The first 2 octets (0xc1 0x07) are the WebSocket frame header (FIN=1, 962 RSV1=1, RSV2=0, RSV3=0, opcode=text, MASK=0, Payload length=7). The 963 following figure shows what value is set in each field of the 964 WebSocket frame header. 966 0 1 967 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 968 +-+-+-+-+-------+-+-------------+ 969 |F|R|R|R| opcode|M| Payload len | 970 |I|S|S|S| |A| | 971 |N|V|V|V| |S| | 972 | |1|2|3| |K| | 973 +-+-+-+-+-------+-+-------------+ 974 |1|1|0|0| 1 |0| 7 | 975 +-+-+-+-+-------+-+-------------+ 977 Suppose that the endpoint sends the compressed message with 978 fragmentation. The endpoint splits the compressed data into 979 fragments and builds frames for each fragment. For example, if the 980 fragments are 3 and 4 octet, the first frame is: 982 0x41 0x03 0xf2 0x48 0xcd 984 and the second frame is: 986 0x80 0x04 0xc9 0xc9 0x07 0x00 988 Note that the RSV1 bit is set only on the first frame. 990 8.2.3.2. Sharing LZ77 Sliding Window 992 Suppose that a client has sent a message "Hello" as a compressed 993 message and will send the same message "Hello" again as a compressed 994 message. 996 0xf2 0x48 0xcd 0xc9 0xc9 0x07 0x00 998 This is the payload of the first message the client has sent. If the 999 "agreed parameters" contain the "client_no_context_takeover" 1000 extension parameter, the client compresses the payload of the next 1001 message into the same bytes (if the client uses the same "BTYPE" 1002 value and "BFINAL" value). So, the payload of the second message 1003 will be: 1005 0xf2 0x48 0xcd 0xc9 0xc9 0x07 0x00 1007 If the "agreed parameters" did not contain the 1008 "client_no_context_takeover" extension parameter, the client can 1009 compress the payload of the next message into shorter bytes by 1010 referencing the history in the LZ77 sliding window. So, the payload 1011 of the second message will be: 1013 0xf2 0x00 0x11 0x00 0x00 1015 So, 2 bytes are saved in total. 1017 Note that even if some uncompressed messages (with the RSV1 bit 1018 unset) are inserted between the two "Hello" messages, they don't 1019 affect the LZ77 sliding window. 1021 8.2.3.3. Using a DEFLATE Block with No Compression 1023 0xc1 0x0b 0x00 0x05 0x00 0xfa 0xff 0x48 0x65 0x6c 0x6c 0x6f 0x00 1025 This is a frame constituting a text message "Hello" built using a 1026 DEFLATE block with no compression. The first 2 octets (0xc1 0x0b) 1027 are the WebSocket frame header (FIN=1, RSV1=1, RSV2=0, RSV3=0, 1028 opcode=text, MASK=0, Payload length=7). Note that the RSV1 bit is 1029 set for this message (only on the first fragment if the message is 1030 fragmented) because the RSV1 bit is set when DEFLATE is applied to 1031 the message, including the case when only DEFLATE blocks with no 1032 compression are used. The third to 13th octet consists a payload 1033 data containing "Hello" compressed using a DEFLATE block with no 1034 compression. 1036 8.2.3.4. Using a DEFLATE Block with BFINAL Set to 1 1038 On platform where the flush method using an empty DEFLATE block with 1039 no compression is not available, implementors can choose to flush 1040 data using DEFLATE blocks with "BFINAL" set to 1. 1042 0xf3 0x48 0xcd 0xc9 0xc9 0x07 0x00 0x00 1044 This is a payload of a message containing "Hello" compressed using a 1045 DEFLATE block with "BFINAL" set to 1. The first 7 octets constitute 1046 a DEFLATE block with "BFINAL" set to 1 and "BTYPE" set to 01 1047 containing "Hello". The last 1 octet (0x00) contains the header bits 1048 with "BFINAL" set to 0 and "BTYPE" set to 00, and 5 padding bits of 1049 0. This octet is necessary to allow the payload to be decompressed 1050 in the same manner as messages flushed using DEFLATE blocks with 1051 BFINAL unset. 1053 8.2.3.5. Two DEFLATE Blocks in 1 Message 1055 Two or more DEFLATE blocks may be used in 1 message. 1057 0xf2 0x48 0x05 0x00 0x00 0x00 0xff 0xff 0xca 0xc9 0xc9 0x07 0x00 1059 The first 3 octets (0xf2 0x48 0x05) and the least significant two 1060 bits of the 4th octet (0x00) constitute one DEFLATE block with 1061 "BFINAL" set to 0 and "BTYPE" set to 01 containing "He". The rest of 1062 the 4th octet contains the header bits with "BFINAL" set to 0 and 1063 "BTYPE" set to 00, and the 3 padding bits of 0. Together with the 1064 following 4 octets (0x00 0x00 0xff 0xff), the header bits constitute 1065 an empty DEFLATE block with no compression. A DEFLATE block 1066 containing "llo" follows the empty DEFLATE block. 1068 8.2.3.6. Generating an Empty Fragment Manually 1070 Suppose that an endpoint is sending data with unknown size. The 1071 endpoint may encounter the end of data signal from the data source 1072 when its buffer for uncompressed data is empty. In such a case, the 1073 endpoint just needs to send the last fragment with FIN bit set to 1 1074 and payload set to DEFLATE block(s) which contains 0 byte data. If 1075 the compression library being used doesn't generate any data when its 1076 buffer is empty, an empty uncompressed DEFLATE block can be built 1077 manually and used for this purpose as follows: 1079 0x00 1081 The only octet 0x00 contains the header bits with "BFINAL" set to 0 1082 and "BTYPE" set to 00, and 5 padding bits of 0. 1084 8.3. Implementation Notes 1086 On most common software development platforms, their DEFLATE 1087 compression library provides a method to align compressed data to 1088 byte boundaries using an empty DEFLATE block with no compression. 1089 For example, Zlib [Zlib] does this when "Z_SYNC_FLUSH" is passed to 1090 the deflate function. 1092 Some platforms may provide only methods to output and process 1093 compressed data with ZLIB header and Adler-32 checksum. On such 1094 platforms, developers need to write stub code to remove and 1095 complement them manually. 1097 To obtain a useful compression ratio, an LZ77 sliding window size of 1098 1,024 or more is RECOMMENDED. 1100 On the direction where context takeover is disallowed, an endpoint 1101 can easily figure out whether a certain message will be shorter if 1102 compressed or not.. Otherwise, it's not easy to know whether future 1103 messages will benefit from having a certain message compressed. 1104 Implementor may employ some heuristics to determine this. 1106 8.4. Intermediaries 1108 When an intermediary forwards a message, the intermediary MAY change 1109 compression on the messages as far as the resulting sequence of 1110 messages conforms to the constraints based on the "agreed 1111 parameters". For example, an intermediary may decompress a received 1112 message, unset the "Per-message Compressed" bit and forward it to the 1113 other peer. Since such a compression change may affect the LZ77 1114 sliding window, the intermediary may need to parse and transform the 1115 following messages, too. 1117 9. Security Considerations 1119 There is a known exploit for combination of a secure transport 1120 protocol and history-based compression [CRIME]. Implementors should 1121 give attention to this point when integrating this extension with 1122 other extensions or protocols. 1124 10. IANA Considerations 1126 10.1. Registration of the "permessage-deflate" WebSocket Extension Name 1128 This section describes a WebSocket extension name registration in the 1129 WebSocket Extension Name Registry [RFC6455]. 1131 Extension Identifier 1132 permessage-deflate 1134 Extension Common Name 1135 WebSocket Per-message Deflate 1137 Extension Definition 1138 This document. 1140 Known Incompatible Extensions 1141 None 1143 The "permessage-deflate" extension name is used in the 1144 "Sec-WebSocket-Extensions" header in the WebSocket opening handshake 1145 to negotiate use of the permessage-deflate extension. 1147 10.2. Registration of the "Per-message Compressed" WebSocket Framing 1148 Header Bit 1150 This section describes a WebSocket framing header bit registration in 1151 the WebSocket Framing Header Bits Registry [RFC6455]. 1153 Header Bit 1154 RSV1 1156 Common Name 1157 Per-message Compressed 1159 Meaning 1160 The message is compressed or not. 1162 Reference 1163 Section 6 of this document. 1165 The "Per-message Compressed" framing header bit is used on the first 1166 fragment of non-control messages to indicate whether the payload of 1167 the message is compressed by the PMCE or not. 1169 11. Acknowledgements 1171 Special thanks to Patrick McManus who wrote up the initial 1172 specification of a DEFLATE-based compression extension for the 1173 WebSocket Protocol to which I referred to write this specification. 1175 Thank you to the following people who participated in discussions on 1176 the HyBi WG and contributed ideas and/or provided detailed reviews 1177 (the list is likely to be incomplete): Adam Rice, Alexey Melnikov, 1178 Arman Djusupov, Bjoern Hoehrmann, Brian McKelvey, Dario Crivelli, 1179 Greg Wilkins, Inaki Baz Castillo, Jamie Lokier, Joakim Erdfelt, John 1180 A. Tamplin, Julian Reschke, Kenichi Ishibashi, Mark Nottingham, Peter 1181 Thorson, Roberto Peon, Simone Bordet, Tobias Oberstein and Yutaka 1182 Hirano. Note that people listed above didn't necessarily endorse the 1183 end result of this work. 1185 12. References 1187 12.1. Normative References 1189 [RFC1951] Deutsch, P., "DEFLATE Compressed Data Format Specification 1190 version 1.3", RFC 1951, May 1996. 1192 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 1193 Specifications: ABNF", STD 68, RFC 5234, January 2008. 1195 [RFC6455] Fette, I. and A. Melnikov, "The WebSocket Protocol", 1196 RFC 6455, December 2011. 1198 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1199 Requirement Levels", BCP 14, RFC 2119, March 1997. 1201 [LZ77] Ziv, J. and A. Lempel, "A Universal Algorithm for 1202 Sequential Data Compression", IEEE Transactions on 1203 Information Theory, Vol. 23, No. 3, pp. 337-343. 1205 12.2. Informative References 1207 [RFC1979] Woods, J., "PPP Deflate Protocol", RFC 1979, August 1996. 1209 [Zlib] Gailly, J. and M. Adler, "Zlib", . 1211 [CRIME] Rizzo, J. and T. Duong, "The CRIME attack", Ekoparty 2012, 1212 September 2012. 1214 Author's Address 1216 Takeshi Yoshino 1217 Google, Inc. 1219 Email: tyoshino@google.com