Windows平台c++工程base64与二进制文件相互转化

上传者: whish1994 | 上传时间: 2019-12-21 21:53:49 | 文件大小: 11.58MB | 文件类型: rar
在前人的基础上增加了json解析封装得到base64或反转成文件。包括案例,源代码。 调用简单,不错的学习案例。 std::unique_ptrp(new const char*(readfile64("{\"filename\":\"D:\\\\job\\\\greatwall\\\\test\\\\1.jpg\"}"))); if (!*p.get()) return -1; int len = strlen(*p.get()); printf("%s\n",*p.get()); char* pcOut = new char[len + MAX_PATH]; memset(pcOut,0x00,sizeof(pcOut)); sprintf(pcOut,"{\"base64\":\"%s\",\"filename\":\"%s\"}",*p.get(),"D:\\\\job\\\\greatwall\\\\test\\\\out.jpg"); //const char* ret = _64tofile(pcOut); std::unique_ptrret(new const char*(_64tofile(pcOut))); printf("%s\n",*ret.get());

文件下载

资源详情

[{"title":"( 19 个子文件 11.58MB ) Windows平台c++工程base64与二进制文件相互转化","children":[{"title":"base64_file","children":[{"title":"base64_file","children":[{"title":"ReadMe.txt <span style='color:#111;'> 2.02KB </span>","children":null,"spread":false},{"title":"base64_file.vcxproj <span style='color:#111;'> 4.69KB </span>","children":null,"spread":false},{"title":"base64.h <span style='color:#111;'> 1.17KB </span>","children":null,"spread":false},{"title":"stdafx.h <span style='color:#111;'> 818B </span>","children":null,"spread":false},{"title":"base64_file.h <span style='color:#111;'> 130B </span>","children":null,"spread":false},{"title":"cJSON.h <span style='color:#111;'> 7.35KB </span>","children":null,"spread":false},{"title":"stdafx.cpp <span style='color:#111;'> 216B </span>","children":null,"spread":false},{"title":"base64_file.vcxproj.user <span style='color:#111;'> 143B </span>","children":null,"spread":false},{"title":"Resource.h <span style='color:#111;'> 394B </span>","children":null,"spread":false},{"title":"macros.h <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false},{"title":"targetver.h <span style='color:#111;'> 236B </span>","children":null,"spread":false},{"title":"base64_file.rc <span style='color:#111;'> 2.58KB </span>","children":null,"spread":false},{"title":"cJSON.c <span style='color:#111;'> 27.14KB </span>","children":null,"spread":false},{"title":"base64_file.cpp <span style='color:#111;'> 4.38KB </span>","children":null,"spread":false},{"title":"base64_file.vcxproj.filters <span style='color:#111;'> 2.03KB </span>","children":null,"spread":false},{"title":"base64.cpp <span style='color:#111;'> 3.26KB </span>","children":null,"spread":false}],"spread":false},{"title":"ipch","children":[{"title":"base64_file-53c058d8","children":null,"spread":false}],"spread":true},{"title":"base64_file.suo <span style='color:#111;'> 16.50KB </span>","children":null,"spread":false},{"title":"base64_file.sln <span style='color:#111;'> 900B </span>","children":null,"spread":false},{"title":"base64_file.sdf <span style='color:#111;'> 55.02MB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明