@Override
    public int available() throws IOException {
        int estimate = super.available();
        return estimate == 0 ? 1 : estimate;
    }
Returns the value of super.available() if the result is nonzero, or 1
otherwise.
<p>
This is necessary to work around a known bug in
GZIPInputStream.available(), which returns zero in some edge cases,
causing file truncation.
<p>
Ref: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7036144
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/S3ObjectInputStream.java