Added support of compression. Work in progress on automatic configuration.