(config: CodecConfig)
| 42 | |
| 43 | |
| 44 | def build_codec(config: CodecConfig): |
| 45 | name = config.name.lower() |
| 46 | if name not in CODEC_REGISTRY: |
| 47 | raise KeyError(f"Unsupported codec '{config.name}'. Available: {list(CODEC_REGISTRY)}") |
| 48 | return CODEC_REGISTRY[name](config) |
| 49 | |
| 50 | |
| 51 | @dataclass |