Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
encoding/base64: decoder output depends on chunking of underlying reader #31626
The output of a decoder produced from Encoding.NewDecoder differs depending on how you chunk the input to it. I noticed these differences:
I think that the output of a decoder should always be the same as if the entire Reader were serialized to a string and then passed to DecodeString.
Item 1 is more important IMO. Item 2 was unexpected but I can live with inconsistent byte offsets in error messages. However seeing as CorruptInputError is already an int64, it would be nice to have if it doesn't complicate the internals too much.
This bug is somewhat similar to #25296 for encoding/base32.
What version of Go are you using (