Class TickFileWriter
java.lang.Object
com.quantfinlib.data.TickFileWriter
- All Implemented Interfaces:
AutoCloseable
Writer for the QFLT binary tick format — compact capture of live tick
streams for deterministic replay (28 bytes per tick, buffered sequential
writes).
Format: magic "QFLT" + version byte, then framed records:
type 1 = symbol definition (int id, UTF-8 name), type 0 = tick
(int symbolId, double price, double size, long timestampNanos). Symbol
definitions may appear anywhere before the first tick that references
them, so symbols can be added mid-capture.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voiddefineSymbol(int symbolId, String symbol) Registers a symbol id (idempotent; must precede its first tick).longvoidwrite(int symbolId, double price, double size, long timestampNanos)
-
Constructor Details
-
TickFileWriter
- Throws:
IOException
-
-
Method Details
-
defineSymbol
Registers a symbol id (idempotent; must precede its first tick).- Throws:
IOException
-
write
- Throws:
IOException
-
tickCount
public long tickCount() -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-