https://github.com/zebp/streaming-tar
A pure-TypeScript streaming Tar parser for Web-compatible JavaScript runtimes
https://github.com/zebp/streaming-tar
javascript streaming tar typescript
Last synced: about 2 months ago
JSON representation
A pure-TypeScript streaming Tar parser for Web-compatible JavaScript runtimes
- Host: GitHub
- URL: https://github.com/zebp/streaming-tar
- Owner: zebp
- License: mit
- Created: 2023-05-06T15:46:06.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-30T05:41:18.000Z (10 months ago)
- Last Synced: 2025-03-15T08:12:33.758Z (2 months ago)
- Topics: javascript, streaming, tar, typescript
- Language: TypeScript
- Homepage:
- Size: 11.7 KB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
streaming-tar
A pure-TypeScript streaming Tar parser for Web-compatible JavaScript runtimes.```ts
import * as tar from "streaming-tar";const resp = await fetch("https://registry.npmjs.org/react/-/react-18.2.0.tgz");
const tarStream = resp.body.pipeThrough(new DecompressionStream("gzip"));for await (const entry of tar.entries(tarStream)) {
const contents = await entry.text();
console.log(entry.name, contents);
}
```## Features
- Streaming support
- Supports Node.js, Deno, Cloudflare Workers, and other Web-compatible
JavaScript runtimes
- Zero dependencies
- Small footprint, less than 1KB minified and gzipped.## Requirements
- A Web-compatible JavaScript runtime (Node.js, Deno, Bun, Cloudflare Workers,
etc.)## Installation
Via npm:
```sh
npm install streaming-tar
```Via yarn:
```sh
yarn add streaming-tar
```Via pnpm:
```sh
pnpm add streaming-tar
```Via deno:
```ts
import * as tar from "https://deno.land/x/streaming_tar/mod.ts";
```