import { importBytes } from 'ipfs-unixfs-importer'
import { MemoryBlockstore } from 'blockstore-core'
// store blocks in memory, other blockstores are available
const blockstore = new MemoryBlockstore()
const input = Uint8Array.from([0, 1, 2, 3, 4])
const entry = await importBytes(input, blockstore)
importBytes
accepts a single Uint8Array and returns a promise of a singleImportResult
.