Source: https://info.uqam.ca/~privat/INF2170/02-codage.pdf