CocoaDev

Edit AllPages

As a (small) return to the community, here’s a category that adds bzip2 compression to NSData. It requires adding libbz2.a to the project and uses Objective-C’s modern exception style.

I’ll be adding an NSValueTransformer soon. Done. See BzipValueTransformer � BryanWoods

// NSData+Bzip2.h @interface NSData (Bzip2)

@end

// NSData+Bzip2.m #import “NSData+Bzip2.h” #import “bzlib.h”

@implementation NSData (Bzip2)