/** * GNU ustar untar implementation. * * @since 1.0.0 */ import type * as Schema from "effect/Schema"; import * as Effect from "effect/Effect"; import * as HashMap from "effect/HashMap"; import * as HashSet from "effect/HashSet"; import * as Sink from "effect/Sink"; import * as Stream from "effect/Stream"; import * as TarCommon from "./Header.ts"; /** * This sink will read blocks from the stream and will combine the data blocks * for this header block into a single stream. This sink will stop once it has * read all the data block for this header block or once it see the endOfArchive * flag. * * @since 1.0.0 * @category Untar */ export declare const aggregateBlocksByHeadersSink: Sink.Sink; /** * When the stream is done, we will have a bunch of FolderState objects which * contain their header blocks and data chunks. We will collect them all into a * map, where the key is the Tar header block and the value is the data chunks. * If we encounter two of the exact same header blocks in our stream (not sure * how this would happen for a correctly formatted tarball, but I guess its not * impossible eo encounter), then we will just take the second entry. * * @since 1.0.0 * @category Untar */ export declare const collectorSink: Sink.Sink, Stream.Stream>, FolderState, never, never, never>; /** * Takes a Tar stream and unpacks it into a map of Tar headers and their data * streams. * * @since 1.0.0 * @category Untar */ export declare const untar: (stream: Stream.Stream, filter?: ((header: Schema.Schema.Type<(typeof TarCommon.TarHeader)["non-full"]>) => boolean) | undefined) => Effect.Effect, Stream.Stream>, E1 | Schema.SchemaError, R1>; declare const MissingEntries_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "MissingEntries"; } & Readonly; /** * Error thrown when some expected entries are missing from the tarball. * * @since 1.0.0 * @category Untar */ export declare class MissingEntries extends MissingEntries_base<{ message: string; actualEntries: HashSet.HashSet; expectedEntries: HashSet.HashSet; }> { readonly missingEntries: HashSet.HashSet; } /** * Takes a Tar stream and unpacks only specific entries into a map of Tar * headers and their data streams. * * @since 1.0.0 * @category Untar */ export declare const extractEntries: (stream: Stream.Stream, entries: HashSet.HashSet) => Effect.Effect, Stream.Stream>, E1 | Schema.SchemaError | MissingEntries, R1>; export {}; //# sourceMappingURL=Untar.d.ts.map