어떻게 iOS 앱의 sqlite 데이터베이스를 압축 할 수 있습니까? 왜냐하면 나는 그것을 구름과 함께 가라 앉히려고하지만 약간의 문제가있는 메신저 ...
내가 지퍼로 사용하기 위해 어떤 수업을해야합니까? 제발 도와주세요!
어떻게 iOS 앱의 sqlite 데이터베이스를 압축 할 수 있습니까? 왜냐하면 나는 그것을 구름과 함께 가라 앉히려고하지만 약간의 문제가있는 메신저 ...
내가 지퍼로 사용하기 위해 어떤 수업을해야합니까? 제발 도와주세요!
당신은 ZipArchive, 자사의 목표 C 래퍼를 사용할 수 있습니다 - 우편 번호에 대한 http://code.google.com/p/ziparchive/
: - 특별히
NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString* dPath = [paths objectAtIndex:0];
NSString* txtfile = [dPath stringByAppendingPathComponent:@"test.txt"];
NSString* zipfile = [dPath stringByAppendingPathComponent:@"test.zip"];
ZipArchive* zip = [[ZipArchive alloc] init];
BOOL ret = [zip CreateZipFile2:zipfile];
ret = [zip addFileToZip:txtfile newname:@"test.txt"];//zip
if(![zip CloseZipFile2])
{
zipfile = @"";
}
[zip release];
NSLog(@"The file has been zipped");
당신은에서 확인할 수있다 Zlib을 사용할 수 있습니다 : 압축 풀기/압축하기 http://code.google.com/p/objective-zip/
구체적으로 어떻게 압축 할 수 있습니까? .sqlite 아카이브? 어떻게 접근 할 수 있습니까? – JRafaelM
db 파일의 경로를 모르십니까? – saadnib
그것은 애플 리케이션의 자원에 있지만, 나는 IOS가 너무 릴 잃어버린 그래서 아카이브에 근무 ... – JRafaelM