'Zero-copy read directly into buffer.'

def readinto(self, buf):

    got = 0
    vbuf = memoryview(buf)
    while (got < len(buf)):
        if (self._cur_avail == 0):
            if (not self._open_next()):
                break
        cnt = (len(buf) - got)
        if (cnt > self._cur_avail):
            cnt = self._cur_avail
        res = self._fd.readinto(vbuf[got:(got + cnt)])
        if (not res):
            break
        self._md_context.update(vbuf[got:(got + res)])
        self._cur_avail -= res
        self._remain -= res
        got += res
    return got
