-
Notifications
You must be signed in to change notification settings - Fork 363
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
Base64 proposal #372
Base64 proposal #372
Conversation
e.g., `Base64.getDecoder().decode(...)`. This led us to avoid separating the encoder and decoder into different entities. | ||
We also didn't find evidence that the benefits of such a separation outweigh the usage inconvenience. | ||
Second, encoding to `String` and decoding from `String` are considerably more popular than encoding to `ByteArray` and | ||
decoding from `ByteArray`. Thus, we decided to make the more frequently used functions shorter. |
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.
Another reason was that a compound operation like "encode bytearray to base64 string + encode string to utf8 byte array" should have a compound name.
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.
The reverse operation (utf8 byte array -> string -> byte array) doesn't have a compound name.
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.
Yes, in that case we didn't complicate the name thanks to overloading on parameter types, but the main principle in naming holds, so it's worth to mention it.
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.
Done!
Only comment here about the text itself. The discussion about the feature is done in #373.
This KEEP proposes to introduce a multiplatform API for Base64 encoding and decoding.