Creates a new ChangeRecord instance.
The path to the change record file.
The callback function to call when file handles are opened.
Options for the change record.
Static
lagAppends a block change to the change record.
The position of the block change.
The block type.
Append an action to the change record.
Whether the action is a command.
The action bytes to append.
The command string (if applicable).
Trims the VHS file to the specified action count, discarding any actions beyond that count.
The action count to trim to.
Closes file handles of change record. Does not flush changes.
Flush changes to disk by compressing current buffer and append it to the VHS file.
The length of the flushed buffer.
Restore block changes to a level.
The level to restore changes to.
Optional
maxActions: numberThe maximum number of actions to restore.
Optional
staller: FunctionThe function to call to stall the restore process. Also prevents creating keyframes.
The total number of actions restored.
Represents a change record for a level.