  We introduce a definition of perfect and quasi-perfect codes for symmetric
channels parametrized by an auxiliary output distribution. This notion
generalizes previous definitions of perfect and quasi-perfect codes and
encompasses maximum distance separable codes. The error probability of these
codes, whenever they exist, is shown to coincide with the estimate provided by
the meta-converse lower bound. We illustrate how the proposed definition
naturally extends to cover almost-lossless source-channel coding and lossy
compression.
