You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.
I find passing name / code of the codec counter intuitive & I think just providing a codec instance might be better for following reasons:
Type checkers / linters can catch mismatching / invalid references, but are useless with names.
If codec has not being installed you get an error, while with say dag.put(node, dag.codec[name]) you are encourage to see if format is known.
Don't necessarily need to install codec to use it.
I understand that without installing a codec / format decode will not work, however get could optionally take codec as well. In case of putMany / getMany it's less clear but maybe optional codec dict can be provided as in {[name]:Codec}.
Not a big deal, just in my code I find it more convenient to pass actual codecs than names.
The text was updated successfully, but these errors were encountered:
The current API takes multicodec codes as parameter for formats. @Gozala proposes #191 (comment) to pass in codec instances:
The text was updated successfully, but these errors were encountered: