bytes icon indicating copy to clipboard operation
bytes copied to clipboard

Add `Bytes.decoder : Json.Decode.Decoder Bytes`

Open utkarshkukreti opened this issue 6 years ago • 3 comments

A Bytes type is just a DataView so the implementation should be pretty straightforward, just like File.decoder.

Do you think this approach is correct? Would you like me to open a PR with this change?

Use case: I have data in a Uint8Array in JS and I want to use it with an elm-protocol-buffers-like package but I can't send it over a port because there's no way to decode into Bytes.

utkarshkukreti avatar Jun 12 '19 12:06 utkarshkukreti

I also would like to be able to send Bytes over a port (without having to go via base64 or some other hack).

rupertlssmith avatar Jul 03 '19 19:07 rupertlssmith

My use case is send/receiving MIDI data via WebMIDI.

mzero avatar Jul 27 '19 03:07 mzero

It might also be great to have a Bytes.encode function too

dullbananas avatar Aug 06 '20 02:08 dullbananas