NSData(SFPackedBits) Category Reference
95 |Declared in | 102 |NSData+SFPackedBits.h NSData+SFPackedBits.m |
103 |
Tasks
114 | 115 | 116 | 117 | 118 | 119 |-
120 |
-
121 |
122 |
– sfPackedBitsDescription
123 |Takes packedBits data and prints out a description of the packed contents by 124 | running the decode operation and explaining via NSLog how the data is being 125 | decoded. Useful for checking that packedBits data is correct.
126 | 127 | 128 | 129 | -
130 |
131 |
– sfPackedBitsForRange:skip:
132 |A special version of packedBits which will take the data and pack every nth 133 | value.
134 | 135 | 136 | 137 |
138 |
Instance Methods
153 | 154 |sfPackedBitsDescription
157 | 158 | 159 | 160 |Takes packedBits data and prints out a description of the packed contents by 162 | running the decode operation and explaining via NSLog how the data is being 163 | decoded. Useful for checking that packedBits data is correct.
164 |- (NSString *)sfPackedBitsDescription
Discussion
180 |Takes packedBits data and prints out a description of the packed contents by 181 | running the decode operation and explaining via NSLog how the data is being 182 | decoded. Useful for checking that packedBits data is correct.
183 |Declared In
193 |NSData+SFPackedBits.h
194 |
sfPackedBitsForRange:skip:
202 | 203 | 204 | 205 |A special version of packedBits which will take the data and pack every nth 207 | value.
208 |- (NSData *)sfPackedBitsForRange:(NSRange)range skip:(int)skip
Parameters
218 | 219 |-
220 |
- skip: 221 |
The number of bytes to advance as the data is encoded. Skip = 1 will 222 | encode every byte, skip = 4 will encode every fourth byte, and so on.
223 |
-
226 |
- range: 227 |
The range within the data object that should be encoded. Useful 228 | for specifying a non-zero starting offset to get a certain channel encoded.
229 |
Discussion
241 |A special version of packedBits which will take the data and pack every nth 242 | value.
243 | 244 |This is important for PSDWriter because it’s necessary to encode R, then G, 245 | then B, then A data – so we essentially start at offset 0, skip 4, then do offset 1, 246 | skip 4, etc… to compress the data with very minimal memory footprint.
247 | 248 |For normal packbits just to skip = 1
249 |Declared In
259 |NSData+SFPackedBits.h
260 |