class Protocol::HTTP::Body::File

def read

@returns [String | Nil] the next chunk of data, or nil if the file is fully read.

Read the next chunk of data from the file.
def read
	if @remaining > 0
		amount = [@remaining, @block_size].min
		
		if chunk = @file.read(amount)
			@remaining -= chunk.bytesize
			
			return chunk
		end
	end
end