Merge: Base64: Revamped base64_decode and added a strict mode
authorJean Privat <jean@pryen.org>
Fri, 10 Jun 2016 01:55:20 +0000 (21:55 -0400)
committerJean Privat <jean@pryen.org>
Fri, 10 Jun 2016 01:55:20 +0000 (21:55 -0400)
As talked with @ppepos, base64_decode now supports either `strict` or `non-strict`
modes when decoding a base64 string.

The `strict` mode is inspired from the `-i` option from the Unix `base64` command, which ignores non-compliant characters and non-padded `base64` strings.

This is more or less what we do now, `strict` being the default.

Since only one allocation and copy is done now, performance should be better.
There is however one pitfall of this implementation due to the `nullable Object` contract from `Collection[K]`, causing multiple boxings, some further optimization could be done on that front.

Pull-Request: #2086
Reviewed-by: Jean Privat <jean@pryen.org>


Trivial merge