Sample Header Ad - 728x90

Archive Utility can't open some gzipped text files based on their contents

18 votes
3 answers
23017 views
In macOS 10.15.4, Archive Utility is able to open some gzipped ASCII text files but not others, depending on the contents of the text file. For example, this works: % echo "abc e" | gzip > ok.txt.gz; open ok.txt.gz But this fails: % echo "abcde" | gzip > bad.txt.gz; open bad.txt.gz The second example shows an error in Archive Utility: "Unable to expand 'bad.txt.gz' into 'folder'. (Error 79 - Inappropriate file type or format.)" Error message showing I'm trying to figure out: 1. Is this a bug in Archive Utility, or am I somehow misusing the gzip format? 2. Assuming it's a bug, what *is* the bug? Which files are allowed and which aren't? Why I believe this is specific to Archive Utility on 10.15: - 10.14 and 10.13 don't seem to have this problem; the files open normally. - The bytes of the gzip files created on 10.15 seem to match ones created elsewhere, and open normally with gunzip on 10.15. Text file contents that work or don't work: - Text files without spaces don't work, such as "abcdefghijklmnopqrstuvwxyz" - Text files with spaces at the end don't work, such as "abcdefghijklmnopqrstuvwxyz " - Text files with internal spaces do work, such as "abcdefghijklmnopqrstuvwxy z" - Text files without spaces but shorter than five characters do work, such as "abcd" What could be going on?
Asked by Jack Cushman (621 rep)
Apr 18, 2020, 06:39 PM
Last activity: Sep 16, 2021, 04:28 PM