A compound variable file is a text format for serializing the value of a compound variable in a shell. A compound variable consists of variable assignments separated by newlines, where each assignment has a name, optional data type, and value. The file format supports various data types including strings, integers, floats, arrays, binaries, and nested compound variables. Examples show compound variables containing simple values, indexed arrays, sparse indexed arrays, and associative arrays.