2011-06-02 54 views
5

當我運行我的應用程序我得到這個輸出到控制檯:控制檯輸出說明比特長度溢出

比特長度溢出 碼11個比特7-> 5 代碼16位4-> 5

位長度溢出 碼4個比特6-> 7

比特長度溢出 代碼3個比特6-> 7 代碼爲0的位6-> 7

位長度溢出 代碼16位4-> 5

比特長度溢出 碼4個比特6-> 7 碼5個比特6-> 5 代碼16位4-> 5

比特長度溢出 代碼16位4-> 5

比特長度溢出 碼0位6-> 7

比特長度溢出 代碼11位6-> 7

該應用程序將3個文件壓縮並保存到其文檔文件夾中,並且除了此輸出之外,所有程序都可以正常運行。

更新:

NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 

@try { 
    NSString *docsPath =[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; 
    NSString *filePath = [docsPath stringByAppendingPathComponent:@"ZipTest.zip"]; 
    ZipFile *zipFile = [[ZipFile alloc] initWithFileName:filePath mode:ZipFileModeCreate]; 
    ZipWriteStream *stream; 

    if (self.textSwitch.on) { 
     stream = [zipFile writeFileInZipWithName:@"text.txt" compressionLevel:ZipCompressionLevelBest]; 
    } 
    [zipFile close]; 
    [zipFile release]; 
} 
@catch (ZipException *ze) {} 
@catch (id e) {} 

[pool drain]; 

是什麼意思?

感謝

+0

你能提供更多的上下文嗎?也許分享一些導致這個輸出的代碼? – 2011-06-02 19:03:08

+0

NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; @try NSString * docsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES)lastObject]; NSString * filePath = [docsPath stringByAppendingPathComponent:@「ZipTest.zip」]; ZipFile * zipFile = [[ZipFile alloc] initWithFileName:filePath mode:ZipFileModeCreate]; ZipWriteStream *流; if(self.textSwitch.on){= {zipFile writeFileInZipWithName:@「text.txt」compressionLevel:ZipCompressionLevelBest]; } [zipFile close]; zip文件發佈]; } @catch(ZipException * ze){} @catch(id e){} [pool drain]; – user7865437 2011-06-02 20:04:03

+0

從來沒有想出如何在這裏添加適當的代碼塊...對不起 – user7865437 2011-06-02 20:04:32

回答

1

根據這一Mozilla bug這些都是在調試模式建設ZLIB引起的,是無害的。你可以看看總建築ZLIB的發佈版本。