Dynamic compress/decompress framework