Libraries: CFastFile - class for working with uchar array as a virtual file

 

CFastFile - class for working with uchar array as a virtual file:

The CFastFile eliminates the need for an intermediate writing of data to the physical file on disk. It provides the significant acceleration when working with data.

Author: Alex Sergeev

 

Library versions

1.01 - fixed copying of structures on union

Files:
FastFile.mqh  14 kb
 
o_o:

Library versions

1.01 - fixed copying of structures to union

Updated
 

The most interesting thing is that native functions are a bit crooked, but this library works smoothly. I also liked that I learnt what the strange at first glance union type is for ))

But there is one strange thing. It says that:

Класс CFastFile избавляет от необходимости промежуточной записи данных в физический файл на диске. Это позволяет получить значительное ускорение при работе с данными.

The class implements all the main functions of the FileWriteXXX/FileReadXXX family. That is, without changing the logic and code of your programme, you can easily switch from using physical files to fast work with their images in memory. Data is stored and read not with a real physical file, but with a uchar-array.

So data is written to files anyway. Yes, from uchar-array, but they are written. Then why will it be faster to write data this way than standard functions?