Doubts on Wire library implementation

Got it.

The slave can't predict how many bytes the master request, but it can know when to stop (which is what I was looking for).
Then perhaps that library keeps triggering the onRequestData event until the master's NACK is received.

Now, what if the slave has to transmit a byte that is generated in runtime, instead of being previously buffered? It necessarly has to be buffered?
What if the slave hangs longer than the clock period to get the data?
Is "clock pulse stretching" a real thing?