Differences From Artifact [82b11667ec]:
- File src/OFZIPArchive.h — part of check-in [89a51dab69] at 2023-03-18 22:43:20 on branch trunk — OFZIPArchive: Only use data descriptor if needed (user: js, size: 7844) [annotate] [blame] [check-ins using] [more...]
To Artifact [11e4bf42cf]:
- File
src/OFZIPArchive.h
— part of check-in
[630ea6bc5a]
at
2023-07-23 23:35:08
on branch trunk
— OFZIPArchive: Initial support for split archives
This cannot yet extract a file from the archive if the file spans
multiple parts. However, for a multipart archive with multiple files,
all files that only span a single part can be extracted. (user: js, size: 8844) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #import "OFZIPArchiveEntry.h" OF_ASSUME_NONNULL_BEGIN @class OFArray OF_GENERIC(ObjectType); @class OFMutableArray OF_GENERIC(ObjectType); @class OFMutableDictionary OF_GENERIC(KeyType, ObjectType); @class OFStream; /** * @class OFZIPArchive OFZIPArchive.h ObjFW/OFZIPArchive.h * * @brief A class for accessing and manipulating ZIP files. */ OF_SUBCLASSING_RESTRICTED @interface OFZIPArchive: OFObject { OF_KINDOF(OFStream *) _stream; #ifdef OF_ZIP_ARCHIVE_M @public #endif int64_t _offset; @protected uint_least8_t _mode; | > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | #import "OFZIPArchiveEntry.h" OF_ASSUME_NONNULL_BEGIN @class OFArray OF_GENERIC(ObjectType); @class OFMutableArray OF_GENERIC(ObjectType); @class OFMutableDictionary OF_GENERIC(KeyType, ObjectType); @class OFSeekableStream; @class OFStream; @class OFZIPArchive; /** * @protocol OFZIPArchiveDelegate OFZIPArchive.h ObjFW/OFZIPArchive.h * * @brief A delegate for OFZIPArchive. */ @protocol OFZIPArchiveDelegate <OFObject> @optional /** * @brief A callback that is called when an @ref OFZIPArchive wants to read a * different archive part. * * @param archive The archive that wants to read another part * @param partNumber The number of the part the archive wants to read * @param totalNumber The total number of parts of the archive * @return The stream to read the needed part, or `nil` if no such part exists */ - (nullable OFSeekableStream *)archive: (OFZIPArchive *)archive wantsPartNumbered: (unsigned int)partNumber totalNumberOfParts: (unsigned int)totalNumber; @end /** * @class OFZIPArchive OFZIPArchive.h ObjFW/OFZIPArchive.h * * @brief A class for accessing and manipulating ZIP files. */ OF_SUBCLASSING_RESTRICTED @interface OFZIPArchive: OFObject { OFObject <OFZIPArchiveDelegate> *_Nullable _delegate; OF_KINDOF(OFStream *) _stream; #ifdef OF_ZIP_ARCHIVE_M @public #endif int64_t _offset; @protected uint_least8_t _mode; uint32_t _diskNumber, _numDisks, _centralDirectoryDisk; uint64_t _centralDirectoryEntriesInDisk, _centralDirectoryEntries; uint64_t _centralDirectorySize; int64_t _centralDirectoryOffset; OFString *_Nullable _archiveComment; #ifdef OF_ZIP_ARCHIVE_M @public #endif OFMutableArray OF_GENERIC(OFZIPArchiveEntry *) *_entries; OFMutableDictionary OF_GENERIC(OFString *, OFZIPArchiveEntry *) *_pathToEntryMap; OFStream *_Nullable _lastReturnedStream; } /** * @brief The delegate of the ZIP archive. */ @property OF_NULLABLE_PROPERTY (assign, nonatomic) OFObject <OFZIPArchiveDelegate> *delegate; /** * @brief The archive comment. */ @property OF_NULLABLE_PROPERTY (copy, nonatomic) OFString *archiveComment; /** * @brief The entries in the central directory of the archive as an array of |
︙ | ︙ |