UNPKG

@obsidize/tar-browserify

Version:

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

21 lines (20 loc) 896 B
import { AsyncUint8ArrayLike } from '../common/async-uint8-array'; import { TarEntry } from '../entry/tar-entry'; import { ArchiveWriter } from './archive-writer'; /** * Main entry point for extracting and creating tarballs. * See TarIterator and TarEntry for more granular options. */ export declare class Archive extends ArchiveWriter { constructor(entries?: TarEntry[]); /** * 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(buffer: Uint8Array | AsyncUint8ArrayLike): Promise<Archive>; /** * Iterate over entries in-place from a given source buffer. * The buffer should come from a complete, uncompressed tar file. */ static read(buffer: Uint8Array | AsyncUint8ArrayLike): AsyncIterable<TarEntry>; }