Sample code for 30+ languages & platforms
Lua

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 Lua Downloads

Lua
local chilkat = require("chilkat")

local gzip = chilkat.Gzip.new()

local success = gzip:uncompress_file("qa_data/tar/test.tgz", "qa_output/test.tar")
if not success then
    print(gzip.last_error_text)
else
    print("success.")
end