7zItem.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. /* #define CArchiveFileTime UInt64 */
  40. typedef struct _CFileItem
  41. {
  42. /*
  43. CArchiveFileTime LastWriteTime;
  44. CFileSize StartPos;
  45. UInt32 Attributes;
  46. */
  47. CFileSize Size;
  48. UInt32 FileCRC;
  49. char *Name;
  50. Byte IsFileCRCDefined;
  51. Byte HasStream;
  52. Byte IsDirectory;
  53. Byte IsAnti;
  54. /*
  55. int AreAttributesDefined;
  56. int IsLastWriteTimeDefined;
  57. int IsStartPosDefined;
  58. */
  59. }CFileItem;
  60. void SzFileInit(CFileItem *fileItem);
  61. typedef struct _CArchiveDatabase
  62. {
  63. UInt32 NumPackStreams;
  64. CFileSize *PackSizes;
  65. Byte *PackCRCsDefined;
  66. UInt32 *PackCRCs;
  67. UInt32 NumFolders;
  68. CFolder *Folders;
  69. UInt32 NumFiles;
  70. CFileItem *Files;
  71. }CArchiveDatabase;
  72. void SzArchiveDatabaseInit(CArchiveDatabase *db);
  73. void SzArchiveDatabaseFree(CArchiveDatabase *db, void (*freeFunc)(void *));
  74. #endif