| View previous topic :: View next topic |
| Author |
Message |
mathieu Guest
|
Posted: Mon Jul 21, 2008 10:35 am Post subject: Recognize compression algorithm |
|
|
hi there compression gurus,
Could anyone comment on the following files:
http://gdcm.sourceforge.net/ProtocolDataBlock/
I could figure out that the first 4 bytes are the length in little
endian (with a possible +1 because of \0 padding). There a also common
pattern where a human readable string can be found:
Ex421Ser2Scan1
Ex3419Ser10Rx
Ex7902Ser7Scan1
Ex35603Ser3Scan1
Ex32518Ser9Scan1
Ex21847Ser3Scan1
Something like "Ex%iSer%i"
But after that I cannot recognize any known compression algorithm.
Thanks
-Mathieu
Ps: this is supposed to contain acquisition parameters (e.g. MR
machine) |
|
| |
|
Back to top |
mathieu Guest
|
Posted: Mon Jul 21, 2008 2:24 pm Post subject: Re: Recognize compression algorithm |
|
|
On Jul 21, 3:50 pm, John Reiser <jrei...@BitWagon.com> wrote:
[quote]Could anyone comment on the following files:
http://gdcm.sourceforge.net/ProtocolDataBlock/
Remove the first 4 bytes (contains the length in little-endian):
$ dd bs=4 skip=1 if=1049.raw of=foo
then
$ file foo
foo: gzip compressed data, was "Ex421Ser8Scan1", from Unix
$ gzip -dc <foo >bar
$ ls -l foo bar 1049.raw
-rw-r--r-- 1 jreiser jreiser 494 Jul 21 05:05 1049.raw
-rw-rw-r-- 1 jreiser jreiser 760 Jul 21 06:49 bar
-rw-rw-r-- 1 jreiser jreiser 490 Jul 21 06:49 foo
$
Hint:
$ od -Ax -tx4 1049.raw
000000 000001ea 08088b1f 41c16394 78450300
That "1f 8b 08" in bytes 4 through 6 is a dead give-away for gzip.
[/quote]
ROTFL you just made my day !
You know that I have been looking at those files for the past month
without even realizing that...
Thanks you so much !
-Mathieu |
|
| |
|
Back to top |
John Reiser Guest
|
Posted: Mon Jul 21, 2008 6:50 pm Post subject: Re: Recognize compression algorithm |
|
|
[quote]Could anyone comment on the following files:
http://gdcm.sourceforge.net/ProtocolDataBlock/
[/quote]
Remove the first 4 bytes (contains the length in little-endian):
$ dd bs=4 skip=1 if=1049.raw of=foo
then
$ file foo
foo: gzip compressed data, was "Ex421Ser8Scan1", from Unix
$ gzip -dc <foo >bar
$ ls -l foo bar 1049.raw
-rw-r--r-- 1 jreiser jreiser 494 Jul 21 05:05 1049.raw
-rw-rw-r-- 1 jreiser jreiser 760 Jul 21 06:49 bar
-rw-rw-r-- 1 jreiser jreiser 490 Jul 21 06:49 foo
$
Hint:
$ od -Ax -tx4 1049.raw
000000 000001ea 08088b1f 41c16394 78450300
That "1f 8b 08" in bytes 4 through 6 is a dead give-away for gzip.
-- |
|
| |
|
Back to top |
|