|
|
|
|
143
|
- (void)writeEncodeChunk:(NSString *) chunk {
|
143
|
- (void)writeEncodeChunk:(NSString *) chunk {
|
144
|
NSMutableData * decodedData = [NSData alloc];
|
144
|
NSMutableData * decodedData = [NSData alloc];
|
145
|
if([[self.encoding lowercaseString] isEqualToString:@"base64"]) {
|
145
|
if([[self.encoding lowercaseString] isEqualToString:@"base64"]) {
|
146
|
- decodedData = [chunk dataUsingEncoding:NSUTF8StringEncoding];
|
|
|
|
|
146
|
+ decodedData = [[NSData alloc] initWithBase64EncodedData:chunk options:0];
|
147
|
}
|
147
|
}
|
148
|
if([[self.encoding lowercaseString] isEqualToString:@"utf8"]) {
|
148
|
if([[self.encoding lowercaseString] isEqualToString:@"utf8"]) {
|
149
|
decodedData = [chunk dataUsingEncoding:NSUTF8StringEncoding];
|
149
|
decodedData = [chunk dataUsingEncoding:NSUTF8StringEncoding];
|