Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
737 views
in Technique[技术] by (71.8m points)

objective c - How can I compress data using Zlib, without directly using zlib.dylib?

Is there a class that allows compressing data using Zlib, or is using zlib.dylib directly the only possibility I have?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

NSData+Compression is an easy to use NSData category implementation.

Usage:

NSData* compressed = [myData zlibDeflate];
NSData* originalData = [compressed zlibInflate];

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...