with open(self.filename, "rb") as caj:
[page_num] = struct.unpack("i", caj.read(4))
read32 = caj.read(32)
[image_type_enum, offset_to_image_data, size_of_image_data] = struct.unpack("iii", read32[0:12])
[page_data_offset, size_of_text_section, images_per_page, page_no, unk2, next_page_data_offset] = struct.unpack("iihhii", caj.read(20))
(height, width) = struct.unpack(">HH", image_data[163:167])
toc_bytes = struct.unpack("256s24s12s12si", caj.read(0x134))
Python的unpack的使用方式很多,怎样使用C++实现python的unpack功能?
我现在在将一个python的工程改写成C++版本,不知道应该怎样改写Python的unpack函数。
如果有老_师知道,请贴出源代码。
如果有哪位老_师知道思路,也可以贴出思路。
谢谢。