video delta encoding wip

This commit is contained in:
minjaesong
2025-04-15 21:38:33 +09:00
parent 9ce7e3dfd2
commit 4c4f24be37
11 changed files with 466 additions and 29 deletions

View File

@@ -1,9 +1,9 @@
if (exec_args[1] === undefined) {
println("Usage: compile myfile")
println("Usage: compile myfile.js")
println("The compiled file will be myfile.bin")
return 1
}
_G.shell.execute(`gzip -c ${exec_args[1]} | writeto ${exec_args[1]}.gz`)
_G.shell.execute(`enc ${exec_args[1]}.gz ${exec_args[1]}.bin`)
_G.shell.execute(`rm ${exec_args[1]}.gz`)
const filenameWithoutExt = exec_args[1].substringBeforeLast(".")
_G.shell.execute(`gzip -c ${exec_args[1]} | writeto ${filenameWithoutExt}.gz`)
_G.shell.execute(`enc ${filenameWithoutExt}.gz ${filenameWithoutExt}.bin`)
_G.shell.execute(`rm ${filenameWithoutExt}.gz`)