phiryll / lexy

Lexicographical Byte Order Encodings
MIT License
0 stars 0 forks source link

Ensure all read error cases are handled correctly #29

Open phiryll opened 1 week ago

phiryll commented 1 week ago

io.Reader.Read may or may not return EOF when it first reaches the end of the stream. If it does not, then the next read will return (0, EOF). Care needs to be taken to ensure the empty []byte is not used, since some types do have 0-byte encodings.