js-multiformats
js-multiformats copied to clipboard
feat: BlockEncoder#encode and BlockDecoder#decode can be async
I want to be able to use async functions in my Block encode/decode.
wdyt @Gozala @rvagg ?
What async codecs do you need this for? is it for codecs involving encryption, or something else? It's just unfortunate to introduce an async
in createUnsafe
which is supposed to be the fast one. I think it'd be mostly optimised away in the common case of codecs that are sync, but it is a slightly annoying UX hurdle when we've been exporting this as sync the whole time.