We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


? tool for windows that is the same as linux compress

geff_chang asked
Medium Priority
Last Modified: 2011-09-20
my java project requires that i use linux's "compress" command,
because the system is to be deployed on a linux server.

other than using the linux OS (because i'm on windows),
is there any other way to exactly emulate linux's "compress"
command, like an executable for example?
Watch Question

I believe that compress supports the Zip format. Try that first.
You can create both Zip and GZIP files from inside Java. You need to use GZIP, not Zip as I stated earlier.

There is a Windows executable for gzip which will create compress compatible archives here http://www.gzip.org/
The good old compress is NOT zip or gzip because of some patent
by Sperry (now Unisys).
But the C-source might be still around on BSD or such.
You should look into converting all operations to GZIP
which is implemented in JAVA.
I already searched for a compress class for JAVA during 3 years and in vain.

Siva Prasanna KumarPrincipal Solutions Architect
Top Expert 2006

check out this link as it also you to create a zip file using java it self.

Top Expert 2016

Why not just jar?


thanks for your interesting suggestions,
but the "compress" command is necessary, as it is to be run on linux,
and the requirements specifications requires it to be compressed and sent
to a server in that manner.

i guess i must really work on linux and use the Runtime class to execute compress.
geff_chang didn't get it that alternatives exist for 'compress'.
I found one source of 'compress'-code, nl. in Total Commander by Ghisler,
but then it's easier to use the C-source from UNIX.
There is no JAVA code available compatible with compress.

The questioner found a solution (Runtime.exec() ) that I too found.
However, the question was: is there ...
and the good, although disappointing, answer is NO.
I don't know what rewards to what grade are usual in such a case.

PAQed with points refunded (125)

Community Support Moderator

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.