Gzip codec (version 1.0)#

Editor’s draft 26 July 2019

Specification URI:

https://zarr-specs.readthedocs.io/en/latest/v3/codecs/gzip/v1.0.html

Corresponding ZEP:

ZEP 1 — Zarr specification version 3

Issue tracking:

GitHub issues

Suggest an edit for this spec:

GitHub editor

Copyright 2020 Zarr core development team. This work is licensed under a Creative Commons Attribution 3.0 Unported License.


Abstract#

This specification defines an implementation of the Zarr abstract store API using a file system.

Status of this document#

Warning

This document is a draft for review and subject to changes. It will become final when the Zarr Enhancement Proposal (ZEP) 1 is approved via the ZEP process.

Document conventions#

Conformance requirements are expressed with a combination of descriptive assertions and [RFC2119] terminology. The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this document are to be interpreted as described in [RFC2119]. However, for readability, these words do not appear in all uppercase letters in this specification.

All of the text of this specification is normative except sections explicitly marked as non-normative, examples, and notes. Examples in this specification are introduced with the words “for example”.

Configuration parameters#

level:

An integer from 0 to 9 which controls the speed and level of compression. A level of 1 is the fastest compression method and produces the least compressions, while 9 is slowest and produces the most compression. Compression is turned off completely when level is 0.

For example, the array metadata below specifies that the compressor is the Gzip codec configured with a compression level of 1:

{
    "codecs": [{
        "name": "gzip",
        "configuration": {
            "level": 1
        }
    }],
}

Format and algorithm#

Encoding and decoding is performed using the algorithm defined in [RFC1951].

Encoded data should conform to the Gzip file format [RFC1952].

References#

RFC2119(1,2)

S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. March 1997. Best Current Practice. URL: https://tools.ietf.org/html/rfc2119

RFC1951

P. Deutsch. DEFLATE Compressed Data Format Specification version 1.3. Requirement Levels. May 1996. Informational. URL: https://tools.ietf.org/html/rfc1951

RFC1952

P. Deutsch. GZIP file format specification version 4.3. Requirement Levels. May 1996. Informational. URL: https://tools.ietf.org/html/rfc1952

Change log#

No changes yet.