# Transition recording format

The format for transition recordings is as follows:

```
{
  Header h,         // The header - See the 'Header' section
  Frame[h.frames] f // Array of frames - The amount can be found in the header
                    // Please note: The frame array is gzipped!
}
```

### Header

The header is always 15 bytes long.

```
Header {
  char[6] magic, // 6 bytes magic value, always MAPADS
  byte version,  // Currently 1
  int32 width,   // Width of the recorded transition
  int32 height,  // Height of the recorded transition
  int32 frames   // The amount of recorded frames
}
```

### Frame

Each frame can have a variable length.

```
Frame {
  int32 len,     // The amount of bytes in the following array
  byte[len] data // Array of colors
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cerus.dev/map-ads/developer-api/transition-recording-format.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
