Comparison

mod_compression/README.markdown @ 2482:c96a53b0b820

mod_compression: Import from Prosody, revision 0c69305ab525
author Kim Alvefur <zash@zash.se>
date Sun, 05 Feb 2017 14:40:51 +0100
child 2483:b3097323278f
comparison
equal deleted inserted replaced
2481:854aaa1f01b2 2482:c96a53b0b820
1 While the bandwidth usage of XMPP isn't great, compressing the data sent
2 to/from your server can give significant benefits to those on slow
3 connections, such as dial-up or mobile networks. Prosody supports
4 compression for client-to-server (if your client supports it) and
5 server-to-server streams using the mod\_compression plugin.
6
7 # Details
8
9 mod\_compression implements
10 [XEP-0138](http://xmpp.org/extensions/xep-0138.html "http://xmpp.org/extensions/xep-0138.html"){.urlextern},
11 and supports the zlib compression algorithm.
12
13 ## Dependencies
14
15 The XMPP protocol specifies that all clients and servers supporting
16 compression must support the "zlib" compression method, and this is what
17 Prosody uses. However you will need to install zlib support for Lua on
18 your system. There are different ways of doing this depending on your
19 system. If in doubt whether it is installed correctly, the command \`lua
20 -lzlib\` in a console should open a Lua prompt with no errors.
21
22 For more information on obtaining lua-zlib for your platform, see our
23 [dependencies page](/doc/depends#lua-zlib "doc:depends"){.wikilink1}.
24
25 # Usage
26
27 ``` lua
28 modules_enabled = {
29 -- Other modules
30 "compression"; -- Enable mod_compression
31 }
32 ```
33
34 Configuration
35 -------------
36
37 Option Default Notes
38 -------------------- --------- --------------------------------------------------------------------------------------------------------------------
39 compression\_level 7 Can be a number from 1 to 9, where 9 is best. Higher compression levels will use more resources but less bandwidth
40
41 Example
42 -------
43
44 ``` lua
45 modules_enabled = {
46 -- Other modules
47 "compression"; -- Enable mod_compression
48 }
49  
50 compression_level = 5
51 ```