Нет описания

Common.h 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #ifndef SSZipCommon
  2. #define SSZipCommon
  3. /* tm_unz contain date/time info */
  4. typedef struct tm_unz_s
  5. {
  6. unsigned int tm_sec; /* seconds after the minute - [0,59] */
  7. unsigned int tm_min; /* minutes after the hour - [0,59] */
  8. unsigned int tm_hour; /* hours since midnight - [0,23] */
  9. unsigned int tm_mday; /* day of the month - [1,31] */
  10. unsigned int tm_mon; /* months since January - [0,11] */
  11. unsigned int tm_year; /* years - [1980..2044] */
  12. } tm_unz;
  13. typedef struct unz_file_info_s
  14. {
  15. unsigned long version; /* version made by 2 bytes */
  16. unsigned long version_needed; /* version needed to extract 2 bytes */
  17. unsigned long flag; /* general purpose bit flag 2 bytes */
  18. unsigned long compression_method; /* compression method 2 bytes */
  19. unsigned long dosDate; /* last mod file date in Dos fmt 4 bytes */
  20. unsigned long crc; /* crc-32 4 bytes */
  21. unsigned long compressed_size; /* compressed size 4 bytes */
  22. unsigned long uncompressed_size; /* uncompressed size 4 bytes */
  23. unsigned long size_filename; /* filename length 2 bytes */
  24. unsigned long size_file_extra; /* extra field length 2 bytes */
  25. unsigned long size_file_comment; /* file comment length 2 bytes */
  26. unsigned long disk_num_start; /* disk number start 2 bytes */
  27. unsigned long internal_fa; /* internal file attributes 2 bytes */
  28. unsigned long external_fa; /* external file attributes 4 bytes */
  29. tm_unz tmu_date;
  30. } unz_file_info;
  31. /* unz_file_info contain information about a file in the zipfile */
  32. typedef struct unz_file_info64_s
  33. {
  34. unsigned long version; /* version made by 2 bytes */
  35. unsigned long version_needed; /* version needed to extract 2 bytes */
  36. unsigned long flag; /* general purpose bit flag 2 bytes */
  37. unsigned long compression_method; /* compression method 2 bytes */
  38. unsigned long dosDate; /* last mod file date in Dos fmt 4 bytes */
  39. unsigned long crc; /* crc-32 4 bytes */
  40. unsigned long long compressed_size; /* compressed size 8 bytes */
  41. unsigned long long uncompressed_size; /* uncompressed size 8 bytes */
  42. unsigned long size_filename; /* filename length 2 bytes */
  43. unsigned long size_file_extra; /* extra field length 2 bytes */
  44. unsigned long size_file_comment; /* file comment length 2 bytes */
  45. unsigned long disk_num_start; /* disk number start 2 bytes */
  46. unsigned long internal_fa; /* internal file attributes 2 bytes */
  47. unsigned long external_fa; /* external file attributes 4 bytes */
  48. tm_unz tmu_date;
  49. unsigned long long disk_offset;
  50. unsigned long size_file_extra_internal;
  51. } unz_file_info64;
  52. typedef struct unz_global_info_s
  53. {
  54. unsigned long number_entry; /* total number of entries in
  55. the central dir on this disk */
  56. unsigned long number_disk_with_CD; /* number the the disk with central dir, used for spanning ZIP*/
  57. unsigned long size_comment; /* size of the global comment of the zipfile */
  58. } unz_global_info;
  59. typedef struct unz_global_info64
  60. {
  61. unsigned long long number_entry; /* total number of entries in
  62. the central dir on this disk */
  63. unsigned long number_disk_with_CD; /* number the the disk with central dir, used for spanning ZIP*/
  64. unsigned long size_comment; /* size of the global comment of the zipfile */
  65. } unz_global_info64;
  66. #endif