Skip to content

Initial version of base64 encoding #300

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

Merged
merged 5 commits into from
Sep 15, 2013

Conversation

prantlf
Copy link

@prantlf prantlf commented Sep 15, 2013

Included:

  • interfaces for iterator and streaming usage
  • minimum tests
  • experimental code with alternative implementations

Missing:

  • encoding options to support RFC 4648
  • better solution for the stream interface
  • decision about encoding code to use in the final version
  • better structure of the tests
  • documentation

// from the input sequence to encode.
template <typename Value>
char encode_value(Value value) {
static char const * encoding = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would think static char const encoding[] = "..."; would be better for many reasons here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, fixed.

@deanberris
Copy link
Member

LGTM -- Thanks very much, this is very well-written!

I'll merge this in as-is, and hopefully you can address that one nit in a follow-up PR. What's missing is just some documentation that's linked into the current documentation tree and we're golden!

deanberris added a commit that referenced this pull request Sep 15, 2013
Initial version of base64 encoding
@deanberris deanberris merged commit b590000 into cpp-netlib:0.10-devel Sep 15, 2013
@prantlf
Copy link
Author

prantlf commented Sep 15, 2013

Thanks! I'm going to have a look how the the cpp-netlib RST documentation is organized. I like the idea of having the documentation outside the sources. I put comments to the code which should belong to the reference documentation.

@deanberris
Copy link
Member

Happy to chat if you'd like to get more info -- find me on Google+ as 'mikhailberis@gmail.com' and we can hangout if you need more real-time or high-bandwidh feedback. :)

leecoder pushed a commit to leecoder/cpp-netlib that referenced this pull request Apr 14, 2015
Initial version of base64 encoding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants