
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
A streaming base64 decoder. Built to play with IRHydra2. You probably don't need it.
var fromBase64 = require('de-base64')
someBase64Stream.pipe(fromBase64())
Create a new transform stream, passing opts through.
A low-level, streaming base64 decoder.
Decodes base64 input from the chunk directly back into the chunk.
Returns the new length so you can slice the chunk yourself.
Note: After painstaking optimization, it turns out that simply calling new Buffer(chunk, 'base64') inside a simple transform stream is faster. But what
about memory usage, you cry out? Surely you could blit the output back into
the incoming buffer, and not have to make so many copies!
Sure enough, you can -- and I tried that. Doing so is unsafe and breaks the stream API contract, and worse of all, really slows things down. You can't even avoid allocating new objects -- you have to slice the original buffer, so you're at least allocating a new Buffer.
This library exists mostly because I think bit-twiddling and JS optimization are fun. It might be more useful if the chunks you're receiving are small (so you can avoid hopping between C++ and JS a bunch), or if you're in browser; I am not holding out a lot of hope there, though.
In lieu of a specific purpose, I'd like to direct you to decoder.js -- I
detail some of the approaches I tried there.
MIT
FAQs
decode base64 buffers in place (no copying!)
We found that de-base64 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.