':type buf: Destination buffer (List[str])
:type n: Maximum number of characters to read (int)
:rtype: The number of characters read (int)'

def read(self, buf, n):

    read_bytes = 0
    buffer = ([''] * 4)
    for i in xrange(((n / 4) + 1)):
        size = read4(buffer)
        if size:
            buf[read_bytes:(read_bytes + size)] = buffer
            read_bytes += size
        else:
            break
    return min(read_bytes, n)
