Performs reservoir sampling on very large input files delimited by newline characters, minimizing memory usage by storing byte offsets to elements