Read binary data (from file) into a struct
问题 I'm reading binary data from a file, specifically from a zip file. (To know more about the zip format structure see http://en.wikipedia.org/wiki/ZIP_%28file_format%29) I've created a struct that stores the data: 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