  We establish a sharp estimate for a minimal number of binary digits (bits)
needed to represent all bounded total generalized variation functions taking
values in a general totally bounded metric space $(E,\rho)$ up to an accuracy
of $\varepsilon>0$ with respect to the ${\bf L}^1$-distance. Such an estimate
is explicitly computed in terms of doubling and packing dimensions of
$(E,\rho)$. The obtained result is applied to provide an upper bound on the
metric entropy for a set of entropy admissible weak solutions to scalar
conservation laws in one-dimensional space with weakly genuinely nonlinear
fluxes.
