@@ -23,10 +23,11 @@ #import "OFIRI.h" #import "OFLHAArchive.h" #import "OFStream.h" #import "OFTarArchive.h" #import "OFZIPArchive.h" +#import "OFZooArchive.h" #import "OFInvalidArgumentException.h" #import "OFOpenItemFailedException.h" @interface OFArchiveIRIHandlerPathAllowedCharacterSet: OFCharacterSet @@ -125,10 +126,25 @@ } else if ([scheme isEqual: @"zip"]) { OFZIPArchive *archive = [OFZIPArchive archiveWithIRI: archiveIRI mode: @"r"]; stream = [archive streamForReadingFile: path]; + } else if ([scheme isEqual: @"zoo"]) { + OFZooArchive *archive = [OFZooArchive archiveWithIRI: archiveIRI + mode: @"r"]; + OFZooArchiveEntry *entry; + + while ((entry = [archive nextEntry]) != nil) { + if ([entry.fileName isEqual: path]) { + stream = [archive streamForReadingCurrentEntry]; + goto end; + } + } + + @throw [OFOpenItemFailedException exceptionWithIRI: IRI + mode: mode + errNo: ENOENT]; } else @throw [OFInvalidArgumentException exception]; end: stream = [stream retain];