G
Guest
Hi,
Are there any classes in VB.NET or C# that allow for file compression,
similar to WinZip?
Thanks.
Are there any classes in VB.NET or C# that allow for file compression,
similar to WinZip?
Thanks.
JT said:Are there any classes in VB.NET or C# that allow for file compression,
similar to WinZip?
Jon Skeet said:Not in the .NET framework itself (yet - there are in .NET 2.0), but
there's SharpZipLib:
http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx
Lau Lei Cheong said:I've found some internet discussion on the possibility of using zipfldr.dll
come with Windows to do zipping, but seems all of them ended in telling the
OP to find 3rd party libraries.
Anyone knows if that is possible?
And as J# is made to make easy port of Java programs to the world of .NET, I
believe it should have some sort of functionality to manipulate JAR/ZIP
formats like Java. Can other .NET languages take advantage of these
routines?
Jon said:Not in the .NET framework itself (yet - there are in .NET 2.0),
Oliver Sturm said:Last time I looked, the stuff in .NET 2 was purely stream oriented - no
support for zip files in a way similar to SharpZipLib. Maybe that changed
recently?
Jon said:Not that I've heard - but if you've got compression on streams, and
streams which act on files, it's not exactly hard to put the two
together...
Oliver Sturm said:I was assuming there was more to the zip file format than a sequence of
compressed byte streams - for example I was quite sure a zip file has a
"directory" of files somewhere. I might be wrong though, it's been a while
since I had a look at zip files in this detail
William Stacey said:IIRC, gzip (even on unix) can gzip only one file - same as MS's stream. It
would not be too hard however, to come up with some kind of FAT and protocol
of your own to add multiple compressed files to same stream. Naturally that
would be proprietary, which propably makes it not so attractive.
William said:IIRC, gzip (even on unix) can gzip only one file - same as MS's stream.
It would not be too hard however, to come up with some kind of FAT and
protocol of your own to add multiple compressed files to same stream.
Naturally that would be proprietary, which propably makes it not so
attractive.
standardised, although I seem to remember that it has flaws such as not
supporting long filenames and non-ASCII characters terribly well. These
have been fixed by proprietary modifications to the format.
there are enough implementations of it around that you can't really call
it proprietary any more.
You're right about gzip, it's commonly used in conjunction with the tar
command to create files with the .tar.gz (or .tgz) extension - tar can
concatenate file streams and gzip compresses the whole bunch. This results
in a better overall compression rate but has the drawback that the whole
(compressed!) tar file has to be read to find a specific file that's
somewhere in the middle.
William Stacey said:I agree. Zip is a defacto standard if anything is. I was talking if you
used gzip to come up with your own method to add multiple files. I assume
the reason they have not added a true zip lib may have something to do with
copyrights or money - not sure. The user need is definately exists.
JT said:Hi,
Are there any classes in VB.NET or C# that allow for file compression,
similar to WinZip?
Thanks.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.