I have declared an instance of BinaryWriter and am using this to write to a file. I am also using BinaryReader to read etc.
Simple stuff. The main issue is that I will be dealing with large files and wish to show some sort of progression as user output, preferably using a progressbar.
The issue here is that the class itself (BinaryWriter/Reader) is doing all the work in the background and I only have the 1 line of code which does all the legwork, e.g:
int read = inputData.Read(data, offset, dataRemain);
In this case all the data is read into the byte buffer (data) in one go. The only way I can think of is to have the buffer split the work into smaller chunks and process each one as it comes in, but this may impact speed.
Is there any way to show progress of something like that without putting it in a loop and incrementing a progress bar after each "chunk" is read/written?
Regards, Daniel.
IT Support Tech.
BSc (Hons) Software Engineering
Simple stuff. The main issue is that I will be dealing with large files and wish to show some sort of progression as user output, preferably using a progressbar.
The issue here is that the class itself (BinaryWriter/Reader) is doing all the work in the background and I only have the 1 line of code which does all the legwork, e.g:
int read = inputData.Read(data, offset, dataRemain);
In this case all the data is read into the byte buffer (data) in one go. The only way I can think of is to have the buffer split the work into smaller chunks and process each one as it comes in, but this may impact speed.
Is there any way to show progress of something like that without putting it in a loop and incrementing a progress bar after each "chunk" is read/written?
Regards, Daniel.
IT Support Tech.
BSc (Hons) Software Engineering