]> granicus.if.org Git - file/commitdiff
add lrzip support (from Ville Skytta)
authorChristos Zoulas <christos@zoulas.com>
Tue, 8 Mar 2011 00:39:46 +0000 (00:39 +0000)
committerChristos Zoulas <christos@zoulas.com>
Tue, 8 Mar 2011 00:39:46 +0000 (00:39 +0000)
ChangeLog
magic/Magdir/compress
src/compress.c

index 71ae0841ef1f8bc7a47974f685d8c9cb2db170a4..07ffa72bfe8e5b6d229fc753b55fae87d630e26e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-03-07  19:38  Christos Zoulas <christos@zoulas.com>
+
+       * add lrzip support (from Ville Skytta)
+
 2011-02-10  16:36  Christos Zoulas <christos@zoulas.com>
 
        * fix CDF bounds checking (Guy Helmer)
index 7a6e7150dd555c524158ef7059e6a895f9e4b31b..98d2e091d0c437fdd6c2681730c811c0ce23c1c2 100644 (file)
@@ -1,5 +1,5 @@
 #------------------------------------------------------------------------------
-# $File: compress,v 1.46 2010/09/20 19:19:17 rrt Exp $
+# $File: compress,v 1.47 2011/03/08 00:39:46 christos Exp $
 # compress:  file(1) magic for pure-compression formats (no archives)
 #
 # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
 0      ustring         \xFD7zXZ\x00            XZ compressed data
 !:mime application/x-xz
 
+# https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt
+0      string          LRZI                    LRZIP compressed data
+>4     byte            x                       - version %d
+>5     byte            x                       \b.%d
+!:mime application/x-lrzip
+
 # AFX compressed files (Wolfram Kleff)
 2      string          -afx-           AFX compressed file data
 
 >5     byte            x               \b.%d
 >6     belong          x               (%d bytes)
 
-# Type: XZ
-# URL: http://tukaani.org/xz/
-0      string          \xfd\x37\x7a\x58\x5a\x00        XZ compressed data
-!:mime application/x-xz
-
 0      string          ArC\x01         FreeArc archive <http://freearc.org>
 
 # Type:        DACT compressed files
index 90406950505bbc529312c577afe37562a223f8a0..de1ca0130b43515f583231fd2b69985749dc1af4 100644 (file)
@@ -35,7 +35,7 @@
 #include "file.h"
 
 #ifndef lint
-FILE_RCSID("@(#)$File: compress.c,v 1.65 2010/07/21 16:47:17 christos Exp $")
+FILE_RCSID("@(#)$File: compress.c,v 1.66 2011/03/08 00:39:47 christos Exp $")
 #endif
 
 #include "magic.h"
@@ -79,6 +79,7 @@ private const struct {
        { "BZh",      3, { "bzip2", "-cd", NULL }, 1 },         /* bzip2-ed */
        { "LZIP",     4, { "lzip", "-cdq", NULL }, 1 },
        { "\3757zXZ\0",6,{ "xz", "-cd", NULL }, 1 },            /* XZ Utils */
+       { "LRZI",     4, { "lrzip", "-dqo-", NULL }, 1 },       /* LRZIP */
 };
 
 #define NODATA ((size_t)~0)