Sampling for a pool of data without knowledge of data length