Implementation and Understanding of Compression Algorithms Based of Information Theoretic Principles