Skip to content

nonzzz/tar

Repository files navigation

TarMini

It's an implementation based on the ustar format. This package only provides low-level API's.

Usage

// packing
import { createPack, createExtract } from 'tar-mini'

const pack = createPack()

pack.add(new Uint8Array(512), {
  // options
})

pack.done()

// extracting

const extract = createExtract()

extract.on('entry', (head, file) => {
  // todo
})

pack.receiver.pipe(extract.receiver)

Sponsors

Related

Others

Why another ustar format lib? Alough tar-stream is useful, we won't need so many dependencies for higher version of NodeJs. And this library is lightweight and can handle simple scenes.

Scenes

LICENSE

MIT

Author

Kanno