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. Advertisements

  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. Advertisements

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. Brian McKeever

    java.util.zip + windows XP troubles

    Brian McKeever, Aug 13, 2003, in forum: Java
    Replies:
    1
    Views:
    789
    Chris Uppal
    Aug 13, 2003
  2. Ike

    java.util.Zip

    Ike, Jan 12, 2004, in forum: Java
    Replies:
    2
    Views:
    740
    Chris Smith
    Jan 12, 2004
  3. Mohun Biswas

    java.util.zip.CRC32 uses long??

    Mohun Biswas, Apr 1, 2004, in forum: Java
    Replies:
    1
    Views:
    2,957
    Marco Schmidt
    Apr 1, 2004
  4. Alex Hunsley
    Replies:
    1
    Views:
    802
    Andrew Thompson
    Sep 16, 2004
  5. yogesh
    Replies:
    4
    Views:
    5,608
    anish.mathew84
    Dec 30, 2009
  6. Replies:
    0
    Views:
    2,058
  7. HARI OM
    Replies:
    0
    Views:
    17,890
    HARI OM
    May 3, 2005
  8. sunil_varma
    Replies:
    1
    Views:
    1,595
Loading...