How do I write binary data for 7z archive format?

ε祈祈猫儿з 提交于 2019-12-04 15:00:40

don't know the format of 7z, but I notice when you write down offset, size and crc that these will be written to the file in little-endian format (I assume you have a little-endian CPU).

Edit: An probably worse, you are missing the & before major, minor, offset, size and crc, i.e. you are casting the actual values to a pointer.

Uh... I'm confused. It has an SDK... which you mention in your post... also the 7-zip sources are online. see also p7zip on SourceForge. I just glanced at the sources for p7zip and there are a bunch of files that start with "7z" that look like they would do the trick.

I haven't used the 7z format programattically myself (just through the command-line util / GUI) but why would you need to handle those low-level things yourself rather than through the SDK? (other than because of the LGPL licensing)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!