Partial answer. By Frostman's lemma, if $E$ is a compact set of positive $\alpha$-Hausdorff content, then there exists a probability Borel measure $\mu$ supported in $E$ such that $\mu(I) \leq c |I|^\alpha $ for every interval $I$ and $c$ is a constant. Then the distribution function of the measure $\mu$ must be $\alpha$-Holder continuous and $f(E)=[0,1]$.
EDIT
In the other direction, if such a function $f$ exists and if $I_i$ is a cover of $E$ by open intervals, then $f(I_i)$ is a cover of $f(E)$ by intervals, hence $ \sum_{i}|f(I_i)| \geq |f(E)|>0$, but $|f(I_i)| \leq C(f) |I_i|^\alpha $ by Holder continuity, therefore $E$ must have positive $\alpha$- Hausdorff content.