| 272 | } |
| 273 | |
| 274 | ZipArchiveStreamEntry* ZipArchiveStreamEntry::Create(ZipArchiveHandle handle, |
| 275 | const ZipEntry& entry) { |
| 276 | ZipArchiveStreamEntry* stream = nullptr; |
| 277 | if (entry.method != kCompressStored) { |
| 278 | stream = new ZipArchiveStreamEntryCompressed(handle); |
| 279 | } else { |
| 280 | stream = new ZipArchiveStreamEntryUncompressed(handle); |
| 281 | } |
| 282 | if (stream && !stream->Init(entry)) { |
| 283 | delete stream; |
| 284 | stream = nullptr; |
| 285 | } |
| 286 | |
| 287 | return stream; |
| 288 | } |
| 289 | |
| 290 | ZipArchiveStreamEntry* ZipArchiveStreamEntry::CreateRaw(ZipArchiveHandle handle, |
| 291 | const ZipEntry& entry) { |