draft-ietf-hybi-permessage-compression-05.txt   draft-ietf-hybi-permessage-compression-06.txt 
HyBi Working Group T. Yoshino HyBi Working Group T. Yoshino
Internet-Draft Google, Inc. Internet-Draft Google, Inc.
Intended status: Standards Track January 24, 2013 Intended status: Standards Track March 13, 2013
Expires: July 28, 2013 Expires: September 14, 2013
WebSocket Per-message Compression Compression Extensions for WebSocket
draft-ietf-hybi-permessage-compression-05 draft-ietf-hybi-permessage-compression-06
Abstract Abstract
This document specifies a framework for creating WebSocket extensions This document specifies a framework for creating WebSocket extensions
that add compression functionality to the WebSocket Protocol. that add compression functionality to the WebSocket Protocol.
Extensions based on this framework compress the payload of non- Extensions based on this framework compress the payload data portion
control WebSocket messages using a specified compression algorithm. of non-control WebSocket messages on per-message basis using a
One reserved bit RSV1 in the WebSocket frame header is allocated to specified compression algorithm. One reserved bit RSV1 in the
control application of compression for each message. This document WebSocket frame header is allocated to control application of
also specifies one specific compression extension using DEFLATE. compression for each message. This document also specifies one
specific compression extension using the DEFLATE algorithm.
Please send feedback to the hybi@ietf.org mailing list. Please send feedback to the hybi@ietf.org mailing list.
Status of this Memo Status of this Memo
This Internet-Draft is submitted to IETF in full conformance with the This Internet-Draft is submitted to IETF in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current. Drafts is at http://datatracker.ietf.org/drafts/current.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on July 28, 2013. This Internet-Draft will expire on September 14, 2013.
Copyright Notice Copyright Notice
Copyright (c) 2013 IETF Trust and the persons identified as the Copyright (c) 2013 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Conformance Requirements . . . . . . . . . . . . . . . . . . . 4 2. Conformance Requirements and Terminology . . . . . . . . . . . 4
3. Extension Negotiation . . . . . . . . . . . . . . . . . . . . 5 3. WebSocket Per-message Compression Extension . . . . . . . . . 5
3.1. Negotiation Example . . . . . . . . . . . . . . . . . . . 5 4. Extension Negotiation . . . . . . . . . . . . . . . . . . . . 6
4. Framing . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4.1. Negotiation Examples . . . . . . . . . . . . . . . . . . . 6
4.1. Sending . . . . . . . . . . . . . . . . . . . . . . . . . 7 5. Framing . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.2. Receiving . . . . . . . . . . . . . . . . . . . . . . . . 7 5.1. Sending . . . . . . . . . . . . . . . . . . . . . . . . . 8
5. permessage-deflate extension . . . . . . . . . . . . . . . . . 8 5.2. Receiving . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1. Method Parameters . . . . . . . . . . . . . . . . . . . . 8 6. permessage-deflate extension . . . . . . . . . . . . . . . . . 9
5.1.1. Disallow compression context takeover . . . . . . . . 8 6.1. Method Parameters . . . . . . . . . . . . . . . . . . . . 10
5.1.2. Limit maximum LZ77 sliding window size . . . . . . . . 9 6.1.1. Context Takeover Control . . . . . . . . . . . . . . . 10
5.1.3. Example . . . . . . . . . . . . . . . . . . . . . . . 10 6.1.2. Limiting the LZ77 sliding window size . . . . . . . . 10
5.2. Application Data Transformation . . . . . . . . . . . . . 10 6.1.3. Example . . . . . . . . . . . . . . . . . . . . . . . 11
5.2.1. Compression . . . . . . . . . . . . . . . . . . . . . 10 6.2. Payload Data Transformation . . . . . . . . . . . . . . . 12
5.2.2. Decompression . . . . . . . . . . . . . . . . . . . . 11 6.2.1. Compression . . . . . . . . . . . . . . . . . . . . . 12
5.2.3. Examples . . . . . . . . . . . . . . . . . . . . . . . 12 6.2.2. Decompression . . . . . . . . . . . . . . . . . . . . 13
5.3. Intermediaries . . . . . . . . . . . . . . . . . . . . . . 14 6.2.3. Examples . . . . . . . . . . . . . . . . . . . . . . . 14
5.4. Implementation Notes . . . . . . . . . . . . . . . . . . . 15 6.3. Intermediaries . . . . . . . . . . . . . . . . . . . . . . 17
6. Security Considerations . . . . . . . . . . . . . . . . . . . 16 6.4. Implementation Notes . . . . . . . . . . . . . . . . . . . 17
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 7. Security Considerations . . . . . . . . . . . . . . . . . . . 18
7.1. Registration of the "permessage-deflate" WebSocket 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19
Extension Name . . . . . . . . . . . . . . . . . . . . . . 17 8.1. Registration of the "permessage-deflate" WebSocket
7.2. Registration of the "Per-message Compressed" WebSocket Extension Name . . . . . . . . . . . . . . . . . . . . . . 19
Framing Header Bit . . . . . . . . . . . . . . . . . . . . 17 8.2. Registration of the "Per-message Compressed" WebSocket
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 18 Framing Header Bit . . . . . . . . . . . . . . . . . . . . 19
9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 19 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 20
9.1. Normative References . . . . . . . . . . . . . . . . . . . 19 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 21
9.2. Informative References . . . . . . . . . . . . . . . . . . 19 10.1. Normative References . . . . . . . . . . . . . . . . . . . 21
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 20 10.2. Informative References . . . . . . . . . . . . . . . . . . 21
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 22
1. Introduction 1. Introduction
_This section is non-normative._ This document specifies a framework to apply a compression algorithm
to octets exchanged over the WebSocket Protocol [RFC6455]. This
framework uses the extension concept for the WebSocket Protocol is
introduced in the Section 9 of [RFC6455]. By specifying basic
extension negotiation process excluding algorithm specific extension
parameters in detail and a general method of transforming contents of
WebSocket messages using a compression algorithm, this framework
allows us to define WebSocket Per-message Compression Extensions
(PMCEs) to the WebSocket Protocol individually for various
compression algorithms. A WebSocket client and a WebSocket server
negotiate use of a PMCE and determines parameters to configure the
compression algorithm during the WebSocket opening handshake. The
client and server then exchange non-control messages using frames
with compressed data in the payload data portion. Documents
specifying individual PMCEs describe how to negotiate parameters and
how to transform octets in the payload data portion. A WebSocket
client may offer multiple PMCEs during the WebSocket opening
handshake. The WebSocket server received those offers may choose and
accept preferred one from them. PMCEs use the RSV1 bit of the
WebSocket frame header to indicate whether the message is compressed
or not, so that we can choose not to compress messages with
incompressible contents.
As well as other communication protocols, the WebSocket Protocol This document also specifies one specific PMCE based on the DEFLATE
[RFC6455] can benefit from compression technology. This document [RFC1951] algorithm. The extension name of the PMCE is "permessage-
specifies a framework for creating WebSocket extensions that apply a deflate". We chose the DEFLATE since it's widely available as a
compression algorithm to octets exchanged over the WebSocket Protocol library on various platforms and the overhead of the DEFLATE is
using its extension framework. Extensions based on this framework small. To align the end of compressed data to octet boundary, this
negotiate compression parameters during the opening handshake, and extension uses the algorithm described in the Section 2.1 of the PPP
then compress the octets in non-control messages. Extensions for Deflate Protocol [RFC1979]. Endpoints can take over the LZ77 sliding
various compression algorithms can be specified by describing how to window [LZ77] used to build frames for previous messages to get
negotiate parameters and transform data in payloads. A client may better compression ratio. For resource-limited devices, this
offer multiple compression algorithms during the opening handshake by extension provides parameters to limit memory usage for compression
listing multiple compression extensions. The server may choose context.
preferred one from them. Extensions based on this framework share
the RSV1 bit of the WebSocket frame header to indicate whether the
message is compressed or not, so that we can choose to skip messages
with incompressible contents avoiding extra compression.
This document also specifies one specific extension "permessage- 2. Conformance Requirements and Terminology
deflate" which is based on DEFLATE [RFC1951] algorithm. We chose
DEFLATE since it's widely available as library on various platforms
and the overhead it adds for each chunk is small. To align the end
of compressed data to octet boundary, this extension uses the
algorithm described in the Section 2.1 of the PPP Deflate Protocol
[RFC1979]. Endpoints can take over the LZ77 sliding window [LZ77]
used to build previous messages to get better compression ratio. For
resource-limited devices, this extension provides parameters to limit
memory usage for compression context.
The simplest "Sec-WebSocket-Extensions" header in the client's The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
opening handshake to request permessage-deflate is the following: "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119].
Sec-WebSocket-Extensions: permessage-deflate Requirements phrased in the imperative as part of algorithms (such as
"strip any leading space characters" or "return false and abort these
steps") are to be interpreted with the meaning of the key word
("MUST", "SHOULD", "MAY", etc.) used in introducing the algorithm.
The simplest header from the server to accept this extension is the Conformance requirements phrased as algorithms or specific steps can
same. be implemented in any manner, so long as the end result is
equivalent. In particular, the algorithms defined in this
specification are intended to be easy to understand and are not
intended to be performant.
2. Conformance Requirements This document references the procedure to _Fail the WebSocket
Connection_. This procedure is defined in the Section 7.1.7 of
[RFC6455].
Everything in this specification except for sections explicitly This document references the event that _the WebSocket Connection is
marked non-normative is normative. established_. This event is defined in the Section 4.1 of [RFC6455].
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", This document uses the Argumented Backus-Naur Form (ABNF) notation of
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this [RFC5234]. The DIGIT (decimal 0-9) rule is included by reference, as
document are to be interpreted as described in [RFC2119]. defined in the Appendix B.1 of [RFC5234].
3. Extension Negotiation 3. WebSocket Per-message Compression Extension
Extension names and negotiation methods are specified individually WebSocket Per-message Compression Extensions (PMCEs) are individually
for each compression algorithm. There is no additional rule for defined for various compression algorithms, and are registered in the
extension naming. Extensions build based on this framework are WebSocket Extension Name Registry. Each PMCE refers to this
collectively called "Per-message Compression Extensions". framework and defines:
To request use of a Per-message Compression Extension, a client MUST o The content to put in the "Sec-WebSocket-Extensions" header,
include an element with its extension token in the including the extension name of the PMCE and any applicable
"Sec-WebSocket-Extensions" header in its opening handshake. The extension parameters
element contains extension parameters as specified by the
specification of the extension. A client MAY list multiple Per-
message Compression Extensions with the same name to offer use of the
same algorithm with different configurations.
To accept use of a Per-message Compression Extension, a server MUST o How to interpret extension parameters exchanged during the opening
include an element with its extension token in the handshake
"Sec-WebSocket-Extensions" header in its opening handshake. The
element contains extension parameters as specified by the
specification of the extension. The parameters MUST be derived from
the parameters sent by the client and the server's capability. To
reject use of a Per-message Compression Extension, a server MUST
simply ignore the element in the "Sec-WebSocket-Extensions" header in
the client's opening handshake.
If a client doesn't support the extension and its parameters replied o How to transform payload data portion of messages.
from the server, the client MUST _Fail the WebSocket Connection_.
Otherwise, once _the WebSocket Connection is established_, both
endpoints MUST use the algorithm described in Section 4 to exchange
messages.
3.1. Negotiation Example One such extension is defined in Section 6 of this document and is
registered in Section 8. Other PMCEs may be defined in other
documents.
_This section is non-normative._ PMCEs operate only on non-control messages.
These are "Sec-WebSocket-Extensions" header value examples that This document allocates the RSV1 bit of the WebSocket header for
negotiate the Per-message Compression Extension. permessage-foo and PMCEs, and calls the bit the "Per-message Compressed" bit. This bit
permessage-bar in the examples are extension names of Per-message indicates whether the compression method is applied to the contents
Compression Extensions for hypothetical compression algorithm foo and of the message or not. An endpoint MUST NOT offer or accept use of
bar. any other extension using the RSV1 bit together with a PMCE. The
"Per-message Compressed" bit MUST NOT be set on control frames and
non-first fragments of a data message. Messages with the
"Per-message Compressed" bit set (only on the first fragment if the
message is fragmented) are called "compressed messages" and have
compressed data in their payload data portion. Messages with the
"Per-message Compressed" bit unset are called "uncompressed messages"
and have uncompressed data in their payload data portion.
o Request foo. A server MUST NOT accept a PMCE offer together with a non-PMCE
extension if the PMCE will be applied to output of the non-PMCE and
any of the following conditions is met:
permessage-foo o Frame boundary of frames output by the non-PMCE extension needs to
be preserved.
o Request foo with a parameter x with 10 as its value. o The non-PMCE uses the "Extension data" field or any of the
reserved bits on the WebSocket header as per-frame attribute.
permessage-foo; x=10 Section 4 describes basic extension negotiation process. Section 5
describes how to apply the compression algorithm with negotiated
parameters to the contents of WebSocket messages.
o Request foo with a parameter z with "Hello World" (quotation for 4. Extension Negotiation
clarification) as its value. Since "Hello World" contains a
space, it needs to be quoted.
permessage-foo; z="Hello World" To offer use of a PMCE, a client includes a
"Sec-WebSocket-Extensions" header element with the extension name of
the offered PMCE in the "Sec-WebSocket-Extensions" header in the
client's opening handshake of the WebSocket connection. Extension
parameters in the element represent the PMCE offer in detail for
example by listing capability of the client and preferred values for
the algorithm's configuration parameters to use. A client offers
multiple PMCE choices to the server by including multiple elements,
one for each PMCE offered. The set of elements MAY include multiple
PMCEs with the same extension name to offer use of the same algorithm
with different configurations.
o Request foo and bar. To accept use of an offered PMCE, a server includes a
"Sec-WebSocket-Extensions" header element with the extension name of
the offered extension in the "Sec-WebSocket-Extensions" header in the
server's opening handshake of the WebSocket connection. Extension
parameters in the element represent the configuration parameters of
the PMCE to use in detail. The element MUST represent a PMCE that is
fully supported by the server. The server rejects all offered PMCEs
by not including any element with PMCE names, in which case the
connection proceeds without Per-message Compression.
permessage-foo, permessage-bar If the server responds with no PMCE element in the
"Sec-WebSocket-Extensions" header and _the WebSocket Connection is
established_, both endpoints MUST proceed without Per-message
Compression. If the server gives an invalid response, such as
accepting a PMCE that the client did not offer, the client MUST _Fail
the WebSocket Connection_.
o Request foo with a parameter use_y which enables a feature y as If the server responds with a valid PMCE element in the
first choice, and also list one without the parameter as a "Sec-WebSocket-Extensions" header and _the WebSocket Connection is
fallback plan. established_, both endpoints MUST use the algorithm described in
Section 5 to exchange messages, using the payload data transformation
procedure of the PMCE returned by the server.
permessage-foo; use_y, permessage-foo 4.1. Negotiation Examples
4. Framing The followings are example values for the "Sec-WebSocket-Extensions"
header offering PMCEs. permessage-foo and permessage-bar in the
examples are hypothetical extension names of PMCEs for compression
algorithm foo and bar.
This section describes how to apply the negotiated compression method o Offer the permessage-foo.
to the contents of WebSocket messages.
This document allocates the RSV1 bit of the WebSocket header for permessage-foo
extensions based on this framework, and names it the "Per-message
Compressed" bit. Any other extension requiring the use of the RSV1
bit is incompatible with these extensions. This bit MAY be set only
on the first fragment of a message. This bit indicates whether the
compression method is applied to the message or not. Messages with
the "Per-message Compressed" bit set (on its first fragment) are
called "compressed messages". They have compressed data in their
payload. Messages with the bit unset are called "uncompressed
messages". They have uncompressed data in their payload.
Per-message Compression Extensions MUST NOT be used after any o Offer the permessage-foo with a parameter x with a value of 10.
extension for which frame boundary needs to be preserved. Per-
message Compression Extensions MUST NOT be used after any extension
that uses "Extension data" field or any of the reserved bits on the
WebSocket header as per-frame attribute.
Per-message Compression Extensions operates only on data frames. permessage-foo; x=10
4.1. Sending The value MAY be quoted.
To send a compressed message, an endpoint MUST use the following permessage-foo; x="10"
algorithm.
1. Compress the payload of the message using the compression method. o Offer the permessage-foo as first choice and the permessage-bar as
a fallback plan.
permessage-foo, permessage-bar
o Offer the permessage-foo with a parameter use_y which enables a
feature y as first choice, and the permessage-foo without the
use_y parameter as a fallback plan.
permessage-foo; use_y, permessage-foo
5. Framing
5.1. Sending
An endpoint uses the following algorithm to compressed a message to
send.
1. Compress the payload data portion of the message using the
compression algorithm.
2. Build frame(s) for the message by putting the resulting octets 2. Build frame(s) for the message by putting the resulting octets
instead of the original octets. instead of the original octets.
3. Set the "Per-message Compressed" bit of the first fragment to 1. 3. Set the "Per-message Compressed" bit of the first fragment to 1.
To send an uncompressed message, an endpoint MUST set the PMCEs don't change the opcode field. The payload data portion in
"Per-message Compressed" bit of the first fragment of the message to outgoing frames output by a PMCE is not subject to the constraints
0. The payload of the message MUST be sent as-is without applying for the original data type. At the receiver, the payload data
the compression method. portion after decompressing is subject to the constraints for the
original data type again.
4.2. Receiving To send an uncompressed message, an endpoint sets the "Per-message
Compressed" bit of the first fragment of the message to 0. The
payload data portion of the message is sent as-is without applying
the compression.
To receive a compressed message, an endpoint MUST decompress its 5.2. Receiving
payload.
An endpoint MUST receive an uncompressed message as-is without To receive a compressed message, an endpoint decompress the payload
data portion in the frames of the message.
An endpoint receives an uncompressed message as-is without
decompression. decompression.
5. permessage-deflate extension 6. permessage-deflate extension
This section specifies a specific extension called This section specifies a specific PMCE called "permessage-deflate".
"permessage-deflate" that compresses the payload of messages using It compresses the payload data portion of messages using the DEFLATE
DEFLATE [RFC1951] and byte boundary alignment method introduced in [RFC1951] and the byte boundary aligning method introduced in
[RFC1979]. [RFC1979].
The registered extension token for this extension is The registered extension name for this extension is
"permessage-deflate". "permessage-deflate".
5.1. Method Parameters The following 4 extension parameters are defined for this extension.
The following 4 parameters are defined in the following subsections
for this extension.
o "s2c_no_context_takeover" o "s2c_no_context_takeover"
o "c2s_no_context_takeover" o "c2s_no_context_takeover"
o "s2c_max_window_bits" o "s2c_max_window_bits"
o "c2s_max_window_bits" o "c2s_max_window_bits"
A server MUST ignore a "permessage-deflate" extension entry if any of A server MUST decline a "permessage-deflate" offer if any of the
the following is true: following conditions is met:
o It has any parameter unknown to the server o The offer has any extension parameter unknown to the server.
o It has any parameter with an invalid value o The offer has any extension parameter with an invalid value.
o It is not supported by the server o The offer has multiple extension parameters with the same name.
A client MUST _Fail the WebSocket Connection_ if any of the following o The server doesn't support the offered configuration.
is true about the received "permessage-deflate" extension entry:
o It has any parameter unknown to the client A client MUST _Fail the WebSocket Connection_ if the server accepted
a "permessage-deflate" offer with a response meeting any of the
following condition:
o It has any parameter with an invalid value o The response has any extension parameter unknown to the client.
o It is not supported by the client o The response has any extension parameter with an invalid value.
5.1.1. Disallow compression context takeover o The response has multiple extension parameters with the same name.
A client MAY attach the "s2c_no_context_takeover" parameter to o The client doesn't support the configuration the response
disallow the server to take over the LZ77 sliding window used to represents.
build previous messages. Servers SHOULD be able to accept the
"s2c_no_context_takeover" parameter. To accept a request with this
parameter, a server:
o MUST attach this parameter to its response 6.1. Method Parameters
o MUST reset its LZ77 sliding window for sending to empty for each 6.1.1. Context Takeover Control
message
A server MAY attach the "c2s_no_context_takeover" parameter to A client MAY attach the "s2c_no_context_takeover" extension
disallow the client to take over the LZ77 sliding window used to parameter. The "s2c_no_context_takeover" extension parameter has no
build previous messages. Clients SHOULD be able to accept the value. If a server received the "s2c_no_context_takeover" extension
parameter, the server MUST NOT use the same LZ77 sliding window to
compress two or more messages. Servers SHOULD be able to accept the
"s2c_no_context_takeover" parameter. A server accepts an offer with
this extension parameter by including the "s2c_no_context_takeover"
extension parameter in the response. If a server accepted an offer
with this extension parameter, the server MUST empty its LZ77 sliding
window to compress messages to send each time the server builds a new
message.
A server MAY attach the "c2s_no_context_takeover" extension parameter
to disallow the client to use the LZ77 sliding window used to build
frames for the last message the client sent to build frames for the
next message to send. The "c2s_no_context_takeover" extension
parameter has no value. Clients SHOULD be able to accept the
"c2s_no_context_takeover" parameter. A client that received this "c2s_no_context_takeover" parameter. A client that received this
parameter MUST reset its LZ77 sliding window for sending to empty for parameter MUST reset its LZ77 sliding window for sending to empty for
each message. each message.
These parameters have no value. 6.1.2. Limiting the LZ77 sliding window size
5.1.2. Limit maximum LZ77 sliding window size
A client MAY attach the "s2c_max_window_bits" parameter to limit the A client MAY attach the "s2c_max_window_bits" extension parameter to
LZ77 sliding window size that the server uses to build messages. limit the LZ77 sliding window size that the server uses to build
This parameter MUST have a decimal integer value in the range between messages. This extension parameter MUST have a decimal integer value
8 to 15 indicating the base-2 logarithm of the LZ77 sliding window in the range between 8 to 15 indicating the base-2 logarithm of the
size. The ABNF [RFC5234] for the value of this parameter is 1*DIGIT. LZ77 sliding window size.
Servers MAY be able to accept the "s2c_max_window_bits" parameter.
To accept a request with this parameter, the server:
o MUST attach this parameter with the same value as one of the s2c_max_window_bits = 1*DIGIT
"accepted request" to its response
o MUST NOT use LZ77 sliding window size greater than the size A server declines an offer with this extension parameter if the
specified by this parameter to build messages server doesn't support the extension parameter. A server accepts an
offer with this extension parameter by including the extension
parameter with the same value as the offer in the response. If a
server accepts an offer with this extension parameter, the server
MUST NOT use LZ77 sliding window size greater than the size specified
by the extension parameter to compress messages
A client MAY attach the "c2s_max_window_bits" parameter if the client A client MAY attach the "c2s_max_window_bits" extension parameter if
can adjust LZ77 sliding window size based on the the client can adjust LZ77 sliding window size based on the
"c2s_max_window_bits" sent by the server. This parameter has no "c2s_max_window_bits" sent by the server. This parameter has no
value. value.
If the received request has the "c2s_max_window_bits" parameter, the If a server received and accepts an offer with the
server MAY respond to the request with the "c2s_max_window_bits" "c2s_max_window_bits" extension parameter, the server MAY include the
parameter to limit the LZ77 sliding window size that the client uses "c2s_max_window_bits" parameter in the response to the offer to limit
to build messages. Otherwise, the server MUST NOT accept the request the LZ77 sliding window size that the client uses to build messages.
with a response with the parameter. This parameter sent by the If a server received and accepts an offer without the
server MUST have a decimal integer value in the range between 8 to 15 "c2s_max_window_bits" extension parameter, the server MUST NOT
indicating the base-2 logarithm of the LZ77 sliding window size. The include the "c2s_max_window_bits" extension parameter in the response
ABNF for the value of this parameter is 1*DIGIT. A client that to the offer. The "c2s_max_window_bits" extension parameter in the
received this parameter MUST NOT use LZ77 sliding window size greater server's opening handshake MUST have a decimal integer value in the
than the size specified by this parameter to build messages. range between 8 to 15 indicating the base-2 logarithm of the LZ77
sliding window size.
5.1.3. Example c2s_max_window_bits = 1*DIGIT
_This section is non-normative._ If a client received the "c2s_max_window_bits" extension parameter,
the client MUST NOT use LZ77 sliding window size greater than the
size specified by the extension parameter to build messages.
This example sent by a client is asking the server to use LZ77 6.1.3. Example
sliding window size of 1,024 bytes or less and declaring that the
client can accept the "c2s_max_window_bits" parameter.
Sec-WebSocket-Extensions: permessage-deflate; The simplest "Sec-WebSocket-Extensions" header in a client's opening
c2s_max_window_bits; handshake to offer use of the permessage-deflate is the following:
s2c_max_window_bits=10
This request might be rejected by the server because it doesn't Sec-WebSocket-Extensions: permessage-deflate
support the "s2c_max_window_bits" parameter. Since there's only one
compression extension listed in the header, the server need to give
up use of the Per-message Compression Extension entirely. If
reduction of LZ77 sliding window size by the server is mandatory for
the client, this is fine.
The next example lists two configurations so that the server can Since the "c2s_max_window_bits" extension parameter is not specified,
accept permessage-deflate by picking supported one from them. the server may not accept the offer with the "c2s_max_window_bits"
extension parameter. The simplest "Sec-WebSocket-Extensions" header
in a server's opening handshake to accept use of the permessage-
deflate is the same.
The following offer sent by a client is asking the server to use the
LZ77 sliding window size of 1,024 bytes or less and declaring that
the client can accept the "c2s_max_window_bits" extension parameter.
Sec-WebSocket-Extensions: Sec-WebSocket-Extensions:
permessage-deflate; s2c_max_window_bits=10, permessage-deflate;
permessage-deflate c2s_max_window_bits; s2c_max_window_bits=10
The server can choose to accept the second extension entry by sending This offer might be rejected by the server because the server doesn't
back this for example: support the "s2c_max_window_bits" extension parameter. This is fine
if the "s2c_max_window_bits" is mandatory for the client, but if the
client want to fallback to the "permessage-deflate" without the
"s2c_max_window_bits", the client should offer the fallback option in
addition like this:
Sec-WebSocket-Extensions: permessage-deflate Sec-WebSocket-Extensions:
permessage-deflate;
c2s_max_window_bits; s2c_max_window_bits=10,
permessage-deflate;
c2s_max_window_bits
Since the "c2s_max_window_bits" parameter was not specified for both This example offers two configurations so that the server can accept
of the extensions, the server cannot use the "c2s_max_window_bits" permessage-deflate by picking supported one from them. To accept the
parameter. first option, the server sends back this for example:
5.2. Application Data Transformation Sec-WebSocket-Extensions:
permessage-deflate; s2c_max_window_bits=10
5.2.1. Compression And to accept the second option, the server sends back this for
example:
An endpoint MUST use the following algorithm to compress a message. Sec-WebSocket-Extensions: permessage-deflate
1. Compress all the octets of the payload of the message using 6.2. Payload Data Transformation
DEFLATE.
2. If the resulting data does not end with an empty block with no 6.2.1. Compression
compression ("BTYPE" set to 0), append an empty block with no
compression to the tail.
3. Remove 4 octets (that are 0x00 0x00 0xff 0xff) from the tail. An endpoint uses the following algorithm to compress a message.
After this step, the last octet of the compressed data contains
the (part of) header bits with "BTYPE" set to 0.
In the first step: 1. Compress all the octets of the payload data portion of the
message using the DEFLATE.
o Multiple blocks MAY be used. 2. If the resulting data does not end with an empty DEFLATE block
with no compression (the "BTYPE" bit is set to 0), append an
empty DEFLATE block with no compression to the tail end.
o Any type of block MAY be used. 3. Remove 4 octets (that are 0x00 0x00 0xff 0xff) from the tail end.
After this step, the last octet of the compressed data contains
(possibly part of) the DEFLATE header bits with the "BTYPE" bit
set to 0.
o Both block with "BFINAL" set to 0 and 1 MAY be used. In using the DEFLATE in the first step above:
o When any block with "BFINAL" set to 1 doesn't end at byte o An endpoints MAY use multiple DEFLATE blocks to compress one
boundary, minimal padding bits of 0 MUST be added to make it end message.
at byte boundary, and then the next block MUST start at the byte
boundary if any.
An endpoint MUST NOT use an LZ77 sliding window greater than 32,768 o An endpoints MAY use DEFLATE blocks of any type.
bytes to build messages to send.
If the server specified the "s2c_no_context_takeover" parameter, the o An endpoints MAY use both DEFLATE blocks with the "BFINAL" bit set
server MUST reset its LZ77 sliding window for sending to empty for to 0 and DEFLATE blocks with the "BFINAL" bit set to 1.
each message. Otherwise, the server MAY take over the LZ77 sliding
window used to build the last compressed message.
If the server specified the "c2s_no_context_takeover" parameter, the o When any DEFLATE block with the "BFINAL" bit set to 1 doesn't end
client MUST reset its LZ77 sliding window for sending to empty for at byte boundary, an endpoint adds minimal padding bits of 0 to
each message. Otherwise, the client MAY take over the LZ77 sliding make it end at byte boundary. The next DEFLATE block follows the
window used to build the last compressed message. padded data if any.
If the server specified the "s2c_max_window_bits" parameter and its An endpoint MUST NOT use an LZ77 sliding window longer than 32,768
value is w, the server MUST NOT use an LZ77 sliding window greater bytes to compress messages to send.
than w-th power of 2 bytes to build messages to send.
If the server specified the "c2s_max_window_bits" parameter and its If a server accepts an offer with the "c2s_no_context_takeover"
value is w, the client MUST NOT use an LZ77 sliding window greater extension parameter, the client MUST empty its LZ77 sliding window to
than w-th power of 2 bytes to build messages to send. compress messages to send each time the client compresses a new
message to send. Otherwise, the client MAY take over the LZ77
sliding window used to build the last compressed message.
5.2.2. Decompression If a server accepts an offer with the "s2c_no_context_takeover"
extension parameter, the server MUST empty its LZ77 sliding window to
compress messages to send each time the server compresses a new
message to send. Otherwise, the server MAY take over the LZ77
sliding window used to build the last compressed message.
An endpoint MUST use the following algorithm to decompress a message. If a server accepts an offer with the "c2s_max_window_bits" extension
parameter with a value of w, the client MUST NOT use an LZ77 sliding
window longer than w-th power of 2 bytes to compress messages to
send.
1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail of the payload If a server accepts an offer with the "s2c_max_window_bits" extension
of the message. parameter with a value of w, the server MUST NOT use an LZ77 sliding
window longer than w-th power of 2 bytes to compress messages to
send.
2. Decompress the resulting octets using DEFLATE. 6.2.2. Decompression
If the server specified the "s2c_no_context_takeover" parameter, the An endpoint uses the following algorithm to decompress a message.
client MAY reset its LZ77 sliding window for receiving to empty for
each message. Otherwise, the client MUST take over the LZ77 sliding
window used to parse the last compressed message.
If the server specified the "c2s_no_context_takeover" parameter, the 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the
server MAY reset its LZ77 sliding window for receiving to empty for payload data portion of the message.
each message. Otherwise, the server MUST take over the LZ77 sliding
window used to parse the last compressed message.
If the server specified the "s2c_max_window_bits" parameter and its 2. Decompress the resulting data using the DEFLATE.
value is w, the client MAY reduce the size of the LZ77 sliding window
to decompress received messages down to the w-th power of 2 bytes.
Otherwise, the client MUST use a 32,768 byte LZ77 sliding window to
decompress received messages.
If the server specified the "c2s_max_window_bits" parameter and its If a server accepts an offer with the "s2c_no_context_takeover"
value is w, the server MAY reduce the size of the LZ77 sliding window extension parameter, the client MAY empty its LZ77 sliding window to
to decompress received messages down to the w-th power of 2 bytes. decompress received messages each time the client decompresses a new
Otherwise, the server MUST use a 32,768 byte LZ77 sliding window to received message. Otherwise, the client MUST take over the LZ77
decompress received messages. sliding window used to process the last compressed message.
5.2.3. Examples If a server accepts an offer with the "c2s_no_context_takeover"
extension parameter, the server MAY empty its LZ77 sliding window to
decompress received messages each time the server decompresses a new
received message. Otherwise, the server MUST take over the LZ77
sliding window used to process the last compressed message.
_This section is non-normative._ If a server accepts an offer with the "s2c_max_window_bits" extension
parameter with a value of w, the client MAY reduce the size of its
LZ77 sliding window to decompress received messages down to the w-th
power of 2 bytes. Otherwise, the client MUST use a 32,768 byte LZ77
sliding window to decompress received messages.
If a server accepts an offer with the "c2s_max_window_bits" extension
parameter with a value of w, the server MAY reduce the size of its
LZ77 sliding window to decompress received messages down to the w-th
power of 2 bytes. Otherwise, the server MUST use a 32,768 byte LZ77
sliding window to decompress received messages.
6.2.3. Examples
This section introduces examples of how the permessage-deflate This section introduces examples of how the permessage-deflate
transforms messages. transforms messages.
5.2.3.1. A message compressed using 1 compressed block 6.2.3.1. A message compressed using 1 compressed DEFLATE block
Suppose that a text message "Hello" is sent. When 1 compressed block Suppose that an endpoint sends a text message "Hello". If the
(compressed with fixed Huffman code, "BFINAL" is not set) is used, endpoint uses 1 compressed DEFLATE block (compressed with fixed
compressed data to be sent in payload is obtained as follows. Huffman code and the "BFINAL" bit is not set) to compress the
message, the endpoint obtains the compressed data to put in the
payload data portion as follows.
Compress "Hello" into 1 compressed block and flush it into a byte The endpoint compresses "Hello" into 1 compressed DEFLATE block and
array using an empty block with no compression: flushes the resulting data into a byte array using an empty DEFLATE
block with no compression:
0xf2 0x48 0xcd 0xc9 0xc9 0x07 0x00 0x00 0x00 0xff 0xff 0xf2 0x48 0xcd 0xc9 0xc9 0x07 0x00 0x00 0x00 0xff 0xff
Strip 0x00 0x00 0xff 0xff from the tail: By stripping 0x00 0x00 0xff 0xff from the tail end, the endpoint gets
the data to put in the payload data portion:
0xf2 0x48 0xcd 0xc9 0xc9 0x07 0x00 0xf2 0x48 0xcd 0xc9 0xc9 0x07 0x00
To send it without fragmentation, just build a frame putting the Suppose that the endpoint sends this compressed message without
whole data in payload data: fragmentation. The endpoint builds one frame by putting the whole
compressed data in the payload data portion of the frame:
0xc1 0x07 0xf2 0x48 0xcd 0xc9 0xc9 0x07 0x00 0xc1 0x07 0xf2 0x48 0xcd 0xc9 0xc9 0x07 0x00
The first 2 octets are the WebSocket protocol's overhead (FIN=1, The first 2 octets (0xc1 0x07) are the WebSocket frame header (FIN=1,
RSV1=1, RSV2=0, RSV3=0, opcode=text, MASK=0, Payload length=7). RSV1=1, RSV2=0, RSV3=0, opcode=text, MASK=0, Payload length=7). The
following figure shows what value is set in each field of the
WebSocket frame header.
To send it after fragmentation, split the compressed payload and 0 1
build frames for each of split data as well as fragmentation process 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
done when the compression extension is not used. For example, the +-+-+-+-+-------+-+-------------+
first fragment may contain 3 octets of the payload: |F|R|R|R| opcode|M| Payload len |
|I|S|S|S| |A| |
|N|V|V|V| |S| |
| |1|2|3| |K| |
+-+-+-+-+-------+-+-------------+
|1|1|0|0| 1 |0| 7 |
+-+-+-+-+-------+-+-------------+
Suppose that the endpoint sends the compressed message with
fragmentation. The endpoint splits the compressed data into
fragments and builds frames for each fragment. For example, if the
fragments are 3 and 4 octet, the first frame is:
0x41 0x03 0xf2 0x48 0xcd 0x41 0x03 0xf2 0x48 0xcd
and the second (last) fragment contain 4 octets of the payload: and the second frame is:
0x80 0x04 0xc9 0xc9 0x07 0x00 0x80 0x04 0xc9 0xc9 0x07 0x00
Note that RSV1 is set only on the first fragment. Note that the RSV1 bit is set only on the first frame.
5.2.3.2. Sharing LZ77 Sliding Window 6.2.3.2. Sharing LZ77 Sliding Window
Suppose that the next message to send is also "Hello". If it's Suppose that a client has sent a message "Hello" as a compressed
disallowed by the other peer (using some extension parameter) to take message and will send the same message "Hello" again as a compressed
over the LZ77 sliding window used for the last message, the next message. If the server has accepted the offer with the
message is compressed into the same byte array (if the same "BTYPE" "c2s_no_context_takeover" extension parameter, the server compresses
and "BFINAL" value are used). If it's allowed, the next message can the payload data portion of the next message into the same bytes (if
be compressed into shorter payload: the server uses the same "BTYPE" value and "BFINAL" value):
0xf2 0x00 0x11 0x00 0x00 0xf2 0x48 0xcd 0xc9 0xc9 0x07 0x00
instead of: If the server hasn't accepted the offer with the
"c2s_no_context_takeover" extension parameter, the server can
compress the payload data portion of the next message into shorter
bytes utilizing the history in the LZ77 sliding window:
0xf2 0x48 0xcd 0xc9 0xc9 0x07 0x00 0xf2 0x00 0x11 0x00 0x00
Note that even if any uncompressed message is inserted between the Note that even if any uncompressed message (any message with the RSV1
two "Hello" messages, it doesn't affect context sharing between the bit unset) is inserted between the two "Hello" messages, such a
two "Hello" messages. message doesn't make any change on the LZ77 sliding window.
5.2.3.3. Using a Block with No Compression 6.2.3.3. Using a DEFLATE Block with No Compression
Blocks with no compression can be also used. A block with no Suppose that an endpoint compresses a text message "Hello" using a
compression containing "Hello" flushed into a byte array using an DEFLATE block with no compression. A DEFLATE block with no
empty block with no compression is: compression containing "Hello" flushed into a byte array using
another but empty DEFLATE block with no compression is:
0x00 0x05 0x00 0xfa 0xff 0x48 0x65 0x6c 0x6c 0x6f 0x00 0x00 0x05 0x00 0xfa 0xff 0x48 0x65 0x6c 0x6c 0x6f 0x00
0x00 0x00 0xff 0xff 0x00 0x00 0xff 0xff
So, payload of a message containing "Hello" converted into a DEFLATE The endpoint strips the 4 octets at the tail end:
block with no compression is:
0x00 0x05 0x00 0xfa 0xff 0x48 0x65 0x6c 0x6c 0x6f 0x00 0x00 0x05 0x00 0xfa 0xff 0x48 0x65 0x6c 0x6c 0x6f 0x00
If it's not fragmented, the frame for this message is: The endpoint builds a frame by putting the resulting data in the
payload data portion of the frame:
0xc1 0x0b 0x00 0x05 0x00 0xfa 0xff 0x48 0x65 0x6c 0x6c 0x6f 0x00 0xc1 0x0b 0x00 0x05 0x00 0xfa 0xff 0x48 0x65 0x6c 0x6c 0x6f 0x00
The first 2 octets are the WebSocket protocol's overhead (FIN=1, The first 2 octets (0xc1 0x0b) are the WebSocket frame header (FIN=1,
RSV1=1, RSV2=0, RSV3=0, opcode=text, MASK=0, Payload length=7). Note RSV1=1, RSV2=0, RSV3=0, opcode=text, MASK=0, Payload length=7). Note
that RSV1 must be set for this message (only on the first fragment of that the RSV1 bit is set for this message (only on the first fragment
it) because RSV1 indicates whether DEFLATE is applied to the message if the message is fragmented) because the RSV1 bit is set when the
including use of blocks with no compression or not. DEFLATE is applied to the message and it includes the case only
DEFLATE blocks with no compression are used.
5.2.3.4. Using a Block with BFINAL Set to 1 6.2.3.4. Using a DEFLATE Block with BFINAL Set to 1
On platform where the flush method based on an empty block with no On platform where the flush method using an empty DEFLATE block with
compression is not avaiable, implementors can choose to flush data no compression is not avaiable, implementors can choose to flush data
using blocks with "BFINAL" set to 1. Using a block with "BFINAL" set using DEFLATE blocks with "BFINAL" set to 1. Using a DEFLATE block
to 1 and "BTYPE" set to 1, "Hello" is compressed into: with "BFINAL" set to 1 and "BTYPE" set to 1, "Hello" is compressed
into:
0xf3 0x48 0xcd 0xc9 0xc9 0x07 0x00 0xf3 0x48 0xcd 0xc9 0xc9 0x07 0x00
So, payload of a message containing "Hello" compressed using this So, payload of a message containing "Hello" compressed using this
parameter setting is: method is:
0xf3 0x48 0xcd 0xc9 0xc9 0x07 0x00 0x00 0xf3 0x48 0xcd 0xc9 0xc9 0x07 0x00 0x00
The last 1 octet contains the header bits with "BFINAL" set to 0 and The last 1 octet (0x00) contains the header bits with "BFINAL" set to
"BTYPE" set to 0, and 7 padding bits of 0. It's necessary to make 0 and "BTYPE" set to 0, and 7 padding bits of 0. This octet is
the payload able to be processed by the same manner as messages necessary to allow the payload to be decompressed in the same manner
flushed using blocks with BFINAL unset. as messages flushed using DEFLATE blocks with BFINAL unset.
5.2.3.5. Two Blocks in 1 Message 6.2.3.5. Two DEFLATE Blocks in 1 Message
Two or more blocks may be used in 1 message. Two or more DEFLATE blocks may be used in 1 message.
0xf2 0x48 0x05 0x00 0x00 0x00 0xff 0xff 0xca 0xc9 0xc9 0x07 0x00 0xf2 0x48 0x05 0x00 0x00 0x00 0xff 0xff 0xca 0xc9 0xc9 0x07 0x00
The first 3 octets and the least significant two bits of the 4th The first 3 octets (0xf2 0x48 0x05) and the least significant two
octet consist one block with "BFINAL" set to 0 and "BTYPE" set to 1 bits of the 4th octet (0x00) consist one DEFLATE block with "BFINAL"
containing "He". The rest of the 4th octet contains the header bits set to 0 and "BTYPE" set to 1 containing "He";. The rest of the 4th
with "BFINAL" set to 0 and "BTYPE" set to 0, and the 3 padding bits octet contains the header bits with "BFINAL" set to 0 and "BTYPE" set
of 0. Together with the following 4 octets (0x00 0x00 0xff 0xff), to 0, and the 3 padding bits of 0. Together with the following 4
the header bits consist an empty block with no compression. Then, a octets (0x00 0x00 0xff 0xff), the header bits consist an empty
block containing "llo" follows. DEFLATE block with no compression. A DEFLATE block containing "llo"
follows the empty DEFLATE block.
5.3. Intermediaries
When intermediaries forward messages, they MAY decompress and/or 6.3. Intermediaries
compress the messages according to the constraints negotiated during
the opening handshake of the connection(s).
5.4. Implementation Notes When an intermediary forwards messages, the intermediary MAY add,
change or remove Per-message Compression on the messages. The
elements in the "Sec-WebSocket-Extensions" for the PMCE in the
opening handshakes with the connected client and server must be
altered by the intermediary accordingly to match the new framing.
_This section is non-normative._ 6.4. Implementation Notes
On most common software development platforms, the operation of On most common software development platforms, their DEFLATE
aligning compressed data to byte boundaries using an empty block with compression library provide a method to align compressed data to byte
no compression is available as a library. For example, Zlib [Zlib] boundaries using an empty DEFLATE block with no compression. For
does this when "Z_SYNC_FLUSH" is passed to deflate function. example, Zlib [Zlib] does this when "Z_SYNC_FLUSH" is passed to the
deflate function.
To get sufficient compression ratio, LZ77 sliding window size of To attain sufficient compression ratio, the LZ77 sliding window size
1,024 or more is recommended. of 1,024 or more is RECOMMENDED.
6. Security Considerations 7. Security Considerations
There are no security concerns for now. There is a known exploit for combination of a secure transport
protocol and a dictionary based compression [CRIME]. Implementors
should give attention to this point when integrating this extension
with other extensions or protocols.
7. IANA Considerations 8. IANA Considerations
7.1. Registration of the "permessage-deflate" WebSocket Extension Name 8.1. Registration of the "permessage-deflate" WebSocket Extension Name
This section describes a WebSocket extension name registration in the This section describes a WebSocket extension name registration in the
WebSocket Extension Name Registry [RFC6455]. WebSocket Extension Name Registry [RFC6455].
Extension Identifier Extension Identifier
permessage-deflate permessage-deflate
Extension Common Name Extension Common Name
WebSocket Per-message Deflate WebSocket Per-message Deflate
Extension Definition Extension Definition
This document. This document.
Known Incompatible Extensions Known Incompatible Extensions
None None
The "permessage-deflate" token is used in the The "permessage-deflate" extension name is used in the
"Sec-WebSocket-Extensions" header in the WebSocket opening handshake "Sec-WebSocket-Extensions" header in the WebSocket opening handshake
to negotiate use of the permessage-deflate extension. to negotiate use of the permessage-deflate extension.
7.2. Registration of the "Per-message Compressed" WebSocket Framing 8.2. Registration of the "Per-message Compressed" WebSocket Framing
Header Bit Header Bit
This section describes a WebSocket framing header bit registration in This section describes a WebSocket framing header bit registration in
the WebSocket Framing Header Bits Registry [RFC6455]. the WebSocket Framing Header Bits Registry [RFC6455].
Header Bit Header Bit
RSV1 RSV1
Common Name Common Name
Per-message Compressed Per-message Compressed
Meaning Meaning
The message is compressed or not. The message is compressed or not.
Reference Reference
Section 4 of this document. Section 5 of this document.
The "Per-message Compressed" framing header bit is used on the first The "Per-message Compressed" framing header bit is used on the first
fragment of non-control messages to indicate whether the payload of fragment of non-control messages to indicate whether the payload data
the message is compressed by the Per-message Compression Extension or portion of the message is compressed by the PMCE or not.
not.
8. Acknowledgements 9. Acknowledgements
Special thanks to Patrick McManus who wrote up the initial Special thanks to Patrick McManus who wrote up the initial
specification of DEFLATE based compression extension for the specification of a DEFLATE-based compression extension for the
WebSocket Protocol to which I referred to write this specification. WebSocket Protocol to which I referred to write this specification.
Thank you to the following people who participated in discussions on Thank you to the following people who participated in discussions on
the HyBi WG and contributed ideas and/or provided detailed reviews the HyBi WG and contributed ideas and/or provided detailed reviews
(the list is likely to be incomplete): Alexey Melnikov, Arman (the list is likely to be incomplete): Alexey Melnikov, Arman
Djusupov, Bjoern Hoehrmann, Brian McKelvey, Greg Wilkins, Inaki Baz Djusupov, Bjoern Hoehrmann, Brian McKelvey, Greg Wilkins, Inaki Baz
Castillo, Jamie Lokier, Joakim Erdfelt, John A. Tamplin, Julian Castillo, Jamie Lokier, Joakim Erdfelt, John A. Tamplin, Julian
Reschke, Kenichi Ishibashi, Mark Nottingham, Peter Thorson, Roberto Reschke, Kenichi Ishibashi, Mark Nottingham, Peter Thorson, Roberto
Peon and Simone Bordet. Note that people listed above didn't Peon and Simone Bordet. Note that people listed above didn't
necessarily endorse the end result of this work. necessarily endorse the end result of this work.
9. References 10. References
9.1. Normative References 10.1. Normative References
[RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234, January 2008. Specifications: ABNF", STD 68, RFC 5234, January 2008.
[RFC6455] Fette, I. and A. Melnikov, "The WebSocket Protocol", [RFC6455] Fette, I. and A. Melnikov, "The WebSocket Protocol",
RFC 6455, December 2011. RFC 6455, December 2011.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[LZ77] Ziv, J. and A. Lempel, "A Universal Algorithm for [LZ77] Ziv, J. and A. Lempel, "A Universal Algorithm for
Sequential Data Compression", IEEE Transactions on Sequential Data Compression", IEEE Transactions on
Information Theory, Vol. 23, No. 3, pp. 337-343. Information Theory, Vol. 23, No. 3, pp. 337-343.
9.2. Informative References 10.2. Informative References
[RFC1951] Deutsch, P., "DEFLATE Compressed Data Format Specification [RFC1951] Deutsch, P., "DEFLATE Compressed Data Format Specification
version 1.3", RFC 1951, May 1996. version 1.3", RFC 1951, May 1996.
[RFC1979] Woods, J., "PPP Deflate Protocol", RFC 1979, August 1996. [RFC1979] Woods, J., "PPP Deflate Protocol", RFC 1979, August 1996.
[Zlib] Gailly, J. and M. Adler, "Zlib", <http://zlib.net/>. [Zlib] Gailly, J. and M. Adler, "Zlib", <http://zlib.net/>.
[CRIME] Rizzo, J. and T. Duong, "The CRIME attack", Ekoparty 2012,
September 2012.
Author's Address Author's Address
Takeshi Yoshino Takeshi Yoshino
Google, Inc. Google, Inc.
Email: tyoshino@google.com Email: tyoshino@google.com
 End of changes. 150 change blocks. 
382 lines changed or deleted 501 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/