While packing files into Content Addressable aRchives (CAR), ipfs-car
imports the given files into unix-fs. All the unix-fs
graph needs to be computed, in order to get the root CID to create the resulting CAR file. A blockstore is used to store the generated unix-fs
temporarily, so that we can iterate them afterwards and create large CAR files.
The Blockstore implementations follows the Blockstore Interface. The available implementations are:
- FsBlockStore with a local file system backend (Node.js environments)
- MemoryBlockStore with an in-memory backend
- IdbBlockStore for browsers with IndexedDb via
idb-keyval
- LevelBlockStore with a level backend (Node.js, Electron and browser environments)
- FsBlockStore
import { FsBlockStore } from 'ipfs-car/blockstore/fs'
- IdbBlockStore
import { IdbBlockStore } from 'ipfs-car/blockstore/idb'
- MemoryBlockStore
import { MemoryBlockStore } from 'ipfs-car/blockstore/memory'
- LevelBlockStore
import { LevelBlockStore } from 'level-blockstore'