Keeps version history of file buffers for getting the vcdiff delta between a version and the latest
optionsObjectdeltaToFileRatioNumbermaxDiscSizeNumberstorageDirectoryString
Returns an instance of DeltaHistory.
Range: all integers > 0
Ratio of delta intermediaries to full files. Increasing this will reduce storage size at the cost of more CPU calculation.
Range: all integers > 0
Maximum size in bytes to store recent file versions on disc. If this is reached, it will start deleting earlier files. If a single file is too large to fit, DeltaHistory.OversizedFileError will be thrown.
Directory that stores persistant file version data. If this is not specified, the version store will be cleared when the package starts again.
fileId String
file Buffer = new Buffer([])
Returns String versionIdthat identifies the version for this particular file.
fileId String
Returns true if there is at least one version for the given file, otherwise false.
fileId String
versionId String
Returns true if the given version exists for the given file, otherwise false.
fileId String
versionId String
Returns Buffer vcdiff encoded delta with from the version given by versionId to the last file added. If the version isn't in storage (either never added or it was evicted), it returns null.
fileId String
Returns Buffer of last file added to the file history given by fileId. If there was no last version, it returns null.
Deletes all stored files.