2014-04-02 16:56:35 +00:00
|
|
|
NSString *text = @"TOBEORNOTTOBEORTOBEORNOT";
|
2013-04-10 22:43:41 -07:00
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
2014-04-02 16:56:35 +00:00
|
|
|
@autoreleasepool {
|
2013-04-10 22:43:41 -07:00
|
|
|
|
2014-04-02 16:56:35 +00:00
|
|
|
NSMutableArray *array = [[NSMutableArray alloc] init];
|
|
|
|
|
LZWCompressor *lzw = [[LZWCompressor alloc]
|
|
|
|
|
initWithArray: array ];
|
|
|
|
|
if ( lzw )
|
|
|
|
|
{
|
|
|
|
|
[lzw compressData: [text dataUsingEncoding: NSUTF8StringEncoding]];
|
|
|
|
|
for ( id obj in array )
|
|
|
|
|
{
|
|
|
|
|
printf("%u\n", [obj unsignedIntValue]);
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-04-10 22:43:41 -07:00
|
|
|
|
2014-04-02 16:56:35 +00:00
|
|
|
}
|
2013-04-10 22:43:41 -07:00
|
|
|
return EXIT_SUCCESS;
|
|
|
|
|
}
|