Implement simple compression algorithms using python