The information theoretic interpretation of the length of a curve