From bb780d06d34ae7528d4bc5cd39985c1476cc59eb Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Thu, 5 Mar 2009 22:40:28 +0000 Subject: [PATCH] =?utf8?q?add=20xz=20compression.=20From:=20=3D=3FISO-8859?= =?utf8?q?-1=3FQ=3FAnders=5FF=5FBj=3DF6rklund=3F=3D=20?= --- magic/Magdir/compress | 3 +++ src/compress.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/magic/Magdir/compress b/magic/Magdir/compress index 5cbb1c87..c247acff 100644 --- a/magic/Magdir/compress +++ b/magic/Magdir/compress @@ -195,6 +195,9 @@ # bug #364260) #0 string ]\000\000\200\000 LZMA compressed data +# http://tukaani.org/xz/xz-file-format.txt +0 ustring \xFD7zXZ\x00 xz compressed data + # AFX compressed files (Wolfram Kleff) 2 string -afx- AFX compressed file data diff --git a/src/compress.c b/src/compress.c index 0c2539d2..ae6b5421 100644 --- a/src/compress.c +++ b/src/compress.c @@ -35,7 +35,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: compress.c,v 1.60 2008/11/27 22:16:54 christos Exp $") +FILE_RCSID("@(#)$File: compress.c,v 1.61 2009/02/03 20:27:51 christos Exp $") #endif #include "magic.h" @@ -76,6 +76,7 @@ private const struct { /* ...only first file examined */ { "BZh", 3, { "bzip2", "-cd", NULL }, 1 }, /* bzip2-ed */ { "LZIP", 4, { "lzip", "-cdq", NULL }, 1 }, + { "\3757zXZ\0",6,{ "xz", "-cd", NULL }, 1 }, /* XZ Utils */ }; private size_t ncompr = sizeof(compr) / sizeof(compr[0]); -- 2.40.0