added compression algorithm