fn readAllAlloc(self: Self, allocator: mem.Allocator, max_size: usize) ![]u8

Allocates enough memory to hold all the contents of the stream. If the allocated memory would be greater than max_size, returns error.StreamTooLong. Caller owns returned memory. If this function returns an error, the contents from the stream read so far are lost.

Parameters

self: Self,
allocator: mem.Allocator,
max_size: usize,