Robert Millan wrote:
> On Tue, Oct 23, 2007 at 04:36:07PM +0300, Lasse Collin wrote:
> > Robert Millan wrote:
> > > On Tue, Oct 23, 2007 at 12:11:31PM +0200, Géraud Meyer wrote:
> > > > Package: file
> > > > Version: 4.21-3
> > > >
> > > > Any lzma compressed file I encountered is not recognized as
> > > > LZMA compressed data. An example:
> > > >
> > > > $ cat > test
> > > > Text file
> > > > $ lzma test
> > > > $ file test.lzma
> > > > test.lzma: data
> > > >
> > > > I also tested the version 4.20-3 (found here:
> > > > http://archive.daniel-baumann.ch/debian/packages/file/4.20-3/)
> > > > that was supposed to be fixed and it gives the same result.
> > >
> > > I recall they had plans to change the signature.  CCing the lzma
> > > maintainers, maybe they know something..
> >
> > The .lzma format currently in use is too hard to detect without
> > looking at the filename suffix. The new .lzma format will fix this
> > and a few other problems, but there are no stable tools to handle
> > the new format yet.
>
> Wait, I'm lost now.  Which version of the format was my patch
> targetted at, the old or the new one?   Or there are 3 of them?  :-)

There are two formats: the current/old LZMA_Alone format, and the new 
upcoming .lzma format. Your patch was for the LZMA_Alone format.

I tried writing a magic string for "file" two years ago, but the result 
is quite useless. It's still included in LZMA Utils 4.32.0beta source 
tarballs in the "extra" directory, but I don't recommend using those 
magic strings.

The new format has magic bytes of "\xFFLZMA\x00" (six bytes) which 
should be nice for the "file" command. There is a patch for "file" 
already, which adds support for the -z option too. It's not submitted 
upstream yet, but I will do it some day.

> P.S: don't CC me, I'm the bug submitter

Sorry, I'm not familiar with Debian's bug tracking system. I hope I got 
the addresses better now.

-- 
Lasse Collin  |  IRC: Larhzu @ IRCnet & Freenode


Reply via email to