Sample code for 30+ languages & platforms
Objective-C

UnGzip .tgz to get a .tar

See more Tar Archive Examples

A .tgz is simply a TAR archive compressed using GZip. It is also commonly referred to as a .tar.gz. Chilkat GZip can be used to ungzip to get an uncompressed .tar.

Chilkat Objective-C Downloads

Objective-C
#import <CkoGzip.h>

BOOL success = NO;

CkoGzip *gzip = [[CkoGzip alloc] init];

success = [gzip UncompressFile: @"qa_data/tar/test.tgz" destPath: @"qa_output/test.tar"];
if (success != YES) {
    NSLog(@"%@",gzip.LastErrorText);
}
else {
    NSLog(@"%@",@"success.");
}