# UTF-8 Stream Validate UTF-8 incrementally across input buffers and detect truncated sequences at end of input. Pass each unsigned byte to `utf8_step(state, byte)`. Start at state 0. Carry the result across reads. A negative state marks an invalid sequence. Call `utf8_complete(state)` at end of input. The decoder rejects overlong encodings, surrogate code points and values above U+10FFFF. ## Try it ```sh nest demo utf8_stream@0.1.0 blyxc native-run utf8_stream-demo/main.blyx ``` Run `blyxc native-run checks.blyx` in the source checkout and compare with `checks-expected.txt`. [Package files](https://nest.blyx-lang.space/releases/utf8_stream/0.1.0.html) · [Blyx Discord](https://discord.gg/ZPNWqNsvC) · [Rahul Chaube](https://github.com/Rahulchaube1) · [Sponsor](https://github.com/sponsors/Rahulchaube1)