Use your best judgement. Actually the error handling in this class seems rather a mess to me, being a mixture of exceptions and setting the "error" member. I think throwing an IOException like you did with the unsupported compression is fine here.