How do I write binary data for 7z archive format?
问题 I've been pouring over the format description and source code for the 7z archive format, but I'm still having trouble writing a valid container. I assume I can create an empty container... anyway here's my start: std::ofstream ofs(archivename.c_str(), std::ios::binary|std::ios::trunc); Byte signature[6] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C}; Byte major = 0; Byte minor = 3; ofs.write((const char*)signature, 6); ofs.write((const char*)major, 1); ofs.write((const char*)minor, 1); UInt64 offset =