  Classical and quantum error correction are presented in the form of Maxwell's
demon and their efficiency analyzed from the thermodynamic point of view. We
explain how Landauer's principle of information erasure applies to both cases.
By then extending this principle to entanglement manipulations we rederive
upper bounds on purification procedures thereby linking the ''no local increase
of entanglement'' principle to the Second Law of thermodynamics.
