• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Decompress Unix compressed .z file

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can I decompress a compressed Unix .z file in Java? Is there any particular method or alogorithm available for this.

Thanks in advance!!!
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone?

I am having the same issue.
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lots of Google topics?
We are looking for a JAVA library/class that will decompress a .Z file.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Carol Enderlin
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 didn't say it. I'm just telling you what this tiny ad said.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic