compress/decompress proto