Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mganss/zopflidll
Zopfli for IIS
https://github.com/mganss/zopflidll
7-zip 7z compression iis zopfli
Last synced: about 1 month ago
JSON representation
Zopfli for IIS
- Host: GitHub
- URL: https://github.com/mganss/zopflidll
- Owner: mganss
- License: apache-2.0
- Created: 2014-09-09T09:56:18.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-09-09T10:14:23.000Z (over 10 years ago)
- Last Synced: 2023-04-10T14:42:40.798Z (over 1 year ago)
- Topics: 7-zip, 7z, compression, iis, zopfli
- Language: C
- Size: 473 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ZopfliDll
ZopfliDll is a custom extension library for Microsoft IIS that can compress with [Google's Zopfli](https://code.google.com/p/zopfli/) algorithm or a configurable command line tool (such as [7-Zip](http://www.7-zip.org/)).
It can replace the builtin [gzip compression library](http://msdn.microsoft.com/en-us/library/dd692872.aspx) (gzip.dll).If you want to try it out on the command line, check out [this other project](https://github.com/mganss/IisGzip).
## Usage (Zopfli)
1. Copy the `ZopfliDll.dll` (or `ZopfliDll64.dll`) file to a folder accessible by the IIS process.
2. Edit the [`` element](http://www.iis.net/configreference/system.webserver/httpcompression/scheme) of the [`` element](http://www.iis.net/configreference/system.webserver/httpcompression) in [`applicationHost.config`](http://www.iis.net/learn/get-started/planning-your-iis-architecture/introduction-to-applicationhostconfig) (unfortunately, these settings cannot be overriden in Web.config):```xml
```3. Restart the "World Wide Web Publishing Service".
Static files are by default saved to `%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files`.
Because you cannot have different DLLs for dynamic and static compression (and the DLL does not know whether it's compressing dynamic or static content), ZopfliDll uses the compression level to switch between the builtin fast gzip compression and the slow Zopfli algorithm:
Compression Level in IIS configCompression level used
IIS builtin
00
12
24
36
48
510
Zopfli (iterations)
61
75
810
915
1020## Usage (command line tool)
ZopfliDll has a second mode of operation which allows you to compress content using an arbitrary command line tool. If ZopfliDll finds a file called `cmd.txt` in the same folder as the DLL, it uses the content of this file to start a command line tool for each stream of data to compress.
The command line tool should read uncompressed data from stdin and write compressed data in gzip format to stdout. The command line may contain environment variables and a placeholder for the compression level. Example:
```
%ProgramFiles%\7-Zip\7z.exe a dummy -tgzip -mx={1;9} -si -so
```Compression levels of 0-5 in the IIS configuration are used for compression with the builtin gzip compression as in the table above. Levels 6-10 are spread to the range in the placeholder (1-9 in the example).
## Status
"Works on my machine"™ :smile_cat: