tar-xz - v6.1.1
    Preparing search index...

    Function extract

    • Extract a tar.xz archive.

      Returns an AsyncIterable<TarEntryWithData>. Each yielded entry includes:

      • Full metadata (TarEntry fields)
      • dataAsyncIterable<Uint8Array> for the entry's content (consume in order)
      • bytes() — helper that collects all chunks into a single Uint8Array
      • text(encoding?) — helper that collects and decodes to a string

      Parameters

      Returns AsyncGenerator<TarEntryWithData>

      for await (const entry of extract(input)) {
      const content = await entry.bytes();
      console.log(entry.name, content.length);
      }