#include <iostream>
#include <cstring>
struct Packet {
unsigned int packet_type;
wchar_t packet_length[128];
wchar_t file_name[256];
wchar_t template_name[256];
wchar_t file_name_list[1024];
wchar_t file_data[1024];
void serialize(char * dat) {
memcpy(dat, this, sizeof(Packet));
}
void deserialize(const char * dat) {
memcpy(this, dat, sizeof(Packet));
}
};
using namespace std;
int main(void) {
cout << sizeof(wchar_t) << endl;
cout << sizeof(Packet) << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0cmluZz4KCnN0cnVjdCBQYWNrZXQgewogICAgdW5zaWduZWQgaW50IHBhY2tldF90eXBlOwogICAgd2NoYXJfdCBwYWNrZXRfbGVuZ3RoWzEyOF07CiAgICB3Y2hhcl90IGZpbGVfbmFtZVsyNTZdOwogICAgd2NoYXJfdCB0ZW1wbGF0ZV9uYW1lWzI1Nl07CiAgICB3Y2hhcl90IGZpbGVfbmFtZV9saXN0WzEwMjRdOwogICAgd2NoYXJfdCBmaWxlX2RhdGFbMTAyNF07CgogICAgdm9pZCBzZXJpYWxpemUoY2hhciAqIGRhdCkgewogICAgICAgIG1lbWNweShkYXQsIHRoaXMsIHNpemVvZihQYWNrZXQpKTsKICAgIH0KCiAgICB2b2lkIGRlc2VyaWFsaXplKGNvbnN0IGNoYXIgKiBkYXQpIHsKICAgICAgICBtZW1jcHkodGhpcywgZGF0LCBzaXplb2YoUGFja2V0KSk7CiAgICB9Cn07Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4odm9pZCkgewogICAgY291dCA8PCBzaXplb2Yod2NoYXJfdCkgPDwgZW5kbDsKCWNvdXQgPDwgc2l6ZW9mKFBhY2tldCkgPDwgZW5kbDsKCXJldHVybiAwOwp9Cg==