# LibTmux.decode!

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** Julia
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-julia/blob/f3da513be1225d36d5854cd8db5972c01857578e/src/text.jl#L63
- **Page:** https://libtmux.org/en/julia/latest/reference/libtmux-decode/

```
decode!(decoder::LibTmux.TextDecoder, chunk::AbstractVector{UInt8}; final)
```

## Methods

Decode a copied chunk and return its complete text. Incomplete sequences span calls. `final=true` finishes the stream: a remaining partial sequence raises `InvalidUTF8Error` or produces one U+FFFD, according to `invalid`. Further calls after final input or a strict error raise `InvalidStateException`.

```julia
decode!(decoder::TextDecoder, chunk::AbstractVector{UInt8}; final=false)
```



Error offsets count all input bytes from one, including earlier chunks, and identify the beginning of the malformed subsequence. No I/O occurs. The decoder must not be shared by concurrent callers.

## Parameters

- `decoder` (`LibTmux.TextDecoder`)
- `chunk` (`Base.AbstractVector{UInt8}`)
- `final` (`Bool`)
  Default: `false`.
