eugen_Qt
7th November 2009, 22:43
:)
All greetings! I would be very grateful if someone show you in my question ...
I am writing a program backup file, it already works, but only with small files.
To work with large files, you must read fail parts, but not completely, that would not take much memory...
...
QFile fileRead(filename);
const int pageSize = getpagesize();
const int fileSize = fileRead.size();
int parts = fileSize/pageSize;
if (fileSize%pageSize != 0)
parts++;
buffer = new char[pageSize];
for (int partsCount = 0; partsCount < parts; partsCount++) {
//fileRead.read(buffer, fileSize); // ???
...
All greetings! I would be very grateful if someone show you in my question ...
I am writing a program backup file, it already works, but only with small files.
To work with large files, you must read fail parts, but not completely, that would not take much memory...
...
QFile fileRead(filename);
const int pageSize = getpagesize();
const int fileSize = fileRead.size();
int parts = fileSize/pageSize;
if (fileSize%pageSize != 0)
parts++;
buffer = new char[pageSize];
for (int partsCount = 0; partsCount < parts; partsCount++) {
//fileRead.read(buffer, fileSize); // ???
...