<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>
<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 <<linkurl='http://patft.uspto.gov/netacgi/nph-Parser?patentnumber=4,464,650'>http://patft.uspto.gov/netacgi/nph-Parser?patentnumber=4,464,650</link>>.</note>. This patent expired on June 20, 2003 <note>See <<linkurl='http://compression-links.info/Link/1264_LZW_Patent_Expiration.htm'>http://compression-links.info/Link/1264_LZW_Patent_Expiration.htm</link>></note> and <note>See <<linkurl='http://compression-links.info/Link/1814_LZW_Patent_Expiration.htm'>http://compression-links.info/Link/1814_LZW_Patent_Expiration.htm</link>>.</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>
<section1topic='Definition'anchor='definition'>
<p>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.</p>
<examplecaption='Receiving Entity Offers Stream Compression Feature, Including LZW Method'><![CDATA[
<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>
<section1topic='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>