aspose file tools*
The moose likes Java in General and the fly likes Decompress Unix  compressed .z file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Decompress Unix  compressed .z file " Watch "Decompress Unix  compressed .z file " New topic
Author

Decompress Unix compressed .z file

Prabhu Sathya
Greenhorn

Joined: Jul 13, 2006
Posts: 8
How can I decompress a compressed Unix .z file in Java? Is there any particular method or alogorithm available for this.

Thanks in advance!!!
Bobby Corder
Greenhorn

Joined: Sep 28, 2006
Posts: 2
Anyone?

I am having the same issue.
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
Lots of answers from googling, for example...

In Unix, how can I read a file that ends in .Z, .z, .gz, or .bz2?
Bobby Corder
Greenhorn

Joined: Sep 28, 2006
Posts: 2
Lots of Google topics?
We are looking for a JAVA library/class that will decompress a .Z file.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8707
    
    6

Welcome to the JavaRanch, repton. You must have missed our naming policy on the way in. In short, we ask that everyone use a first and last name, seperated by a space and not obviously fake as their display name. You can change your name here.
As for your question, you can always use Runtime.exec() to invoke compress/decompress, or you can read up on how Lempel-Ziv compression works and create your own class.
[ September 29, 2006: Message edited by: Joe Ess ]

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
My bad. I missed the java part and wondered why you didn't post in the unix forum.

The ant task gunzip works for .gz, doesn't seem to work for .Z (although the gunzip unix command I just tried did work on a compressed .Z). FYI, I don't think .z and .Z are the same thing.
[ September 29, 2006: Message edited by: Carol Enderlin ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Decompress Unix compressed .z file
 
Similar Threads
How to read a unix compressed file?
question about decompress?
how to read a .z file in c++?
how to read a unix compressed file?
Difference between tar and jar file