compressSingle and default definition of compress in terms of compressSingle