home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_i / draft-ietf-ippcp-lzs-00.txt < prev    next >
Text File  |  1997-08-01  |  17KB  |  444 lines

  1.  
  2. Internet Draft                                              R. Monsour
  3. Expires in six months                                      Hi/fn, Inc.
  4.                                                          July 29, 1997
  5.  
  6.  
  7.  
  8.                     IP Payload Compression Using LZS
  9.                       <draft-ietf-ippcp-lzs-00.txt>
  10.  
  11.  
  12.  
  13. Status of this Memo
  14.  
  15.    This document is an Internet-Draft.  Internet Drafts are working
  16.    documents of the Internet Engineering Task Force (IETF), its areas,
  17.    and its working Groups. Note that other groups may also distribute
  18.    working documents as Internet Drafts.
  19.  
  20.    Internet-Drafts draft documents are valid for a maximum of six months
  21.    and may be updated, replaced, or obsolete by other documents at any
  22.    time. It is inappropriate to use Internet-Drafts as reference material
  23.    or to cite them other than as "work in progress."
  24.  
  25.    To learn the current status of any Internet-Draft, please check the
  26.    "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
  27.    Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
  28.    munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
  29.    ftp.isi.edu (US West Coast).
  30.  
  31.    Distribution of this memo is unlimited.
  32.  
  33.    It is intended that a future version of this draft be submitted to the
  34.    IESG for publication as an Informational RFC.
  35.  
  36. Abstract
  37.  
  38.    This document describes a IP compression method based on the LZS
  39.    compression algorithm. This document defines the application of the
  40.    LZS algorithm to the IP Payload Compression Protocol [Thomas].
  41.    [Thomas] defines a method for applying lossless compression to the
  42.    payloads of Internet Protocol datagrams.
  43.  
  44. Acknowledgments
  45.  
  46.    The LZS details presented here are similar to those in PPP LZS-DCP
  47.    Compression Protocol (LZS-DCP)" [RFC-1967].
  48.  
  49.    The author wishes to thank the participants of the IPPCP working group
  50.    mailing list whose discussion is currently active and is working to
  51.    generate the protocol specification for integrating compression with
  52.    IP.
  53.  
  54. Table of Contents
  55.  
  56. R. Monsour                                                       [Page 1]
  57.  
  58.  
  59. Internet Draft       draft-ietf-ippcp-lzs-00.txt            July 29, 1997
  60.  
  61.  
  62.  
  63.    1. Introduction...................................................2
  64.       1.1 General....................................................2
  65.       1.2 Background of LZS Compression..............................2
  66.       1.3 Licensing..................................................3
  67.       1.4 Specification of Requirements..............................3
  68.    2. Compression Process............................................3
  69.       2.1 Compression History........................................3
  70.       2.2 Anti-expansion of Payload Data.............................3
  71.       2.3 Format of Compressed Datagram Payload......................4
  72.       2.4 Compression Encoding Format................................5
  73.       2.5 Padding....................................................6
  74.    3. Decompression Process..........................................6
  75.    4. Security Considerations........................................6
  76.    5. References.....................................................6
  77.    6. Authors Addresses..............................................8
  78.    7. Appendix: Compression Efficiency versus Datagram Size..........8
  79.  
  80.  
  81.  
  82. 1. Introduction
  83.  
  84.  
  85. 1.1 General
  86.  
  87.    This document is a submission to the IETF IP Payload Compression
  88.    Protocol (IPPCP) Working Group. Comments are solicited and should be
  89.    addressed to the working group mailing list (ippcp@external.cisco.com)
  90.    or to the editor.
  91.  
  92.    This document specifies the application of LZS compression, a lossless
  93.    compression algorithm, to IP datagram payloads. It is to be used in
  94.    conjunction with the IP Payload Compression Protocol which, at this
  95.    writing, is under development by the IP Payload Compression Protocol
  96.    working group.
  97.  
  98. 1.2 Background of LZS Compression
  99.  
  100.    Starting with a sliding window compression history, similar to LZ1
  101.    [LZ1], Hi/fn developed a new, enhanced compression algorithm
  102.    identified as LZS. The LZS algorithm is optimized to compress all file
  103.    types as efficiently as possible.  Even string matches as short as two
  104.    octets are effectively compressed.
  105.  
  106.    The LZS algorithm uses a sliding window of 2,048 bytes.  During
  107.    compression, redundant sequences of data are replaced with tokens that
  108.    represent those sequences. During decompression, the original
  109.  
  110.  
  111. R. Monsour                                                      [Page 2]
  112.  
  113.  
  114. Internet Draft       draft-ietf-ippcp-lzs-00.txt            July 29, 1997
  115.  
  116.  
  117.    sequences are substituted for the tokens in such a way that the
  118.    original data is exactly recovered. LZS differs from lossy compression
  119.    algorithms, such as those often used for video compression, that do
  120.    not exactly reproduce the original data.
  121.  
  122.    The details of LZS compression can be found in [ANSI94].
  123.  
  124.    The efficiency of the LZS algorithm depends on the degree of
  125.    redundancy in the original data.  A typical compression ratio is 2:1.
  126.    LZS achieves a compression ratio of 2.34:1 on the University of
  127.    Calgary Text Compression Corpus [Calgary].
  128.  
  129. 1.3 Licensing
  130.  
  131.    Hi/fn, Inc. holds patents on the LZS algorithm. Licenses for a
  132.    reference implementation are available for use in IPPCP, IPSec, TLS
  133.    and PPP applications at no cost.  Source and object licenses are
  134.    available on a non-discriminatory basis. Hardware implementations are
  135.    also available.  For more information, contact Hi/fn at the address
  136.    listed with the author's address.
  137.  
  138. 1.4 Specification of Requirements
  139.  
  140.    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  141.    "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  142.    document are to be interpreted as described in RFC2119 [RFC-2119].
  143.  
  144. 2. Compression Process
  145.  
  146.  
  147. 2.1 Compression History
  148.  
  149.    The sender MUST reset the compression history prior to processing each
  150.    datagram's payload. This ensures that each datagram's payload can be
  151.    decompressed independently of any other, as is needed when datagrams
  152.    are received out of order.
  153.  
  154.    The sender MUST flush the compressor each time it transmits a
  155.    compressed datagram.  Flushing means that all data going into the
  156.    compressor is included in the output, i.e., no data is held back in
  157.    the hope of achieving better compression.  Flushing is necessary to
  158.    prevent a datagram's data from spilling over into a later datagram.
  159.  
  160. 2.2 Anti-expansion of Payload Data
  161.  
  162.    The maximum expansion  produced by the LZS algorithm is 12.5%.
  163.  
  164.  
  165.  
  166. R. Monsour                                                      [Page 3]
  167.  
  168.  
  169. Internet Draft       draft-ietf-ippcp-lzs-00.txt            July 29, 1997
  170.  
  171.  
  172.    If the size of a compressed IP datagram, including whatever overhead
  173.    is included to define the compression protocol, is not smaller than
  174.    the size of the original IP datagram, the IP datagram MUST be sent in
  175.    the original non-compressed form.  This policy ensures saving the
  176.    decompression processing cycles and avoiding incurring IP datagram
  177.    fragmentation when the expanded datagram is larger than the MTU.
  178.  
  179.    Small IP datagrams are more likely to expand as a result of
  180.    compression. Therefore, a numeric threshold SHOULD be applied before
  181.    compression, where IP datagrams of size smaller than the threshold are
  182.    sent in the original form without attempting compression.  The numeric
  183.    threshold is implementation dependent.
  184.  
  185.    An IP datagram with payload, which has been previously compressed,
  186.    tends not to compress any further.  Such previously compressed payload
  187.    may be the result of external processes, such as compression applied
  188.    by an upper layer in the communication stack, or by an off-line
  189.    compression utility.  An adaptive algorithm SHOULD be implemented in
  190.    order to avoid the performance penalty of futile compression attempts.
  191.    Such as adaptive algorithm is implementation dependent and independent
  192.    of compression method.
  193.  
  194. 2.3 Format of Compressed Datagram Payload
  195.  
  196.    The following is an example datagram that results when using LZS as
  197.    the compression algorithm for the IP Payload Control Protocol. Note
  198.    that the IP header has been omitted for clarity.
  199.  
  200.     0                   1                   2                   3
  201.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  202.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  203.    |              Compression Parameters Index (CPI)               |
  204.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  205.    |C|                        Reserved                             |
  206.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  207.    |                                                               |
  208.    ~                    Payload Data (variable)                    ~
  209.    |                                                               |
  210.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  211.  
  212.    Compression Parameters Index (CPI)
  213.  
  214.      The Compression Parameters Index (CPI) is a 32-bit pseudo-random
  215.      value identifying the association for this datagram. The details of
  216.      its use can be found in [Thomas].
  217.  
  218.    C
  219.  
  220.  
  221. R. Monsour                                                      [Page 4]
  222.  
  223.  
  224. Internet Draft       draft-ietf-ippcp-lzs-00.txt            July 29, 1997
  225.  
  226.  
  227.  
  228.      This one-bit field, when one, indicates that the datagram payload is
  229.      compressed; a value of zero indicates that the datagram payload is
  230.      not compressed.
  231.  
  232.    Reserved
  233.  
  234.      This 31-bit field is reserved for future use and MUST be zeroed by
  235.      the sender. It SHOULD be ignored by the receiver.
  236.  
  237.    Payload Data
  238.  
  239.      This variable-length field contains the optionally compressed
  240.      datagram payload.
  241.  
  242. 2.4 Compression Encoding Format
  243.  
  244.    The input to the payload compression algorithm is an IP datagram
  245.    payload. The output of the algorithm is a new (and hopefully smaller)
  246.    payload. The output payload contains the input payload's data in
  247.    either compressed or uncompressed format. The input and output
  248.    payloads are each an integral number of bytes in length.
  249.  
  250.    If the uncompressed form is used, the output payload is identical to
  251.    the input payload. If the compressed form is used, the output payload
  252.    as defined in section 3.2 of [ANSI94], and is repeated here for
  253.    informational purposes ONLY.
  254.  
  255.    <Compressed Stream> := [<Compressed String>] <End Marker>
  256.    <Compressed String> := 0 <Raw Byte> | 1 <Compressed Bytes>
  257.    <Raw Byte> := <b><b><b><b><b><b><b><b>          (8-bit byte)
  258.    <Compressed Bytes> := <Offset> <Length>
  259.  
  260.    <Offset> := 1 <b><b><b><b><b><b><b> |           (7-bit offset)
  261.                0 <b><b><b><b><b><b><b><b><b><b><b> (11-bit offset)
  262.    <End Marker> := 110000000
  263.  
  264.    <b> := 1 | 0
  265.  
  266.    <Length> :=
  267.    00        = 2     1111 0110      = 14
  268.    01        = 3     1111 0111      = 15
  269.    10        = 4     1111 1000      = 16
  270.    1100      = 5     1111 1001      = 17
  271.    1101      = 6     1111 1010      = 18
  272.    1110      = 7     1111 1011      = 19
  273.    1111 0000 = 8     1111 1100      = 20
  274.  
  275.  
  276. R. Monsour                                                      [Page 5]
  277.  
  278.  
  279. Internet Draft       draft-ietf-ippcp-lzs-00.txt            July 29, 1997
  280.  
  281.  
  282.    1111 0001 = 9     1111 1101      = 21
  283.    1111 0010 = 10    1111 1110      = 22
  284.    1111 0011 = 11    1111 1111 0000 = 23
  285.    1111 0100 = 12    1111 1111 0001 = 24
  286.    1111 0101 = 13     ...
  287.  
  288. 2.5 Padding
  289.  
  290.    A datagram payload compressed using LZS always ends with the last
  291.    compressed data byte (also known as the <end marker>), which is used
  292.    to disambiguate padding.  This allows trailing bits as well as bytes
  293.    to be considered padding.
  294.  
  295. 3. Decompression Process
  296.  
  297.    If the C bit of the received datagram is a one (i.e., indicating the
  298.    datagram is compressed), the receiver MUST reset the compression
  299.    history prior to processing the datagram. This ensures that each
  300.    datagram can be decompressed independently of any other, as is needed
  301.    when datagrams are received out of order. Following the reset of the
  302.    compression history, the receiver decompresses the Payload Data field
  303.    according to the encoding specified in section 3.2 of [ANSI94].
  304.  
  305.    If the C bit of the received datagram is zero, the receiver needs to
  306.    perform no decompression processing and the Payload Data field of the
  307.    datagram is ready for processing by the next protocol layer.
  308.  
  309. 4. Security Considerations
  310.  
  311.    This memo discusses the use of lossless compression technology in the
  312.    Internet Protocol. This can include use of IP Security. The proposed
  313.    use of compression within this protocol is not believed to have an
  314.    effect on the underlying security functionality provide by the
  315.    protocol; i.e., the use of compression is not known to degrade or
  316.    alter the nature of the underlying security architecture or the
  317.    encryption technologies used to implement it.
  318.  
  319.    The use of compression does change the length of ESP payloads, in a
  320.    manner that depends on the data prior to encryption.  Thus, the use of
  321.    compression may have an effect on the ability of an eavesdropper to
  322.    glean information by analyzing the length of transmitted packets.
  323.  
  324. 5. References
  325.  
  326.    [AH]  Kent, S. and Atkinson, R., "IP Authentication Header", draft-
  327.    ietf-ipsec-auth-header-01.txt, Work in Progress, July 1997.
  328.  
  329.  
  330.  
  331. R. Monsour                                                      [Page 6]
  332.  
  333.  
  334. Internet Draft       draft-ietf-ippcp-lzs-00.txt            July 29, 1997
  335.  
  336.  
  337.    [ANSI94] American National Standards Institute, Inc., "Data
  338.    Compression Method for Information Systems," ANSI X3.241-1994, August
  339.    1994.
  340.  
  341.    [Calgary]  Text Compression Corpus, University of Calgary, available
  342.    at ftp://ftp.cpsc.ucalgary.ca/pub/projects/text.compression.corpus.
  343.  
  344.    [DOI] Piper, D., "The Internet IP Security Domain of Interpretation
  345.    for ISAKMP", draft-ietf-ipsec-ipsec-doi-02.txt, Work in Progress,
  346.    February 1997.
  347.  
  348.    [ESP] Kent, S. and Atkinson, R., "IP Encapsulating Security Payload",
  349.    draft-ietf-ipsec-esp-v2-00.txt, Work in Progress, July 1997.
  350.  
  351.    [ISAKMP] Maughan, D., Schertler, M., Schneider, M., and Turner, J.,
  352.    "Internet Security Association and Key Management Protocol (ISAKMP)",
  353.    draft-ietf-ipsec-isakmp-08.txt, Work in Progress, July 1997.
  354.  
  355.    [LZ1] Lempel, A. and Ziv, J., "A Universal Algorithm for Sequential
  356.    Data Compression", IEEE Transactions On Information Theory, Vol. IT-
  357.    23, No. 3, May 1977.
  358.  
  359.    [RFC-1700] Reynolds, J., Postel, J., "Assigned Numbers", RFC 1700,
  360.    October 1994.
  361.  
  362.    [RFC-1883] Deering, S., Hinden, R., "Internet Protocol, Version 6
  363.    (IPv6) Specification", RFC 1883, April 1996.
  364.  
  365.    [RFC-1962] Rand, D., "The PPP Compression Control Protocol (CCP)",
  366.    RFC-1962, June 1996.
  367.  
  368.    [RFC-1967] K. Schneider, R. Friend, "PPP LZS-DCP Compression Protocol
  369.    (LZS-DCP)", RFC-1967, August, 1996.
  370.  
  371.    [RFC-2003] Perkins, C., "IP Encapsulation within IP", RFC 2003,
  372.    October 1996.
  373.  
  374.    [RFC-2119] Bradner, S., "Key words for use in RFCs to Indicate
  375.    Requirement Levels", RFC 2119, March 1997.
  376.  
  377.    [Shacham] Shacham, A., "IP Payload Compression Protocol (IPComp)",
  378.    draft-ietf-ippcp-protocol-00.txt, Work in Progress, July 1997.
  379.  
  380.    [Thayer] Thayer, R., "Compression Payload for Use with IP Security",
  381.    draft-thayer-seccomp-01.txt, Work in Progress, March, 1997.
  382.  
  383.    [Thomas] Thomas, M., "The Compressed Payload Header", draft-thomas-
  384.  
  385.  
  386. R. Monsour                                                      [Page 7]
  387.  
  388.  
  389. Internet Draft       draft-ietf-ippcp-lzs-00.txt            July 29, 1997
  390.  
  391.  
  392.    ippcp-compression-00.txt, Work in Progress, July 1997.
  393.  
  394. 6. Authors Addresses
  395.  
  396.    Robert Monsour
  397.    Hi/fn Inc.
  398.    5973 Avenida Encinas
  399.    Suite 110
  400.    Carlsbad, CA  92008
  401.    Email: rmonsour@hifn.com
  402.  
  403. 7. Appendix: Compression Efficiency versus Datagram Size
  404.  
  405.    The following table offers some guidance on the compression efficiency
  406.    that can be achieved as a function of datagram size.  Each entry in
  407.    the table shows the compression ratio that was achieved when LZS was
  408.    applied to a test file using datagrams of a specified size.
  409.  
  410.    The test file was the University of Calgary Text Compression Corpus
  411.    [Calgary].  The length of the file prior to compression was 3,278,000
  412.    bytes.  When the entire file was compressed as a single payload, a
  413.    compression ratio of 2.34 resulted.
  414.  
  415.     Datagram size,|
  416.     bytes         |  64   128   256   512  1024  2048  4096  8192 16384
  417.     --------------|----------------------------------------------------
  418.     Compression   |1.18  1.28  1.43  1.58  1.74  1.91  2.04  2.11  2.14
  419.     ratio         |
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441. R. Monsour                                                      [Page 8]
  442.  
  443.  
  444.