UNPKG

@obsidize/tar-browserify

Version:

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

28 lines (27 loc) 1 kB
import { TarSerializable } from '../../common/tar-utility'; /** * Single segment in a PAX header block, represented by a text line with the format: * ```LENGTH KEY=VALUE\n``` */ export declare class PaxHeaderSegment implements TarSerializable { private mKey; private mValue; private mBytes; constructor(mKey?: string, mValue?: string, mBytes?: Uint8Array | null); static serialize(key: string, value: string): Uint8Array; static deserialize(bytes: Uint8Array, offset?: number): PaxHeaderSegment | null; private static findNextLengthEndIndex; get key(): string; get value(): string; get bytes(): Uint8Array; /** * the value parsed as an integer, or undefined if the parse operation fails */ get intValue(): number | undefined; /** * the value parsed as a float, or undefined if the parse operation fails */ get floatValue(): number | undefined; toUint8Array(): Uint8Array; toJSON(): any; }