XEP-xxxx: Stream Compression with Efficient XML Interchange

This document specifies how to use Efficient XML Interchange (EXI) in XML stream compression.

WARNING: This document has not yet been accepted for consideration or approved in any official manner by the XMPP Standards Foundation, and this document must not be referred to as an XMPP Extension Protocol (XEP). If this document is accepted as a XEP by the XMPP Council, it will be published at <http://www.xmpp.org/extensions/> and announced on the <standards@xmpp.org> mailing list.

Document Information

Series: XEP
Number: xxxx
Publisher: XMPP Standards Foundation
Status: ProtoXEP
Type: Standards Track
Version: 0.0.1
Last Updated: 2008-02-15
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0138
Supersedes: None
Superseded By: None
Short Name: N/A

Author Information

Peter Saint-Andre

JabberID: stpeter@jabber.org
URI: https://stpeter.im/

Legal Notices


This XMPP Extension Protocol is copyright (c) 1999 - 2008 by the XMPP Standards Foundation (XSF).


Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. In no event shall the XMPP Standards Foundation or the authors of this Specification be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising out of the use or inability to use the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which may be found at <http://www.xmpp.org/extensions/ipr-policy.shtml> or obtained by writing to XSF, P.O. Box 1641, Denver, CO 80201 USA).

Discussion Venue

The preferred venue for discussion of this document is the Standards discussion list: <http://mail.jabber.org/mailman/listinfo/standards>.

Errata may be sent to <editor@xmpp.org>.

Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.

Conformance Terms

The following keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".

Table of Contents

1. Introduction
2. Definition
3. Optionality
4. Security Considerations
5. IANA Considerations
6. XMPP Registrar Considerations
    6.1. Compression Methods Registry
Revision History

1. Introduction

Stream Compression [1] specifies an extensible framework for XML stream compression and defines a registry for compression methods (see <http://www.xmpp.org/registrar/compress.html>). However, XEP-0138 registers only the ZLIB method (see RFC 1950 [2]). Another such method is Efficient XML Interchange [3] (EXI), a technology produced by the World Wide Web Consortium (W3C) [4]. The EXI specification defines the technology as follows:

EXI is a very compact representation for the Extensible Markup Language (XML) Information Set that is intended to simultaneously optimize performance and the utilization of computational resources. The EXI format uses a hybrid approach drawn from the information and formal language theories, plus practical techniques verified by measurements, for entropy encoding XML information. Using a relatively simple algorithm, which is amenable to fast and compact implementation, and a small set of data types, it reliably produces efficient encodings of XML event streams.

Given that XMPP is an application profile of XML, it is possible to use EXI as a method for compression of XML streams as defined for XMPP. This specifccation defines how to negotiate the use of EXI for XMPP stream compression.

2. Definition

If the receiving entity (server) supports Efficient XML Interchange as a stream compression method, it MUST include a <method/> element whose XML character data is "exi" in the compression stream feature, as follows.

Example 1. Receiving Entity Offers Stream Compression Feature, Including EXI Method

  <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
  <compression xmlns='http://jabber.org/features/compress'>

If the initiating entity wishes to use Efficient XML Interchange, then it MUST specify that method.

Example 2. Initiating Entity Requests Stream Compression Using EXI

<compress xmlns='http://jabber.org/protocol/compress'>

The initiating entity and receiving entity then MUST attempt to negotiate use of Efficient XML Interchange in accordance with XEP-0138.

If the use of Efficient XML Interchange is negotiated, the usage MUST follow the definition in the W3C's EXI specification.

3. Optionality

The EXI method is OPTIONAL to implement for XEP-0138 implementations and this specification does not define a mandatory-to-implement technology.

4. Security Considerations

The security considerations specified in XEP-0138 apply to usage of the EXI method.

5. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [5].

6. XMPP Registrar Considerations

6.1 Compression Methods Registry

The XMPP Registrar [6] maintains a registry of compression methods at <http://www.xmpp.org/registrar/compress.html>.

The Registrar shall update the registry with the following entry:

  <desc>the Efficient XML Interchange (EXI) compression method</desc>


1. XEP-0138: Stream Compression <http://www.xmpp.org/extensions/xep-0138.html>.

2. RFC 1950: ZLIB Compressed Data Format Specification version 3.3 <http://tools.ietf.org/html/rfc1950>.

3. Efficient XML Interchange (EXI) Format 1.0 <http://www.w3.org/TR/exi>.

4. The World Wide Web Consortium defines data formats and markup languages (such as HTML and XML) for use over the Internet. For further information, see <http://www.w3.org/>.

5. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.

6. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://www.xmpp.org/registrar/>.

Revision History

Version 0.0.1 (2008-02-15)

First draft.