tar-extract
is a Node.js package for extracting .tar
and .tar.gz
files.
It provides a simple and easy-to-use API for decompressing these common archive file formats.
npm install tar-extract
Or use pnpm:
pnpm add tar-extract
import { extract } from "tar-extract";
extract("./00.tar.gz", "./").catch((err) =>
console.error("extract failed: ", err)
);
Extracts a .tar
or .tar.gz
file to the specified directory.
path
path of the archive filedest
path to extract to