but FredlFesl : your improved / modified and untested version writes Only 1MB to FFile
i mean the FFile will only hold 1MB of the Source Stream not the Whole Stream size .
This code actually copies the whole Stream, not just 1MB. The 1MB is the chuncksize. In this code there is a Repeat-Until-Structure, which repeats until the whole stream is copied.
Bernhard