From: Christos Zoulas Date: Tue, 8 Mar 2011 00:39:46 +0000 (+0000) Subject: add lrzip support (from Ville Skytta) X-Git-Tag: FILE5_07~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ccd20910f7eb197ddc8748eff9ae990f1be3db0d;p=file add lrzip support (from Ville Skytta) --- diff --git a/ChangeLog b/ChangeLog index 71ae0841..07ffa72b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-03-07 19:38 Christos Zoulas + + * add lrzip support (from Ville Skytta) + 2011-02-10 16:36 Christos Zoulas * fix CDF bounds checking (Guy Helmer) diff --git a/magic/Magdir/compress b/magic/Magdir/compress index 64ef423c..8083913a 100644 --- a/magic/Magdir/compress +++ b/magic/Magdir/compress @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: compress,v 1.45 2010/09/20 18:55:20 rrt Exp $ +# $File: compress,v 1.46 2010/09/20 19:19:17 rrt Exp $ # compress: file(1) magic for pure-compression formats (no archives) # # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. @@ -199,6 +199,12 @@ 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 @@ -213,11 +219,6 @@ >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 # Type: DACT compressed files diff --git a/src/compress.c b/src/compress.c index 8ab94f41..0edd7d30 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.64 2009/05/08 17:41:58 christos Exp $") +FILE_RCSID("@(#)$File: compress.c,v 1.65 2010/07/21 16:47:17 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)