ipfs-inactive / js-ipfs-unixfs-importer

[ARCHIVED] JavaScript implementation of the UnixFs importer used by IPFS
MIT License
5 stars 4 forks source link

Make the HAMT a standalone module that can be used by other libraries #1

Closed daviddias closed 5 years ago

daviddias commented 5 years ago

Pretty please πŸ₯ΊπŸ™πŸ½

achingbrain commented 5 years ago

Is there any reason we didn't use https://github.com/mattbierner/hamt or https://github.com/mattbierner/hamt_plus?

daviddias commented 5 years ago

Didn't know about those. We made the JS HAMT way after the GO HAMT

achingbrain commented 5 years ago

Shame they got the good name on npm already!

mikeal commented 5 years ago

Which HAMT encoding are we using? The current one in the dag-pb based unixfs or the one Filecoin is using and, I assume, unixfs-v2 will use https://github.com/ipfs/go-hamt-ipld ?

achingbrain commented 5 years ago

This module uses hamt-sharding which was extracted from the js-unixfs-engine module and is a vanilla HAMT.

I hadn't seen go-hamt-ipld but it looks like it uses a CHAMP style HAMT which might or might not be an improvement.

For unixfs-v2 do you know if anyone's done any real-world benchmarks to compare the performance? If not it's probably something we should look at.