This document specifies how to use the LZW algorithm in XML stream compression.
NOTICE: The protocol defined herein is a Draft Standard of the XMPP Standards Foundation. Implementations are encouraged and the protocol is appropriate for deployment in production systems, but some changes to the protocol are possible before it becomes a Final Standard.
Series: XEP
Number: 0229
Publisher: XMPP Standards Foundation
Status:
Draft
Type:
Standards Track
Version: 1.0
Last Updated: 2007-09-26
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0138
Supersedes: None
Superseded By: None
Short Name: N/A
Wiki Page: <http://wiki.jabber.org/index.php/Stream Compression with LZW (XEP-0229)>
JabberID:
stpeter@jabber.org
URI:
https://stpeter.im/
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>.
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.
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".
1. Introduction
2. Background
3. Definition
4. Optionality
5. Security Considerations
6. IANA Considerations
7. XMPP Registrar Considerations
7.1. Compression Methods Registry
Notes
Revision History
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]). This document specifies usage of the LZW compression method.
The "LZW" compression algorithm was originally developed by Abraham Lempel and Jacob Ziv, subsequently improved by Terry Welch [3], and patented by Sperry Corporation (later Unisys Corporation) as U.S. Patent Number 4,464,650 [4]. This patent expired on June 20, 2003 [5]. Therefore implementations of LZW are no longer patent-encumbered.
The algorithm is specified by Ecma International in Standard ECMA-151 [6] under the name "DCLZ".
If the receiving entity (server) supports the LZW algorithm, it MUST include a <method/> element whose XML character data is "lzw" in the compression stream feature, as follows.
Example 1. Receiving Entity Offers Stream Compression Feature, Including LZW Method
<stream:features>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
<method>lzw</method>
</compression>
</stream:features>
If the initiating entity wishes to use the LZW algorithm, then it MUST specify that method.
Example 2. Initiating Entity Requests Stream Compression Using LZW
<compress xmlns='http://jabber.org/protocol/compress'>
<method>lzw</method>
</compress>
The initiating entity and receiving entity then MUST attempt to negotiate use of the LZW algorithm in accordance with XEP-0138.
If the use of the LZW algorithm is negotiated, the usage SHOULD follow the definition in ECMA-151.
The LZW algorithm is OPTIONAL to implement for XEP-0138 implementations and this specification does not define a mandatory-to-implement technology.
The security considerations specified in XEP-0138 apply to usage of the LZW algorithm.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [7].
The XMPP Registrar [8] maintains a registry of compression methods at <http://www.xmpp.org/registrar/compress.html>.
The LZW algorithm is already registered. This specification updates the registry submission as follows:
<method>
<name>lzw</name>
<desc>the LZW (DCLZ) compression method</desc>
<doc>XEP-0229</doc>
</method>
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. See "A Technique for High-Performance Data Compression", Computer (June 1984), pp. 8-19.
4. See <http://patft.uspto.gov/netacgi/nph-Parser?patentnumber=4,464,650>.
5. See <http://www.unisys.com/about__unisys/lzw>.
6. Standard ECMA-151: Data Compression for Information Interchange - Adaptive Coding with Embedded Dictionary - DLCZ Algorithm <http://www.ecma-international.org/publications/standards/Ecma-151.htm>.
7. 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/>.
8. 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/>.
Per a vote of the XMPP Council, published as Draft.
(psa)Copied text from XEP-0138.
(psa)END