95 lines
4.7 KiB

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<title>Stream Compression with LZW</title>
<abstract>This document specifies how to use the LZW algorithm in XML stream compression.</abstract>
<type>Standards Track</type>
<spec>XMPP Core</spec>
<remark><p>Per a vote of the XMPP Council, published as Draft.</p></remark>
<remark><p>Copied text from XEP-0138.</p></remark>
<section1 topic='Introduction' anchor='intro'>
<p>&xep0138; specifies an extensible framework for XML stream compression and defines a registry for compression methods (see &COMPRESSMETHODS;). However, <cite>XEP-0138</cite> registers only the ZLIB method (see &rfc1950;). This document specifies usage of the LZW compression method.</p>
<section1 topic='Background' anchor='background'>
<p>The "LZW" compression algorithm was originally developed by Abraham Lempel and Jacob Ziv, subsequently improved by Terry Welch <note>See "A Technique for High-Performance Data Compression", <cite>Computer</cite> (June 1984), pp. 8-19.</note>, and patented by Sperry Corporation (later Unisys Corporation) as U.S. Patent Number 4,464,650 <note>See &lt;<link url='http://patft.uspto.gov/netacgi/nph-Parser?patentnumber=4,464,650'>http://patft.uspto.gov/netacgi/nph-Parser?patentnumber=4,464,650</link>&gt;.</note>. This patent expired on June 20, 2003 <note>See &lt;<link url='http://compression-links.info/Link/1264_LZW_Patent_Expiration.htm'>http://compression-links.info/Link/1264_LZW_Patent_Expiration.htm</link>&gt;</note> and <note>See &lt;<link url='http://compression-links.info/Link/1814_LZW_Patent_Expiration.htm'>http://compression-links.info/Link/1814_LZW_Patent_Expiration.htm</link>&gt;.</note>. Therefore implementations of LZW are no longer patent-encumbered.</p>
<p>The algorithm is specified by Ecma International in &ecma151; under the name "DCLZ".</p>
<section1 topic='Definition' anchor='definition'>
<p>If the receiving entity (server) supports the LZW algorithm, it MUST include a &lt;method/&gt; element whose XML character data is "lzw" in the compression stream feature, as follows.</p>
<example caption='Receiving Entity Offers Stream Compression Feature, Including LZW Method'><![CDATA[
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<compression xmlns='http://jabber.org/features/compress'>
<p>If the initiating entity wishes to use the LZW algorithm, then it MUST specify that method.</p>
<example caption='Initiating Entity Requests Stream Compression Using LZW'><![CDATA[
<compress xmlns='http://jabber.org/protocol/compress'>
<p>The initiating entity and receiving entity then MUST attempt to negotiate use of the LZW algorithm in accordance with <cite>XEP-0138</cite>.</p>
<p>If the use of the LZW algorithm is negotiated, the usage SHOULD follow the definition in <cite>ECMA-151</cite>.</p>
<section1 topic='Optionality' anchor='optionality'>
<p>The LZW algorithm is OPTIONAL to implement for <cite>XEP-0138</cite> implementations and this specification does not define a mandatory-to-implement technology.</p>
<section1 topic='Security Considerations' anchor='security'>
<p>The security considerations specified in <cite>XEP-0138</cite> apply to usage of the LZW algorithm.</p>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;. </p>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Compression Methods Registry' anchor='registrar-methods'>
<p>The &REGISTRAR; maintains a registry of compression methods at &COMPRESSMETHODS;.</p>
<p>The LZW algorithm is already registered. This specification updates the registry submission as follows:</p>
<desc>the LZW (DCLZ) compression method</desc>