In Objective-C, how to read the contents of several files packed inside a ZIP archive, into an NSString variable -


in objective-c (for ios), there way read files inside zip archive memory?

so, each file inside zip text file. , need iterate through files inside zip archive until locate 1 need name, , read contents (which text data) nsstring variable.

is possible zlib? can't see in header of library perform such task, reading files inside zip archive.

also other libraries checked on interent seem decompress directory only, but, need read contents of files inside zip archive nsstring variable only.

thanks

you can using zipzap library:

zzarchive* archive = [zzarchive archivewithcontentsofurl:zipfileurl]; nsstring* foundcontent = nil; (zzarchiveentry* entry in archive.entries)   if ([entry.filename isequaltostring:filenametofind])     foundcontent = [[nsstring alloc] initwithdata:entry.data                                          encoding:nsutf8stringencoding]; 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -