java.util.zip question

Discussion in 'Java' started by GaryM, Apr 20, 2004.

  1. GaryM

    GaryM Guest

    I was compressing a bunch of files (about 200) using a java program I
    wrote. Comparing winzip versus my program I noticed the former
    compresses better by a factor of about 4x on "Normal" compression.

    I am using Deflated and "best compression" for method and level
    respectively in my Java program.

    I was wondering if the inputstream buffer size adversely affects the
    end result of the zip file? Most examples I see use buffer of about 1K.
    Is it possible with java to get comparable results to winzip?
     
    GaryM, Apr 20, 2004
    #1
    1. Advertising

  2. GaryM

    Roedy Green Guest

    On Tue, 20 Apr 2004 15:02:16 -0000, GaryM <> wrote or
    quoted :

    >I was wondering if the inputstream buffer size adversely affects the
    >end result of the zip file? Most examples I see use buffer of about 1K.
    >Is it possible with java to get comparable results to winzip?


    Unfortunately Phil Katz put in the ability to use proprietary
    compression formats into Zip formatted files. This destroys
    interoperability. If he were more altruistic, he might have thought
    to allow that only if the code for the algorithm were put in the
    public domain.

    Both Winzip and PkZip have proprietary formats and algorithms.

    Java supports only a fraction of what the commercial packages do.
    You can't use Java reliably for unpacking files created by Winzip or
    PkZip.
    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
     
    Roedy Green, Apr 21, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Hunsley
    Replies:
    1
    Views:
    624
    Andrew Thompson
    Sep 16, 2004
  2. yogesh
    Replies:
    4
    Views:
    5,121
    anish.mathew84
    Dec 30, 2009
  3. Replies:
    0
    Views:
    1,782
  4. HARI OM
    Replies:
    0
    Views:
    17,479
    HARI OM
    May 3, 2005
  5. sunil_varma
    Replies:
    1
    Views:
    1,260
Loading...

Share This Page