docs: public int read(final byte[] b, int off, int len) throws IOException {
          int ret = 0;
          while (len != 0) {
              if (remaining == 0) {
                  startChunk();
              }
              if (remaining < 1) {
                  return ret;
              }
              int toRead = Math.min(len, remaining);
              int read = input.read(b, off, toRead);
              this.remaining -= read;
              len -= read;
              off += read;
              ret += read;
              if (read < toRead) {
                  return ret;
              }
          }
          return ret;
      }