NAME
LibTmux::Codec - Reversible single-lookup tmux format records
DESCRIPTION
Backslash, tab, and newline are escaped by tmux substitution modifiers. Decoding composes those escapes with older tmux print escapes in one pass, returning octets. Use this decoder only with "format" output from a UTF-8 command client; raw command output has a separate contract. An empty stream has no rows; one newline is one empty single-field record. Malformed streams throw LibTmux::X::Codec.
Private readers for "get_option" in LibTmux::Server and "get_environment" in LibTmux::Server decode tmux's native quoted values without evaluating shell text. They do not change "cmd" in LibTmux::Server output.
METHODS
format
LibTmux::Codec->format(@tokens) returns one tmux format string in token order without I/O. Tokens must be registered-style names, including user option names beginning with @; invalid names throw LibTmux::X::InvalidArgument. No input is mutated.
decode
LibTmux::Codec->decode($bytes, $field_count) returns an arrayref of row arrayrefs in stream order, including empty fields and duplicate rows. It performs no I/O and does not mutate the input. An empty byte stream returns []; malformed framing throws LibTmux::X::Codec.