2

I have a file from TREC(Text REtrieval Conference) whose extension is .0z .1z etc etc. I tried every method I can do, but still failed. Could someone do me a favour please?

There are some evidence that might helpful.

  1. In terminal, I used "file" command then it shows "fr940104.1z: compress'd data 16 bits".

  2. I also check the properties of the file under GUI, which shows UNIX-compressed file(application/x-compress).

1
  • Can you list the uncompression methods you have tried? Aug 28, 2012 at 22:13

2 Answers 2

2

.z normally means simple Unix compression. Does

uncompress filename.z

not work?

6
  • Not at all. I tried it :( The only helpful instruction from the readme file is "The datasets have all been compressed using the UNIX compress utility and are stored in chunks of about 1 megabyte each (uncompressed size)."
    – Alex Lee
    Aug 28, 2012 at 22:04
  • @Alex Lee - Can you post a link to an example file? Aug 28, 2012 at 22:06
  • @Alex Lee - Sorry, I can't do that. All information shared here must be public. I suggest you edit your question to list what uncompression methods you've tried (exact command lines), and we can see if you've missed something. Failing that, you'll have to contact the data provider. Aug 28, 2012 at 22:34
  • Hi @ire_and_curses, sorry for the late reply. Mark Adler gave me a method to do that which is right. Thank you for your effort. Thank you all the same.
    – Alex Lee
    Sep 4, 2012 at 16:51
  • @Alex Lee - No problem, glad it worked. You should accept his answer (click the green check-mark next to it). Sep 4, 2012 at 19:31
1

and are stored in chunks of about 1 megabyte each

indicates that you need to recombine the chunks before decompressing. Hopefully the filenames can help you with that ("chunk001.z", "chunk002.z", ?). Assuming that you can figure out the order, use cat to combine them into one file. Then use Unix uncompress. Or pipe directly from cat to uncompress.

1
  • Hi Mark, Thank your answer. You gave me the right way.
    – Alex Lee
    Sep 4, 2012 at 16:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.