Add opt-in ignoreWhitespace flag for whitespace-tolerant decoding#24
Open
dipu-bd wants to merge 1 commit into
Open
Add opt-in ignoreWhitespace flag for whitespace-tolerant decoding#24dipu-bd wants to merge 1 commit into
ignoreWhitespace flag for whitespace-tolerant decoding#24dipu-bd wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
|
Real-world Base-64 (PEM, MIME) and hex dumps carry line feeds and spaces, which the decoders reject. `AlphabetDecoder`, `Base32Decoder`, and `Base64Decoder` now accept `ignoreWhitespace` (default false), and `fromHex`, `fromBase32`, `fromBase64`, and their `tryFrom` counterparts expose it as a parameter. Whitespace means tab, line feed, vertical tab, form feed, carriage return, and space. The strict path is unchanged and remains the default: the specialized decoders compact the input into a typed buffer once before the existing fast path, and the generic decoder tests for whitespace only inside its invalid-character branches. Base-64 decode stays at ~2.8 Gbps (1MB) before and after. Closes #20 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UMYuGpP8mwt5yrCqqF68ET
dipu-bd
force-pushed
the
claude/issue-20-optimization-axb6r5
branch
from
July 22, 2026 22:32
c48f575 to
aa0538b
Compare
ignoreWhitespace\ flag for whitespace-tolerant decodingignoreWhitespace flag for whitespace-tolerant decoding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Real-world Base-64 (PEM, MIME) and hex dumps carry line feeds and
spaces, which the decoders reject. `AlphabetDecoder`, `Base32Decoder`,
and `Base64Decoder` now accept `ignoreWhitespace` (default false), and
`fromHex`, `fromBase32`, `fromBase64`, and their `tryFrom` counterparts
expose it as a parameter. Whitespace means tab, line feed, vertical tab,
form feed, carriage return, and space.
The strict path is unchanged and remains the default: the specialized
decoders compact the input into a typed buffer once before the existing
fast path, and the generic decoder tests for whitespace only inside its
invalid-character branches. Base-64 decode stays at ~2.8 Gbps (1MB)
before and after.
Closes #20
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01UMYuGpP8mwt5yrCqqF68ET