Brotli Compressed Data Format
draft-alakuijala-brotli-00

The information below is for an old version of the document
Document Type Active Internet-Draft (individual)
Last updated 2014-04-10 (latest revision 2014-04-01)
Stream ISE
Intended RFC status Informational
Formats plain text pdf html bibtex
Stream ISE state (None)
Consensus Boilerplate Unknown
Document shepherd None
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                      J. Alakuijala
Internet-Draft                                               Z. Szabadka
Expires: October 1, 2014                                     Google, Inc
                                                              April 2014

                     Brotli Compressed Data Format
                       draft-alakuijala-brotli-00

Abstract

   This specification defines a lossless compressed data format that
   compresses data using a combination of the LZ77 algorithm and Huffman
   coding, with efficiency comparable to the best currently available
   general-purpose compression methods.

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 October 1, 2014.

Copyright Notice

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

Alakuijala & Szabadka    Expires October 1, 2014                [Page 1]
Internet-Draft                   Brotli                       April 2014

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . 3
      1.1.  Purpose  . . . . . . . . . . . . . . . . . . . . . . . . . 3
      1.2.  Intended audience  . . . . . . . . . . . . . . . . . . . . 3
      1.3.  Scope  . . . . . . . . . . . . . . . . . . . . . . . . . . 3
      1.4.  Compliance . . . . . . . . . . . . . . . . . . . . . . . . 3
      1.5.  Definitions of terms and conventions used  . . . . . . . . 4
         1.5.1.  Packing into bytes  . . . . . . . . . . . . . . . . . 4
   2.  Compressed representation overview  . . . . . . . . . . . . . . 5
   3.  Compressed representation of Huffman codes  . . . . . . . . . . 7
      3.1.  Introduction to prefix and Huffman coding  . . . . . . . . 7
      3.2.  Use of Huffman coding in the "brotli" format . . . . . . . 8
      3.3.  Alphabet sizes  . . . . . . . . . . . . . . . . . . . . . 10
      3.4.  Simple Huffman codes  . . . . . . . . . . . . . . . . . . 10
      3.5.  Complex Huffman codes . . . . . . . . . . . . . . . . . . 11
   4.  Encoding of distances  . . . . . . . . . . . . . . . . . . . . 13
   5.  Encoding of literal insertion lengths and copy lengths . . . . 14
   6.  Encoding of block switch commands  . . . . . . . . . . . . . . 17
   7.  Context modeling . . . . . . . . . . . . . . . . . . . . . . . 18
      7.1.  Context modes and context ID lookup for literals  . . . . 18
      7.2.  Context ID for distances  . . . . . . . . . . . . . . . . 20
      7.3.  Encoding of the context map . . . . . . . . . . . . . . . 20
   8.  Static dictionary  . . . . . . . . . . . . . . . . . . . . . . 21
   9.  Compressed data format . . . . . . . . . . . . . . . . . . . . 23
      9.1.  Format of the stream header . . . . . . . . . . . . . . . 23
      9.2.  Format of the meta-block header . . . . . . . . . . . . . 24
      9.3.  Format of the meta-block data . . . . . . . . . . . . . . 26
   10.  Decoding algorithm  . . . . . . . . . . . . . . . . . . . . . 27
   11.  Security Considerations . . . . . . . . . . . . . . . . . . . 29
   12.  IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29
   13.  Informative References  . . . . . . . . . . . . . . . . . . . 29
   14.  Source code . . . . . . . . . . . . . . . . . . . . . . . . . 29
   Appendix A.  Static dictionary data  . . . . . . . . . . . . . . . 29
   Appendix B.  List of word transformations . . . . . . . . . . . . 109
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . . 112

Alakuijala & Szabadka    Expires October 1, 2014                [Page 2]
Internet-Draft                   Brotli                       April 2014

1. Introduction

1.1. Purpose

   The purpose of this specification is to define a lossless compressed
Show full document text