maximum amount of bytes to return
slice to the internal buffer up to max bytes (-1 means infinite, thus the whole buffer)
See Implementation