RFC 2394
IP Payload Compression Using DEFLATE
RFC 2394: IP Payload Compression Using DEFLATE π
okay bestie, this one is the title block π It's from R. Pereira at TimeStep Corporation, filed as Informational in December 1998. Notice it doesn't list any "obsoletes" or "updates" entries, so it's a standalone doc π¦ It's a Network Working Group RFC, which is how the IETF publishes stuff.
Status of this Memo π
ok so this memo is just here to inform the Internet community π§ It's not a standard of any kind, and you can share it as much as you want with zero restrictions.
Copyright Notice βοΈ
Copyright (C) The Internet Society (1998). All Rights Reserved.
Abstract β¨
this doc explains a compression method built on the DEFLATE algorithm π It shows how to apply DEFLATE to the IP Payload Compression Protocol. literally that's the whole vibe π
Table of Contents πΈ
1. Introduction...................................................2
1.1 The DEFLATE Compression Algorithm...........................2
1.2 Licensing...................................................2
1.3 Specification of Requirements...............................3
2. DEFLATE Algorithm Implementation...............................3
2.1 Compression.................................................3
2.2 Decompression...............................................4
3. Thresholds.....................................................4
4. IPSec Transform Identifier.....................................4
5. Security Considerations........................................4
6. References.....................................................5
7. Acknowledgments................................................5
8. Editor's Address...............................................5
9. Full Copyright Statement.......................................6
1. Introduction π¦
so the IP Payload Compression Protocol lets you squish IP datagrams by supporting different compression algorithms π This doc is all about plugging the DEFLATE algorithm [Deutsch96] into IPCOMP [IPCOMP] π«Ά
This document SHOULD be read in conjunction with [IPCOMP] and MUST be taken in its context. β οΈ bestie, read the IPCOMP doc first, no skipping!!
1.1 The DEFLATE Compression Algorithm π
the 'deflate' compression format [Deutsch96] is giving main character energy π It's what PKZIP and gzip use, and it lives inside the free, widely shared zlib [Gailly95] library source code. Here's the tea:
- it's an apparently unencumbered encoding and compression algorithm, with an open, publicly available spec π
- it has a low-overhead escape mechanism for incompressible data, and the PPP Deflate spec has options to shave that overhead down even more π
- it's been heavily used for years in networks, over modems and other point-to-point links, to move files for personal computers and workstations πΎ
- it easily gets 2:1 compression on the Calgary corpus [Corpus90] while using less than 64KBytes of memory on both sender and receive π₯
1.2 Licensing π
zlib is free and widely available, but it comes with its own copyright notice, so here's the legal stuff verbatim (no cap, don't mess with it π):
(C) 1995 Jean-Loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you
must not claim that you wrote the original software. If you use
this software in a product, an acknowledgment in the product
documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
Jean-Loup Gailly Mark Adler
gzip@prep.ai.mit.edu madler@alumni.caltech.edu
If you use the zlib library in a product, we would appreciate
*not* receiving lengthy legal documents to sign. The sources are
provided for free but without warranty of any kind. The library
has been entirely written by Jean-Loup Gailly and Mark Adler; it
does not include third-party code.
the deflate format and algorithm are based on Lempel-Ziv LZ77 compression π§ The GNU Project and the Portable Network Graphics working group did a ton of research on it, and that's how we know it's patent free π
1.3 Specification of Requirements π
the keywords "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT", and "MAY" in this doc get read the way [Bradner97] describes π«Ά Those are the official BCP 14 vibes, so pay attention to them!!
2. DEFLATE Algorithm Implementation π οΈ
Phil Katz designed the DEFLATE algorithm, and all its details are public in [Deutsch96] πΈ So it's a really good, freely available algorithm to implement inside IPCOMP π₯
for the compression and decompression details, you should follow [Deutsch96], or just use a software library if that's easier π§ And here's the big one: since IPComp is a stateless protocol, history MUST be cleared between packets, whether you're compressing or decompressing. π¨ no carrying context across packets, periodt!
2.1 Compression π¨
as [IPCOMP] defines, the compression process is run by the IP Compression Association (IPCA). The IPCA MUST define the DEFLATE algorithm for this doc's process to happen π
so the compression process squishes the data from the IP datagram and drops the result right after the IPComp header. For example, with a TCP datagram:
Before: IP TCP ...
After: IP IPCOMP (TCP ...)
notice how everything after the IPCOMP header gets compressed π
DEFLATE has a bunch of compression levels, from best-compression-but-slow to fast-but-meh π’β‘ Which level you pick is up to the implementation, since it's always compatible with the decompression side π
2.2 Decompression π
same energy as compression: the IPCA sets the parameters and algorithm used for decompression π«Ά
as [IPCOMP] says, the data after the IPComp header gets decompressed and replaces the IPComp header inside the IP header π¦ And decompression with DEFLATE follows the process in [Deutsch96] β¨
3. Thresholds π
as [IPCOMP] points out, compressing tiny buffers usually doesn't work as well as on fast links, since the compression takes longer than just sending the data π Informal tests show the average buffer size where you start getting real gains is around 90 bytes. So implementations SHOULD NOT attempt to compress buffers smaller than 90 bytes. π ββοΈ
Other than a packet size limit, this doc doesn't outline any compressibility test. The one from [IPCOMP] is the one to check out π
4. IPSec Transform Identifier π
[IPDOI] says the ISAKMP IPCOMP transform ID for DEFLATE is IPCOMP_DEFLATE π No other ISAKMP parameters are required for IPCOMP DEFLATE. so simple, iconic π
5. Security Considerations π¨
this doc doesn't add any new security considerations on top of the ones [IPCOMP] and [Deutsch96] already covered π Those are serious, so go read them and take them seriously π«Ά
6. References π
[IPCOMP] Shacham, A., Monsour, R., Pereira, R., and M. Thomas, "IP
Payload Compression Protocol (IPComp)", RFC 2393,
December 1998.
[Deutsch96] Deutsch, P., "DEFLATE Compressed Data Format
Specification version 1.3", RFC 1951, May 1996.
[IPDOI] Piper, D., "The Internet IP Security Domain of
Interpretation for ISAKMP", RFC 2407, November 1998.
[Corpus90] Bell, T.C., Cleary, G. G. and Witten, I.H., "Text
Compression", Prentice_Hall, Englewood Cliffs NJ, 1990.
The compression corpus itself can be found in
ftp://ftp.uu.net/pub/archiving/zip/
[Gailly95] Gailly, J.-L., "Zlib 0.95 beta"
7. Acknowledgments π
the author wants to shout out everyone active in the IPPCP working group, especially Abraham Shacham and Naganand Doraswamy π«Άπ
8. Editor's Address π¬
Roy Pereira
TimeStep Corporation
Phone: +1 (613) 599-3610 x 4808
EMail: rpereira@timestep.com
the IP Payload Compression Protocol (IPPCP) working group can be reached by email at ippcp@cisco.com, or through its chair:
Naganand Dorswamy
Bay Networks
EMail: naganand@baynetworks.com
9. Full Copyright Statement βοΈ
the legal text stays word-for-word (super important, bestie π ):
Copyright (C) The Internet Society (1998). All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
that's the whole RFC, bestie!! ππβ¨
π¦ where this page comes from
- ietf: rfc2394 1998-12
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms