# UNIMPLEMENTED: grpc: unsupported content encoding "gzip"

- **ID:** `grpc/unsupported-content-encoding`
- **Domain:** grpc
- **Category:** encoding_error
- **Error Code:** `ECONTENTENCODING`
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

Server received a compressed request using an unsupported content encoding algorithm, typically because the server was not built with the corresponding compression library.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| gRPC v1.60.0 | active | — | — |
| gRPC v1.62.0 | active | — | — |
| gRPC v1.64.0 | active | — | — |

## Workarounds

1. **Enable the 'gzip' compression on the server by registering the gzip codec: `import grpc; server = grpc.server(futures.ThreadPoolExecutor(max_workers=10), compression=grpc.Compression.Gzip)`** (90% success)
   ```
   Enable the 'gzip' compression on the server by registering the gzip codec: `import grpc; server = grpc.server(futures.ThreadPoolExecutor(max_workers=10), compression=grpc.Compression.Gzip)`
   ```
2. **If the server cannot be modified, configure the client to use 'identity' (no compression) for that specific call: `channel = grpc.insecure_channel(target, options=[('grpc.default_compression_algorithm', 0)])`** (80% success)
   ```
   If the server cannot be modified, configure the client to use 'identity' (no compression) for that specific call: `channel = grpc.insecure_channel(target, options=[('grpc.default_compression_algorithm', 0)])`
   ```
3. **Ensure the server binary is compiled with the optional compression library (e.g., zlib) by rebuilding with `-DgRPC_BUILD_CODEC=ON`.** (85% success)
   ```
   Ensure the server binary is compiled with the optional compression library (e.g., zlib) by rebuilding with `-DgRPC_BUILD_CODEC=ON`.
   ```

## Dead Ends

- **Disabling compression on the client side entirely.** — Compression may be required for large payloads or mandated by network policies; disabling can cause performance degradation or rejection by other services. (40% fail)
- **Setting the environment variable GRPC_DEFAULT_SSL_ROOTS_FILE_PATH to a custom cert path.** — This addresses TLS certificate issues, not content encoding errors; the compression algorithm is negotiated at the HTTP/2 layer. (95% fail)
- **Upgrading the gRPC client version without server-side changes.** — The server must also support the encoding; client-only changes do not affect server capabilities. (60% fail)
