Zstandard Compression and the application/zstd Media Type
draft-kucherawy-rfc8478bis-01

Document Type Active Internet-Draft (individual in art area)
Last updated 2019-11-17
Stream IETF
Intended RFC status Informational
Formats plain text xml pdf htmlized bibtex
Stream WG state (None)
Document shepherd Subodh Iyengar
IESG IESG state AD Evaluation::Point Raised - writeup needed
Consensus Boilerplate Yes
Telechat date
Responsible AD Barry Leiba
Send notices to Subodh Iyengar <subodh@fb.com>
Network Working Group                                          Y. Collet
Internet-Draft                                         M. Kucherawy, Ed.
Intended status: Informational                                  Facebook
Expires: May 19, 2020                                  November 16, 2019

       Zstandard Compression and the application/zstd Media Type
                     draft-kucherawy-rfc8478bis-01

Abstract

   Zstandard, or "zstd" (pronounced "zee standard"), is a data
   compression mechanism.  This document describes the mechanism and
   registers a media type and content encoding to be used when
   transporting zstd-compressed content via Multipurpose Internet Mail
   Extensions (MIME).

   Despite use of the word "standard" as part of its name, readers are
   advised that this document is not an Internet Standards Track
   specification; it is being published for informational purposes only.

Status of this Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on May 19, 2020.

Copyright Notice

   Copyright (c) 2019 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

Collet & Kucherawy        Expires May 19, 2020                  [Page 1]
Internet-Draft              application/zstd               November 2019

   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.

Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
   2.  Definitions  . . . . . . . . . . . . . . . . . . . . . . . . .  3
   3.  Compression Algorithm  . . . . . . . . . . . . . . . . . . . .  4
     3.1.  Frames . . . . . . . . . . . . . . . . . . . . . . . . . .  5
       3.1.1.  Zstandard Frames . . . . . . . . . . . . . . . . . . .  5
         3.1.1.1.  Frame Header . . . . . . . . . . . . . . . . . . .  6
         3.1.1.2.  Blocks . . . . . . . . . . . . . . . . . . . . . . 10
         3.1.1.3.  Compressed Blocks  . . . . . . . . . . . . . . . . 12
         3.1.1.4.  Sequence Execution . . . . . . . . . . . . . . . . 26
         3.1.1.5.  Repeat Offsets . . . . . . . . . . . . . . . . . . 27
       3.1.2.  Skippable Frames . . . . . . . . . . . . . . . . . . . 27
   4.  Entropy Encoding . . . . . . . . . . . . . . . . . . . . . . . 28
     4.1.  FSE  . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
       4.1.1.  FSE Table Description  . . . . . . . . . . . . . . . . 29
     4.2.  Huffman Coding . . . . . . . . . . . . . . . . . . . . . . 32
       4.2.1.  Huffman Tree Description . . . . . . . . . . . . . . . 32
         4.2.1.1.  Huffman Tree Header  . . . . . . . . . . . . . . . 34
         4.2.1.2.  FSE Compression of Huffman Weights . . . . . . . . 35
         4.2.1.3.  Conversion from Weights to Huffman Prefix Codes  . 35
       4.2.2.  Huffman-Coded Streams  . . . . . . . . . . . . . . . . 36
   5.  Dictionary Format  . . . . . . . . . . . . . . . . . . . . . . 37
   6.  Use of Dictionaries  . . . . . . . . . . . . . . . . . . . . . 39
   7.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 39
     7.1.  The 'application/zstd' Media Type  . . . . . . . . . . . . 39
     7.2.  Content Encoding . . . . . . . . . . . . . . . . . . . . . 40
     7.3.  Structured Syntax Suffix . . . . . . . . . . . . . . . . . 40
     7.4.  Dictionaries . . . . . . . . . . . . . . . . . . . . . . . 41
   8.  Security Considerations  . . . . . . . . . . . . . . . . . . . 41
   9.  Implementation Status  . . . . . . . . . . . . . . . . . . . . 42
   10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 43
     10.1. Normative References . . . . . . . . . . . . . . . . . . . 43
     10.2. Informative References . . . . . . . . . . . . . . . . . . 43
   Appendix A.  Decoding Tables for Predefined Codes  . . . . . . . . 43
     A.1.  Literal Length Code Table  . . . . . . . . . . . . . . . . 43
     A.2.  Match Length Code Table  . . . . . . . . . . . . . . . . . 46
Show full document text