Effective Techniques to Learn Compression