Skip to content

Bit-Crust/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

About

A tar ball library for the browser which uses streams.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 86.0%
  • JavaScript 13.6%
  • Shell 0.4%