aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toys/posix/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toys/posix/file.c b/toys/posix/file.c
index c7c72cd1..e52e884f 100644
--- a/toys/posix/file.c
+++ b/toys/posix/file.c
@@ -251,7 +251,8 @@ static void do_regular_file(int fd, char *name, struct stat *sb)
xputc('\n');
} else if (len>4 && strstart(&s, "BZh") && isdigit(*s)) {
xprintf("bzip2 compressed data, block size = %c00k\n", *s);
- } else {
+ } else if (len>10 && strstart(&s, "\x1f\x8b")) xputs("gzip compressed data");
+ else {
char *what = 0;
int i, bytes;