I am tasked with imaging 8 GB of data to a larger external drive, 100+ GB in C++.
My code is looping through all the sectors and copying from a .IMG to the disk itself. Clearly making a 100 GB image and looping through it would not yield any speed up compared to just copying the files.
Instead I took an image of an 8 GB drive. It is now apparent that I can't just write those 8 GB into the range 0-8 GB on the 100+ GB drive. My question is, what is the proper allocation to write this smaller data to a larger drive and how can I learn more about it?