SSZipCommon.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef SSZipCommon
  2. #define SSZipCommon
  3. /* unz_global_info structure contain global data about the ZIPfile
  4. These data comes from the end of central dir */
  5. typedef struct unz_global_info64_s
  6. {
  7. uint64_t number_entry; /* total number of entries in the central dir on this disk */
  8. uint32_t number_disk_with_CD; /* number the the disk with central dir, used for spanning ZIP*/
  9. uint16_t size_comment; /* size of the global comment of the zipfile */
  10. } unz_global_info64;
  11. typedef struct unz_global_info_s
  12. {
  13. uint32_t number_entry; /* total number of entries in the central dir on this disk */
  14. uint32_t number_disk_with_CD; /* number the the disk with central dir, used for spanning ZIP*/
  15. uint16_t size_comment; /* size of the global comment of the zipfile */
  16. } unz_global_info;
  17. /* unz_file_info contain information about a file in the zipfile */
  18. typedef struct unz_file_info64_s
  19. {
  20. uint16_t version; /* version made by 2 bytes */
  21. uint16_t version_needed; /* version needed to extract 2 bytes */
  22. uint16_t flag; /* general purpose bit flag 2 bytes */
  23. uint16_t compression_method; /* compression method 2 bytes */
  24. uint32_t dos_date; /* last mod file date in Dos fmt 4 bytes */
  25. uint32_t crc; /* crc-32 4 bytes */
  26. uint64_t compressed_size; /* compressed size 8 bytes */
  27. uint64_t uncompressed_size; /* uncompressed size 8 bytes */
  28. uint16_t size_filename; /* filename length 2 bytes */
  29. uint16_t size_file_extra; /* extra field length 2 bytes */
  30. uint16_t size_file_comment; /* file comment length 2 bytes */
  31. uint32_t disk_num_start; /* disk number start 4 bytes */
  32. uint16_t internal_fa; /* internal file attributes 2 bytes */
  33. uint32_t external_fa; /* external file attributes 4 bytes */
  34. uint64_t disk_offset;
  35. uint16_t size_file_extra_internal;
  36. } unz_file_info64;
  37. typedef struct unz_file_info_s
  38. {
  39. uint16_t version; /* version made by 2 bytes */
  40. uint16_t version_needed; /* version needed to extract 2 bytes */
  41. uint16_t flag; /* general purpose bit flag 2 bytes */
  42. uint16_t compression_method; /* compression method 2 bytes */
  43. uint32_t dos_date; /* last mod file date in Dos fmt 4 bytes */
  44. uint32_t crc; /* crc-32 4 bytes */
  45. uint32_t compressed_size; /* compressed size 4 bytes */
  46. uint32_t uncompressed_size; /* uncompressed size 4 bytes */
  47. uint16_t size_filename; /* filename length 2 bytes */
  48. uint16_t size_file_extra; /* extra field length 2 bytes */
  49. uint16_t size_file_comment; /* file comment length 2 bytes */
  50. uint16_t disk_num_start; /* disk number start 2 bytes */
  51. uint16_t internal_fa; /* internal file attributes 2 bytes */
  52. uint32_t external_fa; /* external file attributes 4 bytes */
  53. uint64_t disk_offset;
  54. } unz_file_info;
  55. #endif