summaryrefslogtreecommitdiff
path: root/sys/src
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@centraldogma>2011-10-16 00:45:08 +0200
committercinap_lenrek <cinap_lenrek@centraldogma>2011-10-16 00:45:08 +0200
commit403dee333ec4f07fd27b8173d3425fee1be297cd (patch)
treeb6b3c01733782eef2962793a837ca1bda51b3d45 /sys/src
parenta7768bd61fc9cddd7648b672a3150dc0fd8d186d (diff)
file: recognize zlib compression
Diffstat (limited to 'sys/src')
-rw-r--r--sys/src/cmd/file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/src/cmd/file.c b/sys/src/cmd/file.c
index 9a1c904e7..ba530defc 100644
--- a/sys/src/cmd/file.c
+++ b/sys/src/cmd/file.c
@@ -1180,6 +1180,9 @@ ismung(void)
if(buf[0]=='B' && buf[1]=='Z' && buf[2]=='h')
print(mime ? "application/x-bzip2" : "bzip2 compressed\n");
else
+ if(buf[0]==0x78 && buf[1]==0x9c)
+ print(mime ? "application/x-deflate" : "zlib compressed\n");
+ else
print(mime ? OCTET : "encrypted\n");
return 1;
}