ios - Objective-C weird unzip behaviour results in corrupt files -


i'm getting obscure issue. if zip on mavericks (right click -> compress), can unzipped on mac, windows , linux, works fine , files present.

when unzip using "ziparchive" or "ssziparchive" on ios device, same file corrupt.

if zip file through terminal can unzipped fine on the ios device.

the file in question small 50kb video. have tried setting different flags see if can recreate issue through terminal find out flag causing issue, , can't find cause.

i have zipped file max compression , min compression see if that's cause , have tested zip file see if it's corrupt or has hidden characters.

to make weirder these zips hold around 50 video files each , have around 23 zips. unzip code has been working until 2 weeks ago. on last 2 weeks have found 7 corrupt files, , corruption consistent - same files corrupt.

the corrupted file few kb smaller working one, can't opened or forced play.

they zipped using mavericks, , nothing has changed.

the issue has become more fact-finding, can zip files through terminal know causes issue, can steer away in future.

thanks

the right-click -> compress option on osx creates zip file containing directory called __macosx, contain metadata used finder (image thumbnails , other things). see this superuser question more detailed explanation. reason folder exists because original mac os implemented concept of resource fork - way of storing structured data particular file/directory alongside unstructured data, can accessed executables- wikipedia article here (also referenced in su question)

ios doesn't understand structure unzip fails.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -