RFC 6713
The 'application/zlib' and 'application/gzip' Media Types
RFC 6713: The 'application/zlib' and 'application/gzip' Media Types π
okay bestie, let's get into RFC 6713 π§. It's by John Levine (J. Levine) from Taughannock Networks, dated August 2012. It's Informational (published for info, not a Standards Track spec) and has ISSN 2070-1721. The title block doesn't list any RFC it obsoletes or updates, so it's standing on its own π«Ά.
Abstract
this one defines two media types, application/gzip and application/zlib, for compressed data made with the gzip and zlib compression formats β¨.
Status of This Memo
ngl, the status section is super official π . This document is not an Internet Standards Track spec. It's published for information only πΈ.
It's still an IETF product, though. It reflects IETF community consensus, got public review, and was approved for publication by the Internet Engineering Steering Group (IESG). Just because the IESG approved something doesn't mean it's a candidate for any level of Internet Standard. See Section 2 of RFC 5741 for that bit π.
Info on the current status, errata, and feedback for this document lives at http://www.rfc-editor.org/info/rfc6713 π₯.
Copyright Notice
Copyright (c) 2012 IETF Trust and the persons identified as the document authors. All rights reserved. π
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. π
1. Introduction β¨
okay so zlib [RFC1950] and gzip [RFC1952] are both super popular compression formats π. zlib is a stream format, and gzip adds header and trailer fields that make more sense for files π. They both use the DEFLATE compression scheme from [RFC1951] π§.
they're used on basically everything: plain text, structured data, executable code, you name it π.
Some apps have informally used a bunch of media types to label gzip data, like application/gzip-compressed, application/gzipped, application/x-gunzip, application/x-gzip, application/x-gzip-compressed, and gzip/document. π The media types in this document are meant to replace those in future apps π
.
2. The 'application/zlib' Media Type π¦
The application/zlib media type describes a block of data compressed with zlib [RFC1950] compression. The data is a stream of bytes, as described in RFC 1950 πΈ.
2.1. Registration Details π
Here's the registration template, exactly as written:
Type name: application
Subtype name: zlib
Required parameters: N/A
Optional parameters: N/A
Encoding considerations: Binary
Security considerations: See Section 4 below.
Interoperability considerations: N/A
Published specification: [RFC1950]
Applications that use this media type: anywhere data size is an issue
Additional information:
Magic number(s): first byte is usually 0x78 but can also be 0x08,
0x18, 0x28, 0x38, 0x48, 0x58, or 0x68. The first two bytes, when
interpreted as an unsigned 16-bit number in big-endian byte order,
contain a value that is a multiple of 31.
File extension(s): N/A
Macintosh file type code(s): N/A
Person and email address to contact for further information: see
http://www.zlib.net/
Intended usage: COMMON
Restrictions on usage: N/A
Author: John Levine
Change controller: IETF
3. The 'application/gzip' Media Type π
The application/gzip media type describes a block of data compressed with gzip [RFC1952] compression. The data is a stream of bytes, as described in RFC 1952 β¨.
3.1. Registration Details π
Here's the gzip registration template, exactly as written:
Type name: application
Subtype name: gzip
Required parameters: N/A
Optional parameters: N/A
Encoding considerations: Binary
Security considerations: See Section 4 below.
Interoperability considerations: N/A
Published specification: [RFC1952]
Applications that use this media type: anywhere data size is an issue
Additional information:
Magic number(s): first two bytes are 0x1f, 0x8b.
File extension(s): gz
Macintosh file type code(s): N/A
Person and email address to contact for further information: see
http://www.gzip.org/
Intended usage: COMMON
Restrictions on usage: N/A
Author: John Levine
Change controller: IETF
4. Security Considerations π₯
β οΈ bestie, read this part carefully π
zlib and gzip can compress any arbitrary binary data, including hostile executable code π. Also, data that claims to be zlib or gzip might not actually be, and fields that are supposed to be flags, lengths, or pointers could hold literally anything π. Apps should treat all data with due skepticism π§.
There's more in the security considerations of the underlying format docs too: Section 5 of [RFC1950], Section 6 of [RFC1951], and Section 4 of [RFC1952] π.
5. IANA Considerations π
IANA has updated the "Application Media Types" registry to include application/zlib as described in Section 2 and application/gzip as described in Section 3 π.
6. Normative References π
Here are the normative references, exactly as written:
[RFC1950] Deutsch, P. and J-L. Gailly, "ZLIB Compressed Data Format
Specification version 3.3", RFC 1950, May 1996.
[RFC1951] Deutsch, P., "DEFLATE Compressed Data Format Specification
version 1.3", RFC 1951, May 1996.
[RFC1952] Deutsch, P., "GZIP file format specification version 4.3",
RFC 1952, May 1996.
Author's Address π¦
Here's John's contact info, exactly as written:
John Levine
Taughannock Networks
PO Box 727
Trumansburg, NY 14886
Phone: +1 831 480 2300
EMail: standards@taugh.com
π¦ where this page comes from
- ietf: rfc6713 2012-08
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms