tcguo / ios-bsdiff

bsdiff and bspatch are libraries for build and applying patches to binary files. Apply binary diffs created using bsdiff to NSData objects with this handy category.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bsdiff

This project is a copy of Colin Percival's binary diff/patch with an Xcode project. The project includes a new nsdata category, which performs a binary search and replace.

This is bsdiff-4.3 from #Dependencies bdiff requires libbz2 to compress its diffs

#Use

@interface NSData (bsdiff)

// original c method
+ (BOOL)createDiffWithOldFile:(NSString *)oldFile newFile:(NSString *)newFile patchFile:(NSString *)patchFile;
+ (BOOL)applyWithOldFile:(NSString *)oldFile patchFile:(NSString *)patchFile newFile:(NSString *)newFile;


- (NSData *)diff:(NSData *)data;
+ (NSData *)dataWithData:(NSData *)data andPatch:(NSData *)patch;
- (NSData *)patch:(NSData *)patch;

@end

About

bsdiff and bspatch are libraries for build and applying patches to binary files. Apply binary diffs created using bsdiff to NSData objects with this handy category.


Languages

Language:C 62.0%Language:Objective-C 38.0%