-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
serialize: base64: allow LF in addition to CRLF and optimize slightly #19594
Conversation
@@ -14,6 +14,7 @@ | |||
|
|||
pub use self::FromBase64Error::*; | |||
pub use self::CharacterSet::*; | |||
pub use self::Newline::*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you leave this out? The other two reexports were just added to make the initial namespacing transition easier, but we don't want to keep them around forever.
What do the benchmark numbers look like before and after this? |
I have only benchmarked this using GNU Setup for benchmarking:
Original:
New:
New (using LF instead of CRLF, so we don't have to replace CRLF with LF ourselves):
|
r? |
needs a rebase |
It is useful to have configurable newlines in base64 as the standard leaves that for the implementation to decide. GNU `base64` apparently uses LF, which meant in `uutils` we had to manually convert the CRLF to LF. This made the program very slow for large inputs. [breaking-change]
Rebased. |
It is useful to have configurable newlines in base64 as the standard leaves that for the implementation to decide. GNU `base64` apparently uses LF, which meant in `uutils` we had to manually convert the CRLF to LF. This made the program very slow for large inputs. [breaking-change]
base64: fix build (assuming rust-lang/rust#19594 is merged)
base64: fix build (assuming rust-lang/rust#19594 is merged)
It is useful to have configurable newlines in base64 as the standard
leaves that for the implementation to decide. GNU
base64
apparentlyuses LF, which meant in
uutils
we had to manually convert the CRLF toLF. This made the program very slow for large inputs.
[breaking-change]