bytes
bytes copied to clipboard
Work with bytes and implement network protocols
I was working with this library in order to implement bidirectional communication over grpc-web using a new elm protocol buffer library that makes use of this. In order to get...
Not sure if this is the appropriate place for it, but if you store a Bytes value on your elm model without decoding it, in the debugger (when you compile...
Hi! first of all: thanks a lot for bringing Elm into the world! This language kept me motivated digging more and more into functional programming, whereas with other languages I...
`Bytes.Decode.string` will decode bytes that are not valid utf8 and produces an nonsense string. Instead it should fail. Thanks @jhbrown94 for helping me verify this. ## SSCCE ```elm module Main...
A `Bytes` type [is just a `DataView`](https://github.com/elm/bytes/blob/2bce2aeda4ef18c3dcccd84084647d22a7af36a6/src/Elm/Kernel/Bytes.js#L28-L33) so the implementation should be pretty straightforward, just like [`File.decoder`](https://github.com/elm/file/blob/e4ca3864c93a5e766e24ed6916174753567b2f59/src/Elm/Kernel/File.js#L16). Do you think this approach is correct? Would you like me to open...
### The issue occurs when … 1. Using `Decode.string` on bytes for longer expected strings will result in JavaScript engines (V8 in this case) utilizing an internal string concatenation performance...
The current function documentation is: > `decode : Decoder a -> Bytes -> Maybe a` > > The `Decoder` specifies exactly how this should happen. This process may fail if...
``` > import Bytes.Encode > b0 = [] |> List.map Bytes.Encode.unsignedInt8 |> Bytes.Encode.sequence |> Bytes.Encode.encode : Bytes.Bytes > b1 = [ 125, 211, 143, 67, 78, 89, 125, 24, 100,...
A decoder I wrote returned `Nothing` for large byte sequences, but it was due to a stack overflow in a Bytes.Decode.map function I used. Here's a simple example: ```elm import...
When parsing a protocol chunk by chunk, we need to stop successfully with every thing we decoded so far, and keep the remaining bytes for later. The current decoder API...