Never write a dif parser again
buildall.bat
OR
buildall.sh
haxe build-cpp.hxml
haxe build-cs.hxml
haxe build-php.hxml
haxe build-py.hxml
haxe build-js.hxml
Requires hxtsdgen, get it using haxelib install hxtsdgen
haxe build-ts.hxml
haxe build-java.hxml
haxe build-lua.hxml
haxe build-hl.hxml
Dif.Load(<path>) // Parses the dif at the file location and returns it
Dif.Save(<dif>,<version>,<path>) // Exports the provided dif of target version to the file location
var dif = Dif.LoadFromArray(byte[] bytes); // Load
var bytes = Dif.SaveToBuffer(Dif dif, Version version); // Save, Returns a byte[]
let dif = Dif.LoadFromArrayBuffer(buffer: ArrayBuffer); // Load
let buffer = Dif.SaveToArrayBuffer(dif: Dif, version: Version) // Save, buffer is of type UInt8Array
dif = Dif.LoadFromByteArray(buffer: ByteArray); // Load
buffer = Dif.SaveToByteArray(dif: Dif, version: Version) // Save, returns a ByteArray
Construct a haxe.io.Bytes object containing your data.
Load the Dif using Dif.LoadFromBuffer static method.
Save the dif by calling Dif.SaveToBuffer static method.