make sure we check for the (en)decoder, otherwise code will crash
remove old zlib cleanup
new hotness: block based cleaup and error reporting