Revert deflate implementation

It was reading past the end of input
Refactor IDATReader
Use standard_error function