From 0148dc65ef8ca6d4b6955b62a0ec15b5205b986d Mon Sep 17 00:00:00 2001 From: Gianluca Bertani Date: Sun, 23 Jun 2013 14:14:03 +0200 Subject: [PATCH] Fixed test 2 to zip & unzip up to 6.3 GB --- Classes/Objective_ZipViewController.m | 7 ++++--- Objective_ZipViewController.xib | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Classes/Objective_ZipViewController.m b/Classes/Objective_ZipViewController.m index 3c30fd8..efab515 100644 --- a/Classes/Objective_ZipViewController.m +++ b/Classes/Objective_ZipViewController.m @@ -39,7 +39,7 @@ #import "../Objective-Zip/ZipReadStream.h" #define HUGE_TEST_BLOCK_LENGTH (63000) -#define HUGE_TEST_NUMBER_OF_BLOCKS (68149) +#define HUGE_TEST_NUMBER_OF_BLOCKS (100000) @implementation Objective_ZipViewController @@ -103,7 +103,8 @@ [self performSelectorOnMainThread:@selector(log:) withObject:@"Test 1: adding second file..." waitUntilDone:YES]; - ZipWriteStream *stream2= [zipFile writeFileInZipWithName:@"x/y/z/xyz.txt" compressionLevel:ZipCompressionLevelNone]; + NSString *file2name= @"x/y/z/xyz.txt"; + ZipWriteStream *stream2= [zipFile writeFileInZipWithName:file2name compressionLevel:ZipCompressionLevelNone]; [self performSelectorOnMainThread:@selector(log:) withObject:@"Test 1: writing to second file's stream..." waitUntilDone:YES]; @@ -159,7 +160,7 @@ [self performSelectorOnMainThread:@selector(log:) withObject:@"Test 1: opening second file..." waitUntilDone:YES]; - [unzipFile goToNextFileInZip]; + [unzipFile locateFileInZip:file2name]; ZipReadStream *read2= [unzipFile readCurrentFileInZip]; [self performSelectorOnMainThread:@selector(log:) withObject:@"Test 1: reading from second file's stream..." waitUntilDone:YES]; diff --git a/Objective_ZipViewController.xib b/Objective_ZipViewController.xib index 033fcc9..3ccce70 100644 --- a/Objective_ZipViewController.xib +++ b/Objective_ZipViewController.xib @@ -109,7 +109,7 @@ 0 0 1 - 4 GB Zip & Unzip (use with caution) + 6.3 GB Zip & Unzip (use with caution) 1