I don't think trying to use any form of compression will be effective, or even an improvement at all at this scale, because all compression algorithms work best when they have a lot of data to work with, and hence many duplicates and patterns to find. When your entire data size is 130 bytes, any form of zip compression isn't really a viable option.
If your dictionary will only contain property-list values (arrays, dictionaries, strings, numbers), then you can use JSON serialisation instead of NSKeyedArchiver
:
NSData *JSONData = [NSJSONSerialization dataWithJSONObject:anObject
options:0
error:nil];
This immediately makes the output data much shorter in your case:
NSDictionary *aDict = @{ @"Value1": @"sadsadasdasdsadqwwqsadasd",
@"Value2": @"10",
@"Value3": @"12" };
NSData *aData = [NSKeyedArchiver archivedDataWithRootObject:aDict];
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:aDict
options:0
error:nil];
NSLog(@"NSKeyedArchiver Data Size = %@, JSON Data Size = %@",
[NSByteCountFormatter stringFromByteCount:aData.length
countStyle:NSByteCountFormatterCountStyleFile],
[NSByteCountFormatter stringFromByteCount:jsonData.length
countStyle:NSByteCountFormatterCountStyleFile]
);
NSKeyedArchiver Data Size = 380 bytes, JSON Data Size = 66 bytes
As you can see, the JSON serialised data is almost 6 times smaller than the NSKeyedArchiver
serialised data, and fits easily in your 130 byte limit. And the best thing is, it's only one line of code.
UPDATE: Just to rub it in some more :), here is the data that NSKeyedArchiver
produces (added as image because it contains a lot of "illegal" characters that I couldn't copy and paste):

As you can see, it contains a lot of useless data that you don't really need (highlighted blue), that's basically just to give NSKeyedUnarchiver
enough information to be able to unarchive it later.
Now, let's look at the JSON data:
{"Value3":"12","Value2":"10","Value1":"sadsadasdasdsadqwwqsadasd"}
That's it. One line. 66 bytes. Of those, 19 bytes aren't your values. In other words, 71% of that JSON data is your values, and the rest is markup, so to speak. Meanwhile, in the NSKeyedArchiver
data, your values make up, wait for it, 12% of the result. I think you can clearly see which one is more efficient for storage here.