By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,937 Members | 1,188 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,937 IT Pros & Developers. It's quick & easy.

Base64 string save to binary file

P: n/a
How to save a Base64 encoded string to a binary file

For instance, the following XML tag stores the binary data in a Base64
encoded string
<data>TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx<data >

Any one point to sample code on saving the above string to binary
image (.jpg) file?

base64 class I am using
http://www.adp-gmbh.ch/cpp/common/base64.html
Nov 19 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Chunekit Pong schrieb:
How to save a Base64 encoded string to a binary file

For instance, the following XML tag stores the binary data in a Base64
encoded string
<data>TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx<data >

Any one point to sample code on saving the above string to binary
image (.jpg) file?

base64 class I am using
http://www.adp-gmbh.ch/cpp/common/base64.html
Just use the base64_decode function on this page and pass it the base64
encoded string, then store the result in a file using the write function
of std::ofstream (opening in binary mode).

--
Thomas
Nov 19 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.