TODO make compress level configurable, and default to best speed