Creating a Configuration File
You need to create a configuration file in order to:
- override default compression settings
- use the Google compression option
Configuration File Location
By default, CompLearn will read a configuration file called config.yml placed in a .complearn directory in the path specified by your HOME environment variable. On Linux and Linux-like systems, you may retrieve the HOME environment variable by typing "echo $HOME" command. In Windows systems, to view, change or add a HOME environment variable:
- Right-click My Computer, and then click Properties.
- Click the Advanced tab.
- Click Environment variables.
- Click one the following options, for either a user or a system variable:
- Click New to add a new variable name and value.
- Click an existing variable, and then click Edit to change its name or value.
- Click an existing variable, and then click Delete to remove it.
For each setting in complearn.conf, a key and value is specified. The general format is specified in this GKeyFile document.
Example:
# one key value pair per line at most [complearn] # directory where modules can be found module-path=/usr/lib/complearn/modules # print extra detailed information verbose=yes # scheduling priority, higher is less CPU nice-level=19 [ncd] show-labels=yes
ncd Configuration Settings
Settings for the ncd command:
- compressor - The builtin compressor to be used. Valid values are: bzlib, zlib, and blocksort.
Example:
compressor: zlib
Bzip-Specific Configuration Settings
The builtin bzip compressor has 3 settings that may be added to a configuration file:
- blocksize - is an integer from 1 to 9. 9 gives the best compression but takes the most memory. CompLearn's default value is 9.
- workfactor - is an integer from 0 to 250 and controls how the compression phase behaves when presented with the worst case, highly repetitive, input date. CompLearn's default value of 30 gives reasonable behavior over a wide range of circumstances.
- bzverbosity - is an integer from 0 and 4. 0 is silent and greater numbers give increasingly verbose monitoring/debugging output. CompLearn's default value is 0.
Example:
# sample settings for bzip compressor blocksize: 7 workfactor: 85 bzverbosity: 4
Zlib-Specific Configuration Settings
The builtin zlib compressor has 1 setting that may be added to a configuration file:
- zliblevel - is an integer from 1 to 9. 1 is the fastest and produces the least compression. 9 is the slowest and produces the most compression. CompLearn's default value is 9.
Example:
# sample settings for zlib compressor zliblevel: 5