]> granicus.if.org Git - file/commitdiff
add xz compression.
authorChristos Zoulas <christos@zoulas.com>
Thu, 5 Mar 2009 22:40:28 +0000 (22:40 +0000)
committerChristos Zoulas <christos@zoulas.com>
Thu, 5 Mar 2009 22:40:28 +0000 (22:40 +0000)
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@rpm5.org>

magic/Magdir/compress
src/compress.c

index 5cbb1c87a911d619494dc024a6898d479f7bdb86..c247acff52cc79878b69ed980f54f649d3821305 100644 (file)
 # 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
 
index 0c2539d295bf3962404403aab5994da471397bb3..ae6b5421e052e1401873eb0254774f0d510debe9 100644 (file)
@@ -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]);