[DISCUSS] Add a SBuf-based Base64 encoder/decoder#2452
Draft
kinkie wants to merge 14 commits into
Draft
Conversation
Contributor
|
The only issue I see is that Squid base64 encoding is only used on buffers. So we would end up adding a stream just for the purpose of using the encoder. |
rousskov
requested changes
Jun 28, 2026
rousskov
left a comment
Contributor
There was a problem hiding this comment.
I had already flagged this API direction as problematic before this PR was posted. Will find time to detail that claim.
rousskov
requested changes
Jun 29, 2026
rousskov
left a comment
Contributor
There was a problem hiding this comment.
IMO, the serious problems identified in this incomplete review are enough to warrant switching to a different approach to base64-encoding. There are other, mostly secondary problems in this PR that this review does not flag. Most will probably disappear on the adjusted path.
I can suggest starting with an API like this:
namespace AnyP {
/// A base64-encoded version of the given input.
SBuf Base64Encode(const SBuf &);
} // namespace AnyP
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.
Stemming from the converstaions in PR #2447 which focuses on
addressing a problem as narrowly as possible, develop a longer-term solution,
based around SBuf