? tool for windows that is the same as linux compress

Posted on 2006-03-22
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?
Question by:geff_chang
    LVL 14

    Expert Comment

    by:Tommy Braas
    I believe that compress supports the Zip format. Try that first.
    LVL 14

    Expert Comment

    by:Tommy Braas
    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
    LVL 24

    Expert Comment

    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.

    LVL 23

    Expert Comment

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

    Expert Comment

    Why not just jar?
    LVL 1

    Author Comment

    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.
    LVL 24

    Expert Comment

    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.


    Accepted Solution

    PAQed with points refunded (125)

    Community Support Moderator

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
    Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now