https://github.com/webrecorder/wacz2car
Conver WACZ files to CAR files for uploading to IPFS.
https://github.com/webrecorder/wacz2car
Last synced: 8 days ago
JSON representation
Conver WACZ files to CAR files for uploading to IPFS.
- Host: GitHub
- URL: https://github.com/webrecorder/wacz2car
- Owner: webrecorder
- License: apache-2.0
- Created: 2023-03-14T19:46:15.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-07T17:24:42.000Z (almost 2 years ago)
- Last Synced: 2025-04-05T20:23:43.551Z (23 days ago)
- Language: JavaScript
- Size: 6.06 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wacz2car
Conver WACZ files to CAR files for uploading to IPFS.## JS API
```JavaScript
import {wacz2Car} from 'wacz2car'
import { createLoader } from '@webrecorder/wabac/src/blockloaders.js'const loader = await createLoader({someURL})
const carStream = wacz2Car(loader)for await (const chunk of stream.readable) {
writeChunkToFile(chunk)
}// Use `CarWriter.updateRootsInFile` to update root in the header
const rootCID = stream.finalBlock.cid
```## Command line
Make sure you have [Node.js](https://nodejs.org/) installed on your system.
```
# Install globally
npm i -g wacz2car# Use
wacz2car --input archive.wacz --output archive.car# Use without installing
npx wacz2car --input archive.wacz --output archive.car```
You can also use -i and -o shortforms.