Prefix codes are used in compression and ensure that a compression scheme can be read back correctly. A prefix code can be represented as a tree. Optimal prefix trees are constructed based on the relative frequency of each character in the text.
Consider encoding the genome where all values are A, C, T, G. Where A and T each have a relative frequency of 40% and C, T have a relative frequency of 10%. An optimal prefix tree would be
```mermaid
flowchart TB
Z(START) -->|0| A(A)
Z(START) -->|1| Y(CONT)
Y -->|0| C(C)
Y -->|1| X(CONT)
X -->|0| T(T)
X -->|1| G(G)
```
The tree would be read as
```
A: 0
C: 10
T: 110
G: 111
```