Stream optimisation

Changed chunk data streaming to be done in file order one chunk at a
time. Dumping the compressed file into a memory stream was causing
massive amounts of buffer reallocation.