Differences From Artifact [e88e9d721e]:
- File
src/OFZIPArchive.h
— part of check-in
[19bbbbd95d]
at
2022-10-04 21:33:53
on branch trunk
— Add +[OFZIPArchive URIForFile:inArchive:]
This allows constructing a URI to access a file within an archive. (user: js, size: 6416) [annotate] [blame] [check-ins using]
To Artifact [2297e4dbb2]:
- File
src/OFZIPArchive.h
— part of check-in
[6527c97d03]
at
2022-10-09 16:19:17
on branch trunk
— OFZIPArchive: Make returned streams retain archive
In order to not create a retain cycle, this changes the reference to the
last returned stream to an unsafe unretained one that the stream itself
needs to reset to nil in its dealloc.Since when closing a stream for writing the archive needs to be updated,
the code for that was moved out of OFZIPArchive and into the stream
writer, since it now has a reference to the archive anyway. (user: js, size: 6505) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | * * @brief A class for accessing and manipulating ZIP files. */ OF_SUBCLASSING_RESTRICTED @interface OFZIPArchive: OFObject { OFStream *_stream; int64_t _offset; uint_least8_t _mode; uint32_t _diskNumber, _centralDirectoryDisk; uint64_t _centralDirectoryEntriesInDisk, _centralDirectoryEntries; uint64_t _centralDirectorySize; int64_t _centralDirectoryOffset; OFString *_Nullable _archiveComment; OFMutableArray OF_GENERIC(OFZIPArchiveEntry *) *_entries; OFMutableDictionary OF_GENERIC(OFString *, OFZIPArchiveEntry *) *_pathToEntryMap; OFStream *_Nullable _lastReturnedStream; } /** | > > > > > > > | 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 | * * @brief A class for accessing and manipulating ZIP files. */ OF_SUBCLASSING_RESTRICTED @interface OFZIPArchive: OFObject { OFStream *_stream; #ifdef OF_ZIP_ARCHIVE_M @public #endif int64_t _offset; @protected uint_least8_t _mode; uint32_t _diskNumber, _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; } /** |
︙ | ︙ |