users@glassfish.java.net

question: httplistener "compression" and the "minCompressionSize"

From: Russ Petruzzelli <Russ.Petruzzelli_at_Sun.COM>
Date: Thu, 08 May 2008 18:59:42 -0700
Hi. 

regarding additional properties for the httplistener....

 I am having difficulty distinguishing between the "compression" value and the "minCompressionSize" value.
Why two of them, and what is the distinction?

Here is what the admin guide says:

*
compression*
:  minimum amount of data before the output is compressed

(This seems straightforward enough.   By why say, "amount of data" instead of "file size"?  I know I am missing something subtle here.)

*minCompressionSize*: The minimum size of a file when compression is applied.

The definition of minCompressionSize seems to have the server saying, "I'll compress this down, and then if it is not <5000> (in my case) I won't send it compressed at all."  ?? But this wouldn't make sense for the server to do.  Wouldn't figuring this size out generate unnecessary work if it is not sent compressed?

Thanks,
Russ

domain.xml, http-listener:
  <property name="compression" value="5000"/>
  <property name="minCompressionSize" value="5000"/>
  <property name="compressableMimeType" value="text/html,text/xml,text/css,text/javascript"/>

###