Commit e77a83f5 authored by Alexey Orlenko's avatar Alexey Orlenko Committed by James M Snell
Browse files

buffer: optimize decoding wrapped base64 data

The fast base64 decoder used to switch to the slow one permanently when
it saw a whitespace or other garbage character.  Since the most common
situation such characters may be encountered in is line-wrapped base64
data, a more profitable strategy is to decode a single 24-bit group with
the slow decoder and then continue running the fast algorithm.

PR-URL: https://github.com/nodejs/node/pull/12146
Ref: https://github.com/nodejs/node/issues/12114


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarTrevor Norris <trev.norris@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 1e6186e9
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment