Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Provides an EntryChunk class to help encode batches of multihashes as IPNI EntryChunk IPLD blocks.
Encourages using dag-cbor as it's almost half the size as dag-json, and every entrychunk and advert has to be stored and replicated to 1 or more IPNI servers.
Borrows the idea of an
export()
that provides an encoded IPLD block from @Gozala in ucanto https://github.com/web3-storage/ucanto/blob/2200d43595b85a5e7b60c234987ff3ce91404401/packages/core/src/delegation.js#L248Provides a cheap and accurate
calculateEncodedSize()
function to allow callers to determine when to split entries across multiple blocks.Thanks to @rvagg for the very useful https://github.com/rvagg/cborg module that makes that possible and the inspriation in the calculateHeaderLength fn from js-car
see: https://github.com/ipld/js-car/blob/562c39266edda8422e471b7f83eadc8b7362ea0c/src/buffer-writer.js#L215
Fixes #2
WIP on storacha/specs#85
License: MIT