Write unit tests for decoder (all modes).
Write unit tests for decoder (all modes).