The buffer is 4MB in size, the random data generator generates only whats needed so if the file is supposed to be 4KB it generates exactly that.
One more question. Are you sure you are not re-seeding the random number generator (with the same seed) each time you generate a new file? That would obviously result in repeated data.
Bookmarks