you probably refer to the asymptotic equipartition property?
[AEP Wikipedia][1] $X_1,...,X_n$ have to be iid then, since $-\frac{1}{n}\log p(X_1,...,X_n)=-\frac{1}{n}\sum_i\log p(X_i)\rightarrow -E[\log p(X)] $ in probability, which is $H(X)$ 


  [1]: https://en.wikipedia.org/wiki/Asymptotic_equipartition_property