Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Decoding .z and .gz files

by blackadder (Hermit)
on Mar 26, 2007 at 12:15 UTC ( [id://606565]=note: print w/replies, xml ) Need Help??


in reply to Re: Decoding .z and .gz files
in thread Decoding .z and .gz files

Hi

its a small "z" not a Capital "Z"

Still I Tried Compress::LZF as suggested however I got this error
C:\Perl>perl z.pl -I c:/perl/bin compressed data corrupted (size mismatch) at z.pl line 9, <$fh> chunk +1.
Thanks
Blackadder

Replies are listed 'Best First'.
Re^3: Decoding .z and .gz files
by jettero (Monsignor) on Mar 26, 2007 at 12:34 UTC

    Nevertheless, I suspect it's supposed to be a capital Z. I don't suppose you could paste in a hex dump of the first 256 characters or so... It may reveal that the compression isn't ".z" or ".Z" at all.

    UPDATE: Wow, just wow. A hex dump would look more like this:

    0000000: 4120 6865 7820 6475 6d70 2077 6f75 6c64 A hex dump would 0000010: 206c 6f6f 6b20 6d6f 7265 206c 696b 6520 look more like 0000020: 7468 6973 3a0a this:.

    Of course, your tools may differ from xxd.

    -Paul

      Hi Paul

      How do you mean " hex dump of the first 256 characters"! Where from? do you mean the output from running the Copmress::LZF based script? Well this returned
      compressed data corrupted (size mismatch) at z.pl line 5.
      And the output from running Archice::Zip or Compress::Zlib returned an output similar to what you get if you open a bin file using a text editer (lots of goobldi gook on the screen including lots beeps)! do you still want me to post this output? aNYWAY HERE IS THE OUTPUT
      CH3viƍ9bҰ(K0bSy2ɓ(S\ɲ˂6h P ͚0n +F 6jhy3 4ntɴӧP3N97yCG*S\$CF g]˶۷pI`… FŌ;~,f9aĸF .w3w3  7ex6gװRu Xqo.X,N N| 4∔ B@$!R $F + rN<҄{ @ oO<F C\Mc&0su!Frނ 2 1m pNQ 6 NXat a `n!`eQFBn %VEPx`2:B A1$ED Ar116.T#d et 8 cParI9FM6B 9D +HS7đfqFr4tFr `dp$ Ul oAW q&6Ѣnq3pE <چ=FCn B aFx1ƴqԑF-vaG,1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‹8=V‹djc_hGsPc4p8dϥ0 +8 Iu-Y‹ y‹B1" &x]"Z&*Y5o-=Wx%xW1x y58y8XA'e)%2)#W p2 $ 1M54@y 'zix쒕5rHNKGHV T0%sfGg% 'Ƀ;E4EQ(ti낗zNt9u<ɑJd7sYwR7RH>s9s +DRh fw/rHiQ{RWtGe6››]›IB4ǜr&љ +›\G?bz%ٝiJRi_Fj&l)<2ϷSG[@%G2>%1 +]_xq‹=y1٠ؑԨC#W.#ԡ 4WlE(W 9
      Blackadder

        There's the little unix utility file, which you can ask to make an 'educated' guess, if you're unsure what format a particular file is. Running it on the binary data you posted (which I saved as the file 606574), it says :

        $ file 606574 606574: compress'd data 16 bits

        So, as Burak noted, you'd have to use an external program like gzip (or gunzip, etc.) which does handle "compress'd" (i.e. .Z) files. Trying to uncompress the file gives

        $ gzip -dc 606574 CC0000000000_gvap-infsbil002_1501071006/SunOS0000644000000000000000000 +0000000105507 gzip: 606574: corrupt input.

        which looks very much like the beginning of a tar file... (the 'corrupt input' is to be expected, and can be ignored here)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://606565]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-24 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found