Information density, structure and entropy in equilibrium and non-equilibrium systems