J# Zip Class Question

  • Thread starter Thread starter BuddyWork
  • Start date Start date
B

BuddyWork

Do you know or have any examples on how to get
ZipOutputStream/ZipInputStream classes so it can
compress/uncompress without writing to a file, I
basically want to pass in a string so it gets compressed
by either using GZip or Zip, then I want to pass in the
compression string and uncompress it either by using GZip
or Zip?
 
Do you know or have any examples on how to get
ZipOutputStream/ZipInputStream classes so it can
compress/uncompress without writing to a file, I
basically want to pass in a string so it gets compressed
by either using GZip or Zip, then I want to pass in the
compression string and uncompress it either by using GZip
or Zip?

I think that you should use Inflater/Deflater classes to actually compress
data.

The ZipOutputStream/ZipInputStream are helper classes to manage zip files.
And as far as I know ZipOutputStream/ZipInputStream use Inflater/Deflater
internally.

Regards,
Wiktor
 
Hello Wiktor,

Thanks for the reply, I was originally using
Inflator/Deflator classes but then don't seem to use the
ZIP/GZIP compression, basically when I was passing in the
zip compression data it basically threw an exception
stating invalid format.

I've looked at the code and found that the
ZipOutputStream/ZipInputStream uses
InflatedInputStream/DelatorOutputStream class which does
not use Inflator/Delator classes.

I'm I missing something.

Thanks,
 
Back
Top