Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^4: Decoding .z and .gz files

by blackadder (Hermit)
on Mar 26, 2007 at 13:13 UTC ( [id://606574] : note . print w/replies, xml ) Need Help??


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

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Ʃb,fY9a-v +% YFfl MAF+e¡^H‹炀y[nP)©** +ƴj-*x |ô hG:jK)F:)bGLqy (fht- +/A~sp n\ b_U/=^ p]5um6f =xw#6.xW?>vy'N  \ +dP虏^z:›܄.ˡ:alf npu"i?;›1F/ +ϼwF[o;.aͷX~-L_q'ЯpC=|C5 +m{ܐ10p| /pjW v04>IO%< U? p^vػ@| ':<‹#A?CAB/_p0@ZDj=hDە5iE +~Qr|4J_8U>6@n|AR)0Fry a,IBbRmp o(c$3D4|AJ_(8IH7oԀ'^!VhE +6xyˬc:h:2T$氮4|hP)N` f8`Tj _ LtMX@m +sth;uy*6_XTB$"AG \ӆn ?HT/Vr- = ?>S:TDAiMQp:xcݫm2)Ҍ +PHwh**%#@ NBjZvpjM/duy`mUSa gٴ V4Y6f5[^%x`[®ծRՑ9Wöu$Ctؿufrô +~U,[Py-k6(,d=mWɰK l`i!RHvւ@*b*r* +ɶ%ڂ5 W[7L7Y[ukZ&]-h*6W Cb[knG}ux p Ha Sp{Z S[ UIÆ+P1, mH_\gROUP[1l,v.hVHR& nK6+| esP<Z9P+sR醊m<×/q _09s>՟|6R-*4-7od$ЇE9Th6DZ^CiF3; +)M]Zv4;PU>mYԬkӫ5]Ԝ  ;֦ leW{]nStPT0˽^.tZ 8S۩:21L@3d֯8‹x3 +g6ZXUHR4&5Pa-v71*,7I+]ubX]\M2(&"nh#(k +BpNHI[C 6ХNqK1aJVO&>w 0$2a.ͶE:P($"B"<qyFhbVoaU1S@`3l#  +24{jšvYaA47St@R'\ٞLbtǞ 炴i)RGXTVk Ye >.:2›Uhf>v%F ‹o|޿?,7Ґ $Lqf5V4 +w)yg}Bw6~CD_' y8xRr~u2#sxxw33'y +0_wX5Sz!V 2 D||24MfNRaaEy1R9dLSxO2\Y +[u]hYEX)ח\zK͇S:}-T[,ice3^aCwk0-,|R$=v3y +삈-҇ӈ XvVP5{XO8YxPzO~h@"1 .h H"(‹x@‹_ch x6Rh"l"ƈ_FW&(F)‹xe +s‹ ‹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

Replies are listed 'Best First'.
Re^5: Decoding .z and .gz files
by almut (Canon) on Mar 26, 2007 at 14:52 UTC

    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)