This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes GZIPOutputStream - size of compressed data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "GZIPOutputStream - size of compressed data" Watch "GZIPOutputStream - size of compressed data" New topic
Author

GZIPOutputStream - size of compressed data

ram ragu
Ranch Hand

Joined: Mar 12, 2002
Posts: 57
Hello,
I compress data using GZIPOutputStream. Is there any way to find out the size of the compressed data?
here is what I do
sb ( StringBuffer )has some data...

GZIPOutputStream gzos =
new GZIPOutputStream(response.getOutputStream());
gzos.write(sb.toString().getBytes());
gzos.close();
Kindly let me know.. I need to find out how good the compression is..
Ram
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GZIPOutputStream - size of compressed data