9 for _, a in ipairs(arg) do
10 if not no_parse and string.sub(a, 1, 1) == "-" then
13 elseif a == "--help" then
14 print("-u, --unoptimize: Unoptimize the data file; makes comparing files easy.")
15 print("-o, --optimize: Optimize the data file; will reduce Lua memory usage when loaded.")
16 print("-- Stop parsing options.")
17 print("--help Print this message.")
19 elseif a == "-o" or a == "--optimize" then
21 elseif a == "-u" or a == "--unoptimize" then
24 print("Unknown option: "..a)
28 table.insert(files, a)
33 local loader = loadfile(files[1])
38 local buffer, prebuf = CreateBuffer(), CreateBuffer()
41 for key, value in pairs(data) do
46 for key, value in pairs(data) do
47 DumpVariable(buffer, prebuf, value, key)
50 print(DumpingComplete(buffer, prebuf))
52 print("Expect a single file name.")