Main Content

About the Deployable Archive

When MATLAB® Compiler™ or MATLAB Compiler SDK™ creates an application or shared library, it bundles the content into an embedded deployable archive, which is known as the CTF archive. The archive contains all the MATLAB based content (MATLAB files, MEX-files, and so on) included in the application.

All MATLAB files (.m and .p files) included in the deployable archive are encrypted using the Advanced Encryption Standard (AES) cryptosystem. By default, the names of files and the directory structure are not obscured and other file types, including MEX-files, MAT-files, FIG-files, Java JAR or class files, are not encrypted. Every other type of file is copied, unchanged, into the archive. When the deployable application runs, the files in the CTF archive are extracted onto the disk, and any files that were encrypted in the archive remain encrypted on the disk. If you choose to extract the deployable archive as a separate file, the files also remain encrypted.

Starting in R2022b, you can obscure the names of files and the directory structure, and also encrypt other file types (such as MAT, FIG, MEX, and so on) using the -s option for mcc. At run time, the encrypted files remain encrypted on the disk but are decrypted in memory to their original form before compiling. You can use this option with the -j option to create P-coded files from MATLAB code files before they are compiled.

For more information on how to extract the deployable archive refer to the references in the following table.

Information on Deployable Archive Embedding/Extraction and Component Cache

ProductRefer to
MATLAB Compiler SDK C/C++ integrationMATLAB Runtime Component Cache and Deployable Archive Embedding (MATLAB Compiler SDK)
MATLAB Compiler SDK .NET integrationMATLAB Runtime Component Cache and Deployable Archive Embedding (MATLAB Compiler SDK)
MATLAB Compiler SDK Java® integrationDefine Embedding and Extraction Options for Deployable Java Archive (MATLAB Compiler SDK)
MATLAB Compiler Excel® integrationMATLAB Runtime Component Cache and Deployable Archive Embedding

Additional Details

Multiple deployable archives, such as those generated with COM components, .NET assemblies, or Excel add-ins, can coexist in the same user application. You cannot, however, mix and match the MATLAB files they contain. You cannot combine encrypted and compressed MATLAB files from multiple deployable archives into another deployable archive and distribute them.

All the MATLAB files from a given deployable archive associate with a unique cryptographic key. MATLAB files with different keys, placed in the same deployable archive, do not execute. If you want to generate another application with a different mix of MATLAB files, recompile these MATLAB files into a new deployable archive.

The compiler deletes the deployable archive and generated binary following a failed compilation, but only if these files did not exist before compilation initiates. Run help mcc -K for more information.


Release Engineers and Software Configuration Managers: Do not use build procedures or processes that strip shared libraries on deployable archives. If you do, you can possibly strip the deployable archive from the binary, resulting in run-time errors for the driver application.