Dictionary encoding

This provides an optional dictionary encoding that can be activated through the conf.