UNPKG

@obsidize/tar-browserify

Version:

Browser-based tar utility for packing and unpacking tar files (stream-capable)

21 lines (20 loc) 917 B
import { AsyncUint8ArrayIteratorInput } from '../common/async-uint8-array-iterator'; import { ArchiveEntry } from './archive-entry'; import { ArchiveWriter } from './archive-writer'; /** * Main entry point for extracting and creating tarballs. * See TarIterator and ArchiveEntry for more granular options. */ export declare class Archive extends ArchiveWriter { constructor(entries?: ArchiveEntry[]); /** * Parses an Archive instance from the given buffer, with all entries read into memory. * The buffer should come from a complete, uncompressed tar file. */ static extract(input: AsyncUint8ArrayIteratorInput): Promise<Archive>; /** * Iterate over entries in-place from a given source buffer. * The buffer should come from a complete, uncompressed tar file. */ static read(input: AsyncUint8ArrayIteratorInput): AsyncIterable<ArchiveEntry>; }