Sample compression scheme and bounding the VC dimension
Suppose that $H$ shatters a set $S$ of size $\ell$, and has a compression scheme of size $k$. For each of the $2^\ell$ labelings of $S$, the compression scheme associates a labeled subset of size $k$, in an injective way. There are $2^k \binom{\ell}{k}$ such labeled subsets, and so $2^\ell \leq 2^k \binom{\ell}{k}$. Using $\binom{\ell}{k} \leq (e\ell/k)^k$, this shows that $2^{\ell-k} \leq (e\ell/k)^k$, and so $2^{\ell/k} \leq 2e\ell/k$, implying $\ell &lt; 5k$.
Here is an example showing that we cannot improve this to $\ell \leq k$. Consider the set of all functions from $[k+1]$ to $\{0,1\}$. We give a compression scheme of size $k$. Given a labelling $(\ell_1,\ldots,\ell_{k+1})$, we remove either $(1,\ell_1)$ or $(2,\ell_2)$ according to the parity of labels. This is injective, since we can reconstruct the missing label from the index of the missing point.