{"version":"2.1.199","anchor":"request-body-gzip-compression-in-development","canonical_anchor":"request-body-gzip-compression-in-development","heading":"Request Body Gzip Compression [In Development]","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.199\/e\/request-body-gzip-compression-in-development","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.199","markdown":"### Request Body Gzip Compression [In Development]\n\n**What**\n\nGzip compression of API request bodies, reducing bandwidth for large context uploads.\n\n**Details**\n\n- Controlled by `yGd()`: checks `CLAUDE_CODE_GZIP_REQUEST_BODIES` env var first; if unset, falls back to the `tengu_gzip_request_bodies` feature flag (default `false`)\n- Only applies to requests whose target host is `api.anthropic.com` (verified by `wce()` URL host check); Bedrock, Vertex, custom `ANTHROPIC_BASE_URL`, and any non-Anthropic endpoints are unaffected\n- When enabled, sets `compress: \"gzip\"` on the outgoing fetch options object, instructing the underlying HTTP layer to gzip-encode the request body before transmission\n- When the request body is a string, a random whitespace suffix is appended before compression: a newline (`\\n`) followed by 0\u2013256 randomly chosen space or tab characters; this adds entropy to the payload to improve compression ratio consistency across requests\n- No changes are made to response handling; response decompression was already in place\n\n**Status**\n\nFeature-flagged (`tengu_gzip_request_bodies`, defaulting false). Can be force-enabled with `CLAUDE_CODE_GZIP_REQUEST_BODIES=1`.\n\n**Evidence**\n\n(search for `\"CLAUDE_CODE_GZIP_REQUEST_BODIES\"`, `\"tengu_gzip_request_bodies\"`, `yGd()` call at the fetch wrapper, `wce(l)` host check at line ~161308)\n\n- Flag `tengu_gzip_request_bodies`: Not enough to say (read for one account on one subscription tier against v2.1.199; this account: no value returned, anonymous baseline: no value returned, compiled default: off) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release."}