Permalink
Browse files

Improve README, LICENSE

  • Loading branch information...
1 parent b55eaf6 commit 65a8cdb60920f8ff699017fc2dcd3295f358c011 @pixelglow committed Oct 29, 2012
Showing with 26 additions and 14 deletions.
  1. +1 −0 LICENSE.text
  2. +25 −14 README.markdown
View
@@ -4,6 +4,7 @@ All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
@@ -1,27 +1,30 @@
**zipzap** is a zip file I/O library for Mac OS X and iOS.
-The zip file is an ideal container for compound Objective-C documents. Zip files are widely used and well understood. You can randomly access its parts. The format compresses decently and has extensive operating system and tool support. So we want to make the format an even easier choice for you. Thus, this library features:
+The zip file is an ideal container for compound Objective-C documents. Zip files are widely used and well understood. You can randomly access their parts. The format compresses decently and has extensive operating system and tool support. So we want to make this format an even easier choice for you. Thus, the library features:
-- **Easy-to-use interface**: The public API offers just three classes. Yet you can look through zip files using standard *NSArray* collections and properties. And you can zip, unzip and rezip zip files through standard *NSData*, *NSStream* and Image I/O classes.
-- **Efficient implementation**: We've optimized zip file reading and writing to reduce virtual memory pressure and disk file thrashing. Depending on how your compound document is organized, changing a single entry can be faster than writing the same data to a separate file.
+- **Easy-to-use interface**: The public API offers just three classes! Yet you can look through zip files using familiar *NSArray* collections and properties. And you can zip, unzip and rezip zip files through familiar *NSData*, *NSStream* and Image I/O classes.
+- **Efficient implementation**: We've optimized zip file reading and writing to reduce virtual memory pressure and disk file thrashing. Depending on how your compound document is organized, updating a single entry can be faster than writing the same data to a separate file.
- **File format compatibility**: Since *zipzap* closely follows the [zip file format specification](http://www.pkware.com/documents/casestudies/APPNOTE.TXT), it is works with most Mac, Linux and Windows zip tools.
Install
-------
-As a separate project:
+As an independent project:
-* In the Terminal, type `git clone https://github.com/pixelglow/zipzap.git`.
+* In the Terminal, run `git clone https://github.com/pixelglow/zipzap.git`.
* Within the *zipzap* directory, open the *zipzap.xcodeproj* Xcode project.
* In the Xcode project, select either the *zipzap (OS X)* or the *zipzap (iOS)* scheme from the drop down.
-* You can now build, test (OS X only) or analyze with the selected scheme.
+* You can now build, test (Mac OS X only) or analyze with the selected scheme.
* The built libraries and test cases are in a subdirectory of *~/Library/Developer/Xcode/DerivedData*.
-As a project under your workspace:
+As a project integrated with your own workspace:
-* In the Terminal, type `cd workspace` then `git submodule add https://github.com/pixelglow/zipzap.git`.
+* In the Terminal, run `cd workspace` then `git submodule add https://github.com/pixelglow/zipzap.git`.
* In your Xcode workspace, choose the *File | Add Files to "workspace"* menu item, then within the *zipzap* directory pick the *zipzap.xcodeproj* Xcode project.
-* In any dependent target Build Phases, add *zipzap* as a *Target Dependencies* item and *libzipzap.a* (and any other library noted in the Require Link section below) as one of the *Link Binary with Libraries* item.
+* In any target that uses *zipzap*, under *Build Phases*:
+ * add *zipzap (OS X)* or *zipzap (iOS)* as a *Target Dependencies* item
+ * add the corresponding *libzipzap.a* and any other library listed in the Require Link section below as *Link Binary with Libraries* items.
+* You can now build, test or analyze those targets.
Use
---
@@ -30,7 +33,7 @@ Reading an existing zip file:
ZZArchive* oldArchive = [ZZArchive archiveWithContentsOfURL:[NSURL fileURLWithPath:@"/tmp/old.zip"]];
ZZArchiveEntry* firstArchiveEntry = oldArchive.entries[0];
- NSLog(@"The first entry's uncompressed size is %u bytes.", firstArchiveEntry.uncompressedSize);
+ NSLog(@"The first entry's uncompressed size is %lu bytes.", firstArchiveEntry.uncompressedSize);
NSLog(@"The first entry's data is: %@.", firstArchiveEntry.data);
Writing a new zip file:
@@ -45,22 +48,30 @@ Writing a new zip file:
Updating an existing zip file:
- ZZMutableArchive* oldArchve = [ZZArchive archiveWithContentsOfURL:[NSURL fileURLWithPath:@"/tmp/old.zip"]];
+ ZZMutableArchive* oldArchive = [ZZArchive archiveWithContentsOfURL:[NSURL fileURLWithPath:@"/tmp/old.zip"]];
oldArchive.entries = [oldArchive.entries arrayByAddingObject:
[ZZArchiveEntry archiveEntryWithFileName:@"second.text"
compress:YES
dataBlock:^{ return [@"bye, world" dataUsingEncoding:NSUTF8StringEncoding]; }]
];
-
Require
-------
* **Build**: Xcode 4.4 and later.
-* **Link**: *ApplicationServices.framework* (Mac OS X) or *ImageIO.framework* (iOS), *Foundation.framework* and *libz.dylib* system libraries. No third-party libraries needed.
+* **Link**: Only system libraries; no third-party libraries needed.
+ * *ApplicationServices.framework* (Mac OS X) or *ImageIO.framework* (iOS)
+ * *Foundation.framework*
+ * *libz.dylib*
* **Run**: Mac OS X 10.7 (Lion) or iOS 4.0 and later.
+Support
+-------
+
+* Follow us on Twitter: [@pixelglow](http://twitter.com/pixelglow).
+* Raise an issue on [zipzap issues](https://github.com/pixelglow/zipzap/issues).
+
License
-------
-*zipzap* is licensed with a BSD license.
+*zipzap* is licensed with the BSD license.

0 comments on commit 65a8cdb

Please sign in to comment.