All types are big endian.
struct
{
magic:
uint8_t caca_header[2];
uint8_t caca_file_type[2];
canvas_header:
uint32_t control_size;
uint32_t data_size;
uint16_t version;
uint32_t frames;
uint16_t flags;
frame_info:
struct
{
uint32_t width;
uint32_t height;
uint32_t duration;
uint32_t attr;
int32_t cursor_x;
int32_t cursor_y;
int32_t handle_x;
int32_t handle_y;
}
frame_list[frames];
control_extension_1:
control_extension_2:
...
control_extension_N:
...
canvas_data:
uint8_t data[data_size];
data_extension_1:
data_extension_2:
...
data_extension_N:
...
};