tar
    Preparing search index...

    Type Alias ExtractOptions

    ExtractOptions: ReadOptions & UnpackOptions & {
        jobs?: number;
        maxReadSize?: number;
        onEntry?: (entry: ReadEntry) => unknown;
        transform?: (
            entry: ReadEntry,
        ) => TransformStream<Uint8Array, Uint8Array> | undefined;
    } & (
        | { file?: string; fs: ExtractFS; input: TarInput }
        | { file: string; fs: ExtractFS & TarFS; input?: undefined }
    )

    The options of extract. Set input, or file. With file, the fs must also have the functions of TarFS.

    Type Declaration

    • Optionaljobs?: number

      The most entries to extract at one time. Default, and with 0, 16. A positive integer, or Infinity.

    • OptionalmaxReadSize?: number

      The most bytes to read from the file at one time. Default, and with 0, 16 MiB. A positive integer, or Infinity.

    • OptionalonEntry?: (entry: ReadEntry) => unknown

      Called with each entry before it is extracted. A promise is awaited before the entry is extracted.

    • Optionaltransform?: (entry: ReadEntry) => TransformStream<Uint8Array, Uint8Array> | undefined

      Return a stream that changes the content of a file entry, or undefined to write the content as it is.

    • { file?: string; fs: ExtractFS; input: TarInput }
      • Optionalfile?: string

        The name of the archive, for warnings.

      • fs: ExtractFS
      • input: TarInput

        The archive data. A chunk must not change after the source gives it.

    • { file: string; fs: ExtractFS & TarFS; input?: undefined }
      • file: string

        The path of the archive file.

      • fs: ExtractFS & TarFS
      • Optionalinput?: undefined