Entropy coding
In information theory, an entropy coding (or entropy encoding) is any lossless data compression method that attempts to approach the lower bound declared by Shannon's source coding theorem, which states that any lossless data compression method must have an expected code length greater than or equal to the entropy of the source. More precisely, the source coding theorem states that for any source distribution, the expected code length satisfies E x ∼ P [ ℓ ( d ( x ) ) ] ≥ E x ∼ P [ − log b ( P ( x ) ) ] {\displaystyle \operatorname {E} _{x\sim P}[\ell (d(x))]\geq \operatorname {E} _{x\sim P}[-\log _{b}(P(x))]} , where ℓ {\displaystyle \ell } is the function specifying the number of symbols in a code word, d {\displaystyle d} is the coding function, b {\displaystyle b} is the number of symbols used to make output codes and P {\displaystyle P} is the probability of the source symbol.