io.Reader stream processing

added comments