How to uncompress .Z files 'compress'ed in Unix from Java where the system might not be Unix?

Jesper Andersen



I'm going to completely plagiarize Marco Schmidt here and say that your best bet is to make a system call to an existing utility of your choice or to implement the LZW algorithm on your own in java (an unattractive task I assume). I too failed to find any existing Java package to accomplish this. The good news is that if you can live with the copyright conditions, GNUzip actually does do this, so you could port the code to Java from that code base fairly easily, I think. But then you would have GPL'd code, which may be a problem.