Skip to main content

Tar.Extract

Examples below assume this module is imported with an imports: entry under alias Tar. Kind references follow that alias — substitute your own if you import it under a different name.

Extracts one named entry from a tar Stream<Uint8Array> and emits its contents as a Stream<Uint8Array>. The archive is scanned to completion; the matched entry is buffered and re-emitted as a single-chunk stream so the result composes with any downstream decoder. A missing entry raises ERR_NOT_FOUND.


Example

- name: manifest
inputs:
input: "${{ steps.gunzip.result.output }}"
path: telo.yaml
invoke: { kind: Tar.Extract, name: Pick }

Invocation inputs

InputTypeRequiredDescription
inputStream<Uint8Array>yesTar archive byte stream (gunzip a .tar.gz first).
pathstringyesEntry path to extract. A leading ./ is ignored.

Output

FieldTypeDescription
outputStream<Uint8Array>Byte stream of the extracted entry's contents.

Errors

CodeWhen
ERR_NOT_FOUNDNo entry at path exists in the archive.
ERR_INVALID_INPUTinput is not a byte stream, or path is missing/empty.