Compress xls content using apache deblate module

I am trying to compress an Excel spreadsheet sent from my application using the apache deflate module. I added the following line to the site support file:

AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/excel

But it looks like the response data is bigger?

Using firebug, without a module, I downloaded the xls spreadsheet from the application and downloaded 100Kb of data, the file size once in the file system was also 100Kb, as expected. As soon as I turned on the deflation module, as described above, and repeated the process, the amount of downloaded data was 295 KB? but the file remained only 100 KB after being saved in the file system.

As an experiment, I manually fastened the saved xls file and compressed it to 20 Kb.

What am I doing wrong here?

Using deflate (Firebug output):

200 OK   xxxxxxx.co.za   293 KB

4.43s 
ParamsHeadersPostPutResponseCacheHTML
Response Headers 
Date    Tue, 03 Nov 2009 13:01:43 GMT 
Server  Apache/2.2.4 (Ubuntu) mod_jk/1.2.23 PHP/5.2.3-1ubuntu6.4 mod_ssl/2.2.4 OpenSSL/0.9.8e
Content-Disposition attachment; filename="Employee List.xls"
Vary    Accept-Encoding
Content-Encoding    gzip
Content-Type    application/excel

Without deflate (Firebug output):

200 OK     xxxxxxxx.co.za   100 KB

3.46s
ParamsHeadersPostPutResponseCacheHTML
Response Headers
Date    Tue, 03 Nov 2009 13:06:00 GMT
Server  Apache/2.2.4 (Ubuntu) mod_jk/1.2.23 PHP/5.2.3-1ubuntu6.4 mod_ssl/2.2.4 OpenSSL/0.9.8e
Content-Disposition attachment; filename="Employee List.xls"
Content-Length  102912
Content-Type    application/excel
+3
1

, , , (. mod_deflate reference ):

DeflateCompressionLevel 9
DeflateBufferSize 8096
DeflateMemLevel 9
DeflateWindowSize 15

IANA, MS Excel application/vnd.ms-excel, , Apache/2.2.8 (Ubuntu) xls. , Apache . xls? , - .

, , application/vnd.ms-excel AddOutputFilterByType?

0

Source: https://habr.com/ru/post/1721777/


All Articles