Splitting a bin file of 10560 bytes
-
-
@Anna_64 Read the file into a QByteArray and use https://doc.qt.io/qt-5/qbytearray.html#mid to split it
-
Simply read your chunks with QFile::read(int) and do whatever you want to do with the data afterwards.
-
@Anna_64 said in Splitting a bin file of 10560 bytes:
how to show the start and end position
this is simple math
-
@Anna_64 Using a for-loop and QFile::read(int) as @Christian-Ehrlicher suggested.
-
@Anna_64
you're either having us on, or you started coding literally last week.In the later case, you should to some tutorial/learning on the basics first.
-
@Anna_64 said in Splitting a bin file of 10560 bytes:
i want to 64 chunk like this from 16326 how to do that
So, you want to divide 16326 into 64 chunks, right?
What would the size of one chink be then? This is now not programming, just simple math.
If you calculated the size of one chunk, you then can have a for-loop (https://en.cppreference.com/w/cpp/language/for) which you execute 64 times and in each iteration read one chunk from the file (using QFile::read(int)).