# network.bsky.jetstream.getZstdDictionary

> Published by [bsky-lexicons.bsky.social](https://lexicon.garden/identity/did:plc:4v4y5r3lwsbtmsxhile2ljac)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:4v4y5r3lwsbtmsxhile2ljac/network.bsky.jetstream.getZstdDictionary)
- [Documentation](https://lexicon.garden/lexicon/did:plc:4v4y5r3lwsbtmsxhile2ljac/network.bsky.jetstream.getZstdDictionary/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:4v4y5r3lwsbtmsxhile2ljac/network.bsky.jetstream.getZstdDictionary/examples)

## Definitions

### `network.bsky.jetstream.getZstdDictionary`

**Type**: `query`

Download the zstd dictionary used by the network.bsky.jetstream.subscribeEvents stream's optional compression scheme. The dictionary is requested by its zstd dictionary ID (the same ID embedded in every compressed frame's header); a client that wants compressed frames first fetches the server's current dictionary, then opts in on the websocket with zstdDictionary=<id>. The response is a raw zstd structured dictionary (RFC 8878 section 5), immutable for a given ID and CDN-cacheable. Servers may retire old dictionaries after retraining; a client holding a retired ID re-fetches without an id parameter to obtain the current one.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `integer` | No | The zstd dictionary ID to fetch. Omitted: the server's current dictionary. |

#### Output

**Encoding**: `application/octet-stream`

#### Errors

- **DictionaryNotFound**: No dictionary with the given ID is available on this server.

## Raw Schema

```json
{
  "id": "network.bsky.jetstream.getZstdDictionary",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "DictionaryNotFound",
          "description": "No dictionary with the given ID is available on this server."
        }
      ],
      "output": {
        "encoding": "application/octet-stream"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "description": "The zstd dictionary ID to fetch. Omitted: the server's current dictionary."
          }
        }
      },
      "description": "Download the zstd dictionary used by the network.bsky.jetstream.subscribeEvents stream's optional compression scheme. The dictionary is requested by its zstd dictionary ID (the same ID embedded in every compressed frame's header); a client that wants compressed frames first fetches the server's current dictionary, then opts in on the websocket with zstdDictionary=<id>. The response is a raw zstd structured dictionary (RFC 8878 section 5), immutable for a given ID and CDN-cacheable. Servers may retire old dictionaries after retraining; a client holding a retired ID re-fetches without an id parameter to obtain the current one."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
