Skip to content

Floorp-Projects/tarjs

 
 

Repository files navigation

@gera2ld/tarjs

A zero-dependency JavaScript library to read and write tar files.

Features

  • reading and writing
  • UTF-8 support for filenames and contents
  • no dependency, with support for Node.js, browsers, Deno

Limitations

  • 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)

Usage

// 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.

Credits

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages

  • TypeScript 87.4%
  • JavaScript 12.2%
  • Shell 0.4%