Death to WinZip

I always thought that Java couldnt read or write WinZip

compatible zip files? Apparently you can.

Im too cheap to pay the $30 extortion fee to unlock WinZip and

WinRAR et al - so this makes me ask: Why hasnt anyone

written a Java un/zipper? Id pay them just to spite WinZip.

Im so happy I dont have to wait anymore for WinZip to vindictively count

to the number of zip files ive used since time began before it lets

me perform an operation.

If anyone wants to make a fancy GUI and get my $30 ill get you started:

import java.io.*;

import java.util.*;

import java.util.zip.*;

publicclass ZipLoader{

publicstaticvoid main(String[] args){

new ZipLoader();

}

public ZipLoader(){

try{

String zipFilename ="zipfile.zip";

ZipFile zipFile =new ZipFile(zipFilename);

Enumeration entries = zipFile.entries();

while(entries.hasMoreElements()){

ZipEntry entry = (ZipEntry)entries.nextElement();

System.out.println("Entry: " + entry);

}

ZipEntry entry = zipFile.getEntry("textfile.txt");

InputStream stream = zipFile.getInputStream(entry);

InputStreamReader streamReader =new InputStreamReader(stream);

BufferedReader reader =new BufferedReader(streamReader);

String line;

while((line = reader.readLine()) !=null){

System.out.println(line);

}

reader.close();

stream.close();

}catch(Exception e){

e.printStackTrace();

}

}

}

[2611 byte] By [TuringPesta] at [2007-11-27 11:00:01]
# 1

> Why hasnt anyone written a Java un/zipper? Id pay them just to spite WinZip.

I'm sure someone has. Is there some reason you expect a commercial company not to charge for its software?

~

yawmarka at 2007-7-29 12:26:59 > top of Java-index,Java Essentials,Java Programming...
# 2

You cant use a computer without working with zip files.

Have you seen the WinZip feature list? 99.999 of those features

are completely useless for someone who just has to read and

write files. There is the little known and appreciated XP compressed

file opener. It doesnt write files and im pretty sure they purposely have

it take a ridiculous amount of time to unzip folders - it takes them

forever.

I dont mind a company charging for software. But $30 a year when it

took me 20 lines of code? At least have a $5 option without the

superfluous cd burning, NSA level encryption, blah blah blah.

Im sorry. Im sorry. Ive just really grown to resent that COUNTDOWN

TO YOUR OPERATION popup, lol!

TuringPesta at 2007-7-29 12:26:59 > top of Java-index,Java Essentials,Java Programming...
# 3

This is all moot anyway since starting with XP and probably Vista too there is a zip client built into the explorer shell.

You can browse zip files like normal directories. You can create new zip files by right clicking and going to new - > Zip compressed folder

cotton.ma at 2007-7-29 12:26:59 > top of Java-index,Java Essentials,Java Programming...
# 4

> You cant use a computer without working with zip

> files.

I did so for years...

> Have you seen the WinZip feature list? 99.999 of

> those features

> are completely useless for someone who just has to

> read and

So seek a cheaper alternative, but don't come here whining that those features are there...

> file opener. It doesnt write files and im pretty sure

> they purposely have

> it take a ridiculous amount of time to unzip folders

Ah, it's a conspiracy!

> I dont mind a company charging for software. But $30

> a year when it

Not per year. I paid that money back in 1995 and have been using it ever since.

> took me 20 lines of code? At least have a $5 option

If it's 20 lines of code, you could easily write your own... So go ahead and do it.

And you can then sell it for $5 a pop to all those people who think like you and you should (if you're right) be extremely rich very quick, buy Winzip, and fire everyone there on the spot for their conspiracy to defraud the world.

jwentinga at 2007-7-29 12:26:59 > top of Java-index,Java Essentials,Java Programming...
# 5

I had googled for winrar. The funny part is that, some version of winrar was available on the internet. Only when I downloaded it I realized that it was rar'ed too.

qUesT_foR_knOwLeDgea at 2007-7-29 12:26:59 > top of Java-index,Java Essentials,Java Programming...
# 6

typical of pirated content... winrar is a commercial product.

jwentinga at 2007-7-29 12:26:59 > top of Java-index,Java Essentials,Java Programming...
# 7

> You cant use a computer without working with zip

> files.

I can't remember the last time I used zip files at work. We're a *nix house, we deal largely with tars. Even if we did, there's always gzip/gunzip. There are tons of free zip utilities kicking about, too. Plus, as pointed out, there's shell extensions in later versions of Windows. If I recall, WinZip is somewhat quicker than, say, XP compressed folders, though. Worth paying for it for that alone, to some people I guess. If not, there are plenty of alternatives

georgemca at 2007-7-29 12:26:59 > top of Java-index,Java Essentials,Java Programming...
# 8

Google returns a far number of alternatives. From dodgy looking Animate GIF based sites to the open source 7-Zip.(1)

Or you could use the command line?

1) http://www.7-zip.org/

mlka at 2007-7-29 12:26:59 > top of Java-index,Java Essentials,Java Programming...