7zItem.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /* 7zItem.h */
  2. #ifndef __7Z_ITEM_H
  3. #define __7Z_ITEM_H
  4. #include "7zMethodID.h"
  5. #include "7zHeader.h"
  6. #include "7zBuffer.h"
  7. typedef struct _CCoderInfo
  8. {
  9. UInt32 NumInStreams;
  10. UInt32 NumOutStreams;
  11. CMethodID MethodID;
  12. CSzByteBuffer Properties;
  13. }CCoderInfo;
  14. void SzCoderInfoInit(CCoderInfo *coder);
  15. void SzCoderInfoFree(CCoderInfo *coder, void (*freeFunc)(void *p));
  16. typedef struct _CBindPair
  17. {
  18. UInt32 InIndex;
  19. UInt32 OutIndex;
  20. }CBindPair;
  21. typedef struct _CFolder
  22. {
  23. UInt32 NumCoders;
  24. CCoderInfo *Coders;
  25. UInt32 NumBindPairs;
  26. CBindPair *BindPairs;
  27. UInt32 NumPackStreams;
  28. UInt32 *PackStreams;
  29. CFileSize *UnPackSizes;
  30. int UnPackCRCDefined;
  31. UInt32 UnPackCRC;
  32. UInt32 NumUnPackStreams;
  33. }CFolder;
  34. void SzFolderInit(CFolder *folder);
  35. CFileSize SzFolderGetUnPackSize(CFolder *folder);
  36. int SzFolderFindBindPairForInStream(CFolder *folder, UInt32 inStreamIndex);
  37. UInt32 SzFolderGetNumOutStreams(CFolder *folder);
  38. CFileSize SzFolderGetUnPackSize(CFolder *folder);
  39. typedef struct _CArchiveFileTime
  40. {
  41. UInt32 Low;
  42. UInt32 High;
  43. } CArchiveFileTime;
  44. typedef struct _CFileItem
  45. {
  46. CArchiveFileTime LastWriteTime;
  47. /*
  48. CFileSize StartPos;
  49. UInt32 Attributes;
  50. */
  51. CFileSize Size;
  52. UInt32 FileCRC;
  53. char *Name;
  54. Byte IsFileCRCDefined;
  55. Byte HasStream;
  56. Byte IsDirectory;
  57. Byte IsAnti;
  58. Byte IsLastWriteTimeDefined;
  59. /*
  60. int AreAttributesDefined;
  61. int IsLastWriteTimeDefined;
  62. int IsStartPosDefined;
  63. */
  64. }CFileItem;
  65. void SzFileInit(CFileItem *fileItem);
  66. typedef struct _CArchiveDatabase
  67. {
  68. UInt32 NumPackStreams;
  69. CFileSize *PackSizes;
  70. Byte *PackCRCsDefined;
  71. UInt32 *PackCRCs;
  72. UInt32 NumFolders;
  73. CFolder *Folders;
  74. UInt32 NumFiles;
  75. CFileItem *Files;
  76. }CArchiveDatabase;
  77. void SzArchiveDatabaseInit(CArchiveDatabase *db);
  78. void SzArchiveDatabaseFree(CArchiveDatabase *db, void (*freeFunc)(void *));
  79. #endif