3 Commits

Author SHA1 Message Date
zher52
a289602590 写文件流方法开放 2021-10-22 17:19:14 +08:00
zher52
6e16750451 写文件流方法开放 2021-10-22 17:09:41 +08:00
Gianluca Bertani
0582706134 Added deprecation to the README. 2019-08-29 07:57:01 +02:00
2 changed files with 14 additions and 6 deletions

View File

@@ -48,8 +48,11 @@
@private
zipFile _zipFile;
}
-(instancetype) initWithZipFileStruct:(zipFile)zipFile fileNameInZip:(NSString *)fileNameInZip;
- (void) writeData:(NSData *)data;
- (void) finishedWriting;
- (BOOL) writeData:(NSData *)data error:(NSError * __autoreleasing *)error;
- (BOOL) finishedWritingWithError:(NSError * __autoreleasing *)error;
@end

View File

@@ -4,6 +4,11 @@ Objective-Zip
=============
## Deprecated
**This library is deprecated.** If you are still using it, you are encouraged to find alternatives.
Introduction
------------
@@ -105,11 +110,11 @@ Objective-Zip supports only traditional PKWare encryption, which is also the
format most widely supported by common unzip utilities.
To add a file with encryption, it is necessary to precompute a CRC32 of
the file being added. This is needed by traditional PKWare encryption
the file being added. This is needed by traditional PKWare encryption
to later verify that the password provided for decryption is correct.
The library includes a handy crc32 method as an NSData category
(automatically imported under the umbrella header):
The library includes a handy crc32 method as an NSData category
(automatically imported under the umbrella header):
```objective-c
NSData *fileData= // Your file data
@@ -136,7 +141,7 @@ NSFileHandle *fileHandle= // Your file handle
uint32_t crc= 0;
do {
// Read a chunk of the file in data buffer
// Read a chunk of the file in data buffer
NSData *data= [fileHandle readDataOfLength:BUFFER_SIZE];
if ([data length] == 0)
break;