diff options
author | thomasvl <thomasvl@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2008-02-01 20:16:57 +0000 |
---|---|---|
committer | thomasvl <thomasvl@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2008-02-01 20:16:57 +0000 |
commit | b3086cfd9aead0b2900c2d942b289957837286ab (patch) | |
tree | fde59e078122ee0edb021267088c8084314a07ce /Foundation/GTMNSData+zlib.m | |
parent | 62301a30a8b6e9b71d3549178f89d62c8c3c7d48 (diff) |
- Fixed up the prefix header of the project and prefix handing in the Unittest
Xcode Config. (thanks schafdog)
- Fixed error in handling default compression for NSData+zlib
- Changed name on API in NSString+XML and added another api to make this a
litte more clear. (thanks Kent)
Diffstat (limited to 'Foundation/GTMNSData+zlib.m')
-rw-r--r-- | Foundation/GTMNSData+zlib.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Foundation/GTMNSData+zlib.m b/Foundation/GTMNSData+zlib.m index 89a906a..be84114 100644 --- a/Foundation/GTMNSData+zlib.m +++ b/Foundation/GTMNSData+zlib.m @@ -35,7 +35,10 @@ useGzip:(BOOL)useGzip { if (!bytes || !length) return nil; - if (level < Z_BEST_SPEED) + if (level == Z_DEFAULT_COMPRESSION) { + // the default value is actually outside the range, so we have to let it + // through specifically. + } else if (level < Z_BEST_SPEED) level = Z_BEST_SPEED; else if (level > Z_BEST_COMPRESSION) level = Z_BEST_COMPRESSION; |