-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathUUCompression.h
More file actions
35 lines (28 loc) · 1.01 KB
/
UUCompression.h
File metadata and controls
35 lines (28 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// UUCompression.h
// Useful Utilities - Compression extensions
//
// Smile License:
// You are free to use this code for whatever purposes you desire. The only requirement is that you smile everytime you use it.
//
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSUInteger, UUCompressionAlgorithm)
{
UUCompressionAlgorithmRaw,
UUCompressionAlgorithmZlib,
UUCompressionAlgorithmGZip,
};
typedef NS_ENUM(NSUInteger, UUCompressionLevel)
{
UUCompressionLevelNone = 0,
UUCompressionLevelFastest = 1,
UUCompressionLevelBest = 9,
};
///////////////////////////////////////////////////////////////////////////////////////////////////////////
// Data Compression
@interface NSData (UUDataCompression)
// Performs an in-memory compression of the data using the algorithm specified.
- (NSData*) uuCompress:(UUCompressionAlgorithm)algorithm level:(UUCompressionLevel)level;
// Performs an automatic decompression of the data using automatic algorithm detection.
- (NSData*) uuDecompress;
@end