Skip to content
This repository was archived by the owner on Apr 29, 2020. It is now read-only.

feat: create a DAG from a list of CID’s and sizes #46

Closed
wants to merge 4 commits into from

Conversation

mikeal
Copy link

@mikeal mikeal commented Jan 11, 2020

This definitely needs a thorough review since this is a bit of a hack and I’m not all that familiar with this code.

This is a feature we need in order to generate custom file data structures from a pre-parsed array of parts. It’s a pretty unique use case and I’m not even sure we should document it as part of the public API.

This implementation seemed like the simplest way to accomplish the goal, but there may be a simpler way I missed.

@mikeal
Copy link
Author

mikeal commented Jan 11, 2020

Please note that this branch relies on another PR #45

achingbrain added a commit that referenced this pull request Jan 13, 2020
The interesting bits of this module are the various ways of building
DAGs for files and folders (flat, sharded, etc).

Sometimes we want to utilise bits of this logic to build DAGs without
having to reimplement big chunks of this module.

This PR allows the user to pass in functions to replace key parts of
this import pipeline.

Enables:

* ipfs-inactive/js-ipfs-mfs#73
* #46
achingbrain added a commit that referenced this pull request Jan 15, 2020
* feat: allow overriding of internal functions

The interesting bits of this module are the various ways of building
DAGs for files and folders (flat, sharded, etc).

Sometimes we want to utilise bits of this logic to build DAGs without
having to reimplement big chunks of this module.

This PR allows the user to pass in functions to replace key parts of
this import pipeline.

Enables:

* ipfs-inactive/js-ipfs-mfs#73
* #46

* docs: add description about internal funcs
@achingbrain
Copy link
Collaborator

This should have been enabled by #48 - happy to close?

@mikeal
Copy link
Author

mikeal commented Jan 16, 2020

yup, closing.

@mikeal mikeal closed this Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants