  It is shown that for every $\e\in (0,1)$, every compact metric space $(X,d)$
has a compact subset $S\subseteq X$ that embeds into an ultrametric space with
distortion $O(1/\e)$, and $$\dim_H(S)\ge (1-\e)\dim_H(X),$$ where
$\dim_H(\cdot)$ denotes Hausdorff dimension. The above $O(1/\e)$ distortion
estimate is shown to be sharp via a construction based on sequences of expander
graphs.
