我正在从文件中读取二进制数据,特别是从zip文件中读取.(要了解有关zip格式结构的更多信息,请参阅http://en.wikipedia.org/wiki/ZIP_%28file_format%29)
我创建了一个存储数据的结构:
typedef struct {
/*Start Size Description */
int signatute; /* 0 4 Local file header signature = 0x04034b50 */
short int version; /* ?4 2 Version needed to extract (minimum) */
short int bit_flag; /* ?6 2 General purpose bit flag */
short int compression_method; /* ?8 2 Compression method */
short int time; /* 10 2 File last modification time */
short int date; /* 12 2 File last modification date */
int crc; /* …Run Code Online (Sandbox Code Playgroud)