Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deanberris merged 5 commits intocpp-netlib:0.10-develfromprantlf:base64_util
Sep 15, 2013
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
Remove padding_length() from the encoding state; the count of padding…
… characters becomes private
  • Loading branch information
@prantlf
prantlf committedSep 14, 2013
commitefd0c2789aca118f7b7fb74a451372188f428da6
2 changes: 1 addition & 1 deletionboost/network/utils/base64/encode-io.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -110,7 +110,7 @@ struct state : public boost::network::utils::base64::state<Value> {

// allow only the construction with an output stream (strict RAII)
state();
state(state<Char, Value> const & source);
state(state<Char, Value> const &);

std::basic_ostream<Char> & output;

Expand Down
15 changes: 4 additions & 11 deletionsboost/network/utils/base64/encode.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,6 @@ namespace utils {
// struct state<Value> {
// bool empty () const;
// void clear();
// unsigned short padding_length() const;
// }
//
// OutputIterator encode(InputIterator begin, InputIterator end,
Expand DownExpand Up@@ -85,12 +84,6 @@ struct state {
last_encoded_value = 0;
}

unsigned short padding_length() const {
// the fewer octets from the triplet processed, the more characters
// needed as padding padding - that is why the complement here
return triplet_index ? 3 - triplet_index : 0;
}

protected:
// number of the octet in the incomplete quantum, which has been
// processed the last time; 0 means that the previous quantum was
Expand DownExpand Up@@ -414,12 +407,12 @@ std::basic_string<Char> encode(char const * value) {
return result;
}

//the function overloads for string literals encode the input without
//The function overloads for string literals encode the input without
// the terminating zero, which is usually expected, because the trailing
// zero byte is not considered a part of the string value; the overloads
//foran input range would wrap the string literal by Boost.Range and
//encodethe full memory occupated by the string literal - including the
// unwanted last zero byte
//for an input range would wrap the string literal by Boost.Range and
//encode the full memory occupated by the string literal - including the
// unwanted last zero byte.

} // namespace base64

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp