fix strm.avail_in check in wrappers & complete coverage tests