CodePudding user response:
Binary preservation, can change the file content to unify such a floating point number is a 32 bit, you use memory mapping is very easy to read, if is a text format, each number accounts for a byte, and also don't know how to points between Numbers and figures,CodePudding user response:
You give the example fully shows the QFile usage, memory mapping file contents are directly available, if you still have questions, then have nothing to do with what read memory mapping and the file,CodePudding user response:
Consult everybody, using the file mapping, calculate MD5 can a bit faster?CodePudding user response:
FPR is equivalent to the starting address of the entire map, then which one do you want to read the address on this increase can be above, must be ASCII TXT read out, you need to turn a one byte, binary is better, you directly take address, give the corresponding double,CodePudding user response:
FPR is a pointer uchar, what are you doing let qDebug output this pointer... And after unmap, even if you want to output a pointer corresponding content, do it at this time is already late, just like you to delete an object after go to call himCodePudding user response:
If (FPR){
For (int r=0; R
QDebug () & lt;
}
Unmap (FPR);
}
file.close()