Home arrow static arrow Java Programming [Archive] - InflaterIputStream & ZIP - GZIP
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - InflaterIputStream & ZIP - GZIP
5 Duke Stars available
This topic has 4 replies on 1 page.

Posts:2
Registered: 11/22/99
InflaterIputStream & ZIP - GZIP  
Aug 2, 2004 8:54 AM



 
We have a number of clients in the field that are making an HTTP request for data. The data is compressed with DeflaterOutputStream on the server and then inflated with InflaterInputStream on the client. I need to develop a version of this client that does not depend on a JVM. Both ZIP and GZIP libraries are available but both fail to inflate the data stream compressed by DeflaterOutputStream.

Is there a workaround for the client to, for example strip the header information, so the GZIP library calls will decompress successfully?

Alternatively, can I compress on the server side so clients already in the field will still properly inflate with InflaterInputStream AND the new client will be able to decompress with ZIP or GZIP calls?

Thanks
 

Posts:6,487
Registered: 5/5/04
Re: InflaterIputStream & ZIP - GZIP  
Aug 2, 2004 9:42 AM (reply 1 of 4)



 
Have you tried GZIPOutputStream?
 

Posts:2
Registered: 11/22/99
Re: InflaterIputStream & ZIP - GZIP  
Aug 2, 2004 10:02 AM (reply 2 of 4)



 
Yeah, using GZIPOutputStream on the server results in the following error on the client "unknown compression method"
 

Posts:6,487
Registered: 5/5/04
Re: InflaterIputStream & ZIP - GZIP  
Aug 2, 2004 10:12 AM (reply 3 of 4)



 
Have you tried ZipOutputStream?
I believe the output can be recompressed with winzip.
 

Posts:6,487
Registered: 5/5/04
Re: InflaterIputStream & ZIP - GZIP  
Aug 2, 2004 10:14 AM (reply 4 of 4)



 
Try writing to a file to make sure this can be decompressed.
It is possible the way you are writing to the socket is mangling the binary data. i.e. it may be fine for text.
 
This topic has 4 replies on 1 page.