handle different deflate compression type

fix #23