How do I turn on compression?
Overview
Enterprise Tree Map supports both automatic web server compression using the gzip algorithm
and manual compression using gzip, zip and JAR archives.
Automatic Compression
Enterprise Tree Map is capable of receiving gzipped compressed streams from any web server.
To enable this functionality, simply turn on compression on your web server for the application
the tree map resides in.
When making a request for data or configuration files to a web server, Enterprise Tree Map
sends an Accept-Encoding with the value of "gzip". If compression is enabled on your
web server, and the web server determines the file or stream is suitable for compression, it
will automatically send a compressed stream to the tree map applet.
Manual Compression
Enterprise Tree Map supports retrieving data and configuration files from manually compressed
files existing on a web server. Compressed archives must use a .gz, .zip or
.jar file extension and be in either the gzip or zip/jar archive format.
For gzip compression, the contents will be automatically uncompressed and treated as a single
file. For zip/jar compression, you can specify the file from the archive to be retrieved using
the URL fragment syntax. For instance, the following retrieves the config.xml file from
the config.zip archive:
config.zip#/config.xml
If no file is specified, then the first file in the archive will be used.
When compressing dynamically generated data using PHP or ASP.Net, the above syntax won't work.
When Enterprise Tree Map tries detecting the file extension, it detects the extension of the script,
which is not a supported compression format. In this case you can add the ext URL parameter
to specify the extension you would like the output of your script treated as. For instance, the
following will read the data generated from the data.aspx file using the zip archive format:
http://www.myserver.com/treemap/data.aspx?year=2000&ext=zip
|