Initialize writer.
Parameters:
Add tick to storage.
Parameters:
_buffer
, which is resized when filled up.)Ignore ticks with non-positive and non-zero volume or price
Store added ticks to file.
Creates necessary directories if needed. Overwrites existing file.
Check if _buffer
is large enough to write one more tick.
If not - create new Buffer twice the size and replace _buffer
with it.
Prepare buffer with header data to be written into tick database file before actual ticks. Saves only storage version for now.
Compress tick data to occupy even less space.
Write result buffer to the file in _path
.
First write it to .tmp file and then if everything is ok, move to destination specified by user.
Tick storage writer