From b3086cfd9aead0b2900c2d942b289957837286ab Mon Sep 17 00:00:00 2001 From: thomasvl Date: Fri, 1 Feb 2008 20:16:57 +0000 Subject: - 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) --- Foundation/GTMNSData+zlib.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Foundation/GTMNSData+zlib.m') 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; -- cgit v1.2.3