/// import TarObject, { TarObjectHeader } from './TarObject'; /** * Converts tar's octal-encoded numbers into decimal. */ export declare function parseOctal(chunk: Uint8Array): number; /** * Converts tar's sometimes-nul-terminated byte strings into strings. */ export declare function parseString(chunk: Uint8Array): string; /** * Checks if the high bit is set, per the GNU extension, which allows for big files: * * "If a file is over 8GiB, it will set the high bit of the first character in file_size, * and the rest of the string is parsed as base 256 (i.e it's treated as a 95-bit integer, big endian)." * * Left unimplemented mostly out of laziness and lack of need on my part. */ export declare function parseSize(chunk: Uint8Array): number; /** * Defaults nul types to files. */ export declare function parseType([byte]: Uint8Array): string; /** * Walks through the chunk to parse out what we need. */ export declare function parseHeader(chunk: Uint8Array): TarObjectHeader; export type TarParserChunk = { chunk: Uint8Array; isEmpty: boolean; }; /** * Parses each 512-byte chunk as a tar object. */ export default class TarParser { protected header: TarObjectHeader | null; protected streamWriter: WritableStreamDefaultWriter | null; protected bytesWritten: number; protected lastHeaderWasEmpty: boolean; protected p: Promise; parse(): TransformStream; }