RNHeatshrinkEncoder *encoder = [[RNHeatshrinkEncoder alloc] initWithWindowSize:8 andLookaheadSize:4];
NSData *testData = [@"ABCABCABCABCABCABC" dataUsingEncoding:NSUTF8StringEncoding];
NSData *encodedData = [encoder encodeData: testData];
RNHeatshrinkDecoder *decoder = [[RNHeatshrinkDecoder alloc] initWithWindowSize:8 andLookaheadSize:4];
NSData *decodedData = [decoder decodeData:encodedData];
expect(encodedData.length).to.beLessThan(testData.length);
expect(decodedData).to.equal(testData);
heatshrink-objc is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'heatshrink-objc'
nobre84, nobre84@gmail.com
heatshrink-objc is available under the MIT license. See the LICENSE file for more info.