Go - Method DecodedLen in base64 returns a wrong size
- by nevalu
DecodedLen() doesn't return the original size of data encoded.
func (enc *Encoding) EncodedLen(n int) int { return (n + 2) / 3 * 4 }
func (enc *Encoding) DecodedLen(n int) int { return n / 4 * 3 }
http://golang.org/src/pkg/encoding/base64/base64.go