• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to read a unix compressed file?

 
X. Li
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anyone tell me how to read a unix compressed file (*.Z)? Which class should I use?

Thanks in advance.

X. Li
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That really depends on what format the file is. The java.util.zip package can handle ZIP and GZIP.
 
X. Li
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, Joe. Java.util.zip doesn't give a good API for *.Z file.
I googled and found a class that is working pretty well:

http://cvs.sf.net/viewcvs.py/skunkdav/skunkdav/HTTPClient/UncompressInputStream.java?sortby=author&view=markup

X. Li
 
Tim Holloway
Bartender
Posts: 18417
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't cross-post! I'm glad you found my answer over in the Advanced Java forum usefult, though.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!