joyent/node — Issue #2795: base64 decoding is not decoding the entire string
Author: jhurliman
Created: 2012-02-21 01:58:37+00:00
State: open

Here is a small repro to demonstrate the issue.

http://dl.dropbox.com/u/6736045/faildata.b64 (37640 bytes of base64 encoded data)

`cat faildata.b64 | base64 -D | wc -c`

Shows 28230 bytes were decoded with the base64 command line utility (this is on OSX Lion), which is the correct output for this particular file.

`console.log(new Buffer(require('fs').readFileSync('faildata.b64', 'ascii'), 'base64').length);`

Shows 27337 bytes were decoded.