Both formats have had two binary treatments rather than one. First they were archived into tar format and then zipped into gz or z format. So for the second case you still need to unzip from z format first but moreover you then need to extract the human-readable file(s) from the resulting tar file using Archive::Tar just as you did in the .gz case where you performed both translations correctly.