Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/archive/mod.ts

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
import * as mod from "https://deno.land/std@0.201.0/archive/mod.ts";

Tar is a utility for collecting multiple files (or any arbitrary data) into one archive file, while untar is the inverse utility to extract the files from an archive. Files are not compressed, only collected into the archive.

File format and limitations

The ustar file format is used for creating the archive file. While this format is compatible with most tar readers, the format has several limitations, including:

  • Files must be smaller than 8GiB
  • Filenames (including path) must be shorter than 256 characters
  • Filenames (including path) cannot contain non-ASCII characters
  • Sparse files are not supported In addition to the ustar format, untar may also read from the pax format. However, additional features, such as longer filenames, may be ignored.

Classes

Overview

A class to create a tar archive. Tar archives allow for storing multiple files in a single file (called an archive, or sometimes a tarball). These archives typically have the '.tar' extension.

Overview

A class to extract from a tar archive. Tar archives allow for storing multiple files in a single file (called an archive, or sometimes a tarball). These archives typically have the '.tar' extension.