  Let $S_d(n)$ denote the minimum number of wires of a depth-$d$ (unbounded
fan-in) circuit encoding an error-correcting code $C:\{0, 1\}^n \to \{0,
1\}^{32n}$ with distance at least $4n$. G\'{a}l, Hansen, Kouck\'{y},
Pudl\'{a}k, and Viola [IEEE Trans. Inform. Theory 59(10), 2013] proved that
$S_d(n) = \Theta_d(\lambda_d(n)\cdot n)$ for any fixed $d \ge 3$. By improving
their construction and analysis, we prove $S_d(n)= O(\lambda_d(n)\cdot n)$.
Letting $d = \alpha(n)$, a version of the inverse Ackermann function, we obtain
circuits of linear size. This depth $\alpha(n)$ is the minimum possible to
within an additive constant 2; we credit the nearly-matching depth lower bound
to G\'{a}l et al., since it directly follows their method (although not
explicitly claimed or fully verified in that work), and is obtained by making
some constants explicit in a graph-theoretic lemma of Pudl\'{a}k
[Combinatorica, 14(2), 1994], extending it to super-constant depths.
  We also study a subclass of MDS codes $C: \mathbb{F}^n \to \mathbb{F}^m$
characterized by the Hamming-distance relation $\mathrm{dist}(C(x), C(y)) \ge m
- \mathrm{dist}(x, y) + 1$ for any distinct $x, y \in \mathbb{F}^n$. (For
linear codes this is equivalent to the generator matrix being totally
invertible.) We call these superconcentrator-induced codes, and we show their
tight connection with superconcentrators. Specifically, we observe that any
linear or nonlinear circuit encoding a superconcentrator-induced code must be a
superconcentrator graph, and any superconcentrator graph can be converted to a
linear circuit, over a sufficiently large field (exponential in the size of the
graph), encoding a superconcentrator-induced code.
