Differences From Artifact [6b61a92ffe]:
- File src/OFZIPArchive.m — part of check-in [2a2e17d8d0] at 2016-05-06 20:39:56 on branch trunk — Enable -Wsign-compare (user: js, size: 13842) [annotate] [blame] [check-ins using]
To Artifact [5b4c2f9e03]:
- File
src/OFZIPArchive.m
— part of check-in
[080eb2f31b]
at
2016-05-22 13:45:37
on branch trunk
— Build OFZIPArchive even with --disable-files
OFZIPArchive only needs an OFSeekableStream. (user: js, size: 13899) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
20 21 22 23 24 25 26 | #import "OFZIPArchive.h" #import "OFZIPArchiveEntry.h" #import "OFZIPArchiveEntry+Private.h" #import "OFDataArray.h" #import "OFArray.h" #import "OFDictionary.h" | > > | > < | 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 | #import "OFZIPArchive.h" #import "OFZIPArchiveEntry.h" #import "OFZIPArchiveEntry+Private.h" #import "OFDataArray.h" #import "OFArray.h" #import "OFDictionary.h" #import "OFSeekableStream.h" #ifdef OF_HAVE_FILES # import "OFFile.h" #endif #import "OFInflateStream.h" #import "OFInflate64Stream.h" #import "crc32.h" #import "OFChecksumFailedException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFNotImplementedException.h" #import "OFOpenItemFailedException.h" #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFSeekFailedException.h" #import "OFUnsupportedVersionException.h" /* * FIXME: Current limitations: * - Split archives are not supported. * - Write support is missing. * - Encrypted files cannot be read. */ @interface OFZIPArchive () - (void)OF_readZIPInfo; - (void)OF_readEntries; @end |
︙ | ︙ | |||
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | @synthesize archiveComment = _archiveComment; + (instancetype)archiveWithSeekableStream: (OFSeekableStream*)stream { return [[[self alloc] initWithSeekableStream: stream] autorelease]; } + (instancetype)archiveWithPath: (OFString*)path { return [[[self alloc] initWithPath: path] autorelease]; } - init { OF_INVALID_INIT_METHOD } - initWithSeekableStream: (OFSeekableStream*)stream | > > | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | @synthesize archiveComment = _archiveComment; + (instancetype)archiveWithSeekableStream: (OFSeekableStream*)stream { return [[[self alloc] initWithSeekableStream: stream] autorelease]; } #ifdef OF_HAVE_FILES + (instancetype)archiveWithPath: (OFString*)path { return [[[self alloc] initWithPath: path] autorelease]; } #endif - init { OF_INVALID_INIT_METHOD } - initWithSeekableStream: (OFSeekableStream*)stream |
︙ | ︙ | |||
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | [self release]; @throw e; } return self; } - initWithPath: (OFString*)path { self = [super init]; @try { _stream = [[OFFile alloc] initWithPath: path mode: @"rb"]; [self OF_readZIPInfo]; [self OF_readEntries]; } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [_stream release]; [_archiveComment release]; [_entries release]; [_pathToEntryMap release]; | > > | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | [self release]; @throw e; } return self; } #ifdef OF_HAVE_FILES - initWithPath: (OFString*)path { self = [super init]; @try { _stream = [[OFFile alloc] initWithPath: path mode: @"rb"]; [self OF_readZIPInfo]; [self OF_readEntries]; } @catch (id e) { [self release]; @throw e; } return self; } #endif - (void)dealloc { [_stream release]; [_archiveComment release]; [_entries release]; [_pathToEntryMap release]; |
︙ | ︙ |