LZCompression 1.1.0

LZCompression 1.1.0

TestsTested
LangLanguage Obj-CObjective C
License Apache 2
ReleasedLast Release Dec 2015

Maintained by Kingsley Blatter, Carl Ansley, Bob Wieler.



  • By
  • bobwieler

An Objective-C implementation of lz-string for Javascript http://pieroxy.net/blog/pages/lz-string/index.html

Installation

Manual Installation

Add the NZString+LZCompression.h and NZString+LZCompression.m files to your project to use the new LZCompression category on NSString.

Usage

Text can be compressed to UTF16 only characters by using the compressLZToUTF16 method instead of the regular compressLZ method.

NSString *input = @"String that should be compressed";
NSString *lzCompressedInput = [input compressLZ];
NSString *lzCompressedUTF16Input = [input compressLZToUTF16];

NSString *output = [lzCompressedInput decompressLZ];
NSString *outputFromUTF16 = [lzCompressedUTF16Input decompressLZFromUTF16];