encodings: Code deduplication