common api for ruby tgz, zip