# `IREE.Tokenizers.DecodeStream`
[🔗](https://github.com/goodhamgupta/iree_tokenizers/blob/v0.7.0/lib/iree/tokenizers/decode_stream.ex#L1)

Streaming decoder state.

Use this when token IDs arrive incrementally and you want to decode them
into text while preserving the same result as one-shot decode.

# `t`

```elixir
@type t() :: %IREE.Tokenizers.DecodeStream{resource: reference()}
```

Mutable streaming decode state owned by the NIF.

# `feed`

```elixir
@spec feed(t(), [integer()]) :: {:ok, binary()} | {:error, {atom(), binary()}}
```

Feeds a list of token IDs into the stream and returns any newly produced text.

# `finalize`

```elixir
@spec finalize(t()) :: {:ok, binary()} | {:error, {atom(), binary()}}
```

Flushes any remaining decode state and returns the final text chunk.

# `new`

```elixir
@spec new(
  IREE.Tokenizers.Tokenizer.t(),
  keyword()
) :: {:ok, t()} | {:error, {atom(), binary()}}
```

Creates a new decode stream for the given tokenizer.

Options:

- `:skip_special_tokens` - whether to suppress special tokens from output,
  defaults to `true`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
