A zero-dependency JavaScript library to read and write tar files.
- reading and writing
- UTF-8 support for filenames and contents
- no dependency, with support for Node.js, browsers, Deno
- File name (including path) has to be less than 100 characters
- Maximum total file size seems to be limited to somewhere between 500MB to 1GB (exact limit is unknown)
// ESM
import { TarReader, TarWriter } from '@gera2ld/tarjs';
// IIFE
const { TarReader, TarWriter } = window.tarjs;
const reader = await TarReader.load(tarFile);
console.log('Loaded items:', reader.fileInfos);
Check jsdoc for API reference.