js-multiformats icon indicating copy to clipboard operation
js-multiformats copied to clipboard

feat: BlockEncoder#encode and BlockDecoder#decode can be async

Open gobengo opened this issue 1 year ago • 2 comments

I want to be able to use async functions in my Block encode/decode.

gobengo avatar Dec 11 '23 09:12 gobengo

wdyt @Gozala @rvagg ?

gobengo avatar Dec 11 '23 09:12 gobengo

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.

rvagg avatar Dec 13 '23 04:12 rvagg