agentleFS
CloudflareKnown publishercloudflare/workerd/src/bench/streams/encoding/AGENTS.md

workerd / encoding

AGENTS.md9.1k starsChanged 8 months agoApache-2.0View on GitHub

TextEncoderStream and TextDecoderStream, under both implementations. Suite rules: src/bench/streams/AGENTS.md. The shapes are 256 x 16, 64 x 4 Ki and 16 x 64 Ki characters or bytes (SHAPES in helpers.js): a stream of short chunks, like generated tokens, and longer ones. TEXT names the text: ASCII, and two- and three-byte characters in UTF-8. - Both TextDecoderStreams decode with TextDecoder's native decoder, so the decoder differences are in the streams around it. - The TextEncoderStreams encode differently. The TypeScript one calls…

Files
AGENTS.md

Encoding stream benchmarks

TextEncoderStream and TextDecoderStream, under both implementations. Suite rules: src/bench/streams/AGENTS.md.

The shapes are 256 x 16, 64 x 4 Ki and 16 x 64 Ki characters or bytes (SHAPES in helpers.js): a stream of short chunks, like generated tokens, and longer ones. TEXT names the text: ASCII, and two- and three-byte characters in UTF-8.

Module map

ModuleGroupCases
construction.jsconstruction16 constructions per call: TextEncoderStream; TextDecoderStream; TextDecoderStream with fatal
encoder.jsencoderEvery shape of every text, written as strings and read back as bytes
decoder.jsdecoderEvery shape of every text, written as bytes and read back as text, and ASCII with fatal
pipeline.jspipelineASCII strings through TextEncoderStream and back through TextDecoderStream with pipeThrough(), in every shape

Comparing

  • Both TextDecoderStreams decode with TextDecoder's native decoder, so the decoder differences are in the streams around it.
  • The TextEncoderStreams encode differently. The TypeScript one calls TextEncoder.prototype.encode() on each chunk, which writes UTF-8 through V8, or with simdutf under the workerd-autogate-enable-fast-textencoder autogate (@all-autogates); the C++ one converts each chunk with simdutf itself. The encoder differences therefore include the encoders'.
  • The decoder's chunks are consecutive pieces of one encoded text. No chunk size is a multiple of three, so the three-byte chunks end mid-character and the decoder carries the partial character over to the next chunk.

Download now (ZIP)

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 3 mentionsFeb 2026: 0 mentionsMar 2026: 2 mentionsApr 2026: 3 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 7 mentionsSep 2026: 5 mentionsOct 2026: 4 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the cloudflare/workerd repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about cloudflare/workerd

The biggest 5 of 40 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 40

Talked about on GitHub, Bluesky, Hacker News and Stack Overflow (40 times).

On GitHub · 33

28 more on GitHub

On Hacker News · 2

On Stack Overflow · 1

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.