poka.sh

Docs

GZ

Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.

Compressed Preview.

At a glance

Original creator Jean-loup Gailly and Mark Adler
First published 1992
Purpose Single-file lossless compression: one file, compressed with DEFLATE, with its original name, timestamp and a CRC-32.
Extensions .gz
Poka parser poka-compressed
Viewer none: the parser draws its own preview
Depth tier Standalone parser (see Depth tiers)
Breadth tier B2 Broad (see Breadth tiers)

How much Poka reads

B2 Broad. The common content of the current and the common older versions is decoded. Some named features or versions are not, and are listed.

Confidence: high (the reviewer read the code and a test that proves the claim). Basis: Reviewed 2026-10-16: parsers/poka-compressed (main.rs, decode.rs, tar.rs; shared with bz2, xz, zst, lz4). Gzip is read with flate2 MultiGzDecoder, so every member of a concatenated file is decoded. The payload is shown as a tar listing (ustar, GNU long names, pax), text, a PNG, JPEG, GIF, WebP or BMP image, a PDF, or a card with the first bytes. The unit tests cover multi-member gzip, a tar inside, an image and long text. The corpus holds INITools-0.2.tar.gz, multiple.gz and testODTBodyListOpenClose.xml.gz; no test runs them. Covers RFC 1952 gzip, including .tgz and .tar.gz.

What Poka does not read

  • gzip header fields are not shown: original file name (FNAME), modification time, operating system, comment and extra fields
  • the inner name is guessed by stripping the extension, not read from the header
  • decoding stops at 128 MiB of payload and keeps 16 MiB, so the size is reported as at least
  • text previews are cut at 64 KiB
  • payloads that are ZIP, nested compressed or other archives are named but not opened
  • only the first 5000 tar entries are listed

Background

The Library of Congress says gzip was written to replace the Unix compress utility, whose LZW algorithm raised patent concerns, and that version 0.1 was released on 31 October 1992 and 1.0 in February 1993. A file has a 10-byte header, optional extra fields, the DEFLATE body and an 8-byte footer with the CRC-32 and the uncompressed length. Poka streams the payload through the decoder in bounded memory and shows what is inside: a tar as its listing, text as text, a common image as the picture, a PDF as the document, anything else as a card with its size and first bytes. If decoding stops part-way, it shows what came before and the reason.

Versions

Version Identifier Poka Note
GZIP file format 4.3 (RFC 1952) 1F 8B Read Decoded with flate2 in parsers/poka-compressed; concatenated members are covered by the module's unit tests.
  • Compressed tar archive (.tar.gz): The Library of Congress names tar as a common payload; Poka lists the archive inside.

Libraries

Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.

  • bzip2-rs (used; MIT OR Apache-2.0; Rust)
  • flate2 (used; MIT OR Apache-2.0; Rust)
  • lz4_flex (used; MIT; Rust)
  • lzma-rust2 (used; Apache-2.0; Rust)
  • ruzstd (used; MIT; Rust)
  • libdeflater (candidate; Apache-2.0; Rust; https://github.com/sstadick/libdeflater) — Thin Rust wrapper around C libdeflate with gzip examples; page loaded was a fork of libdeflater/libdeflater. Not pure Rust, so awkward for wasm32-wasip1.

Sources