mirror of
https://github.com/gvx/Ser.git
synced 2024-11-14 18:34:22 +00:00
Strip whitespace where possible
This can save a lot of space (in one case bringing the serialized size down from 11.5MB to 8.6MB).
This commit is contained in:
parent
8cf0f0df6e
commit
599c25f154
4
ser.lua
4
ser.lua
@ -110,8 +110,8 @@ return function(t)
|
||||
end
|
||||
|
||||
-- phase 4: add something about returning the main table
|
||||
if result[n]:sub(1, 5) == '_[0] ' then
|
||||
result[n] = 'return' .. result[n]:sub(7)
|
||||
if result[n]:sub(1, 5) == '_[0]=' then
|
||||
result[n] = 'return ' .. result[n]:sub(6)
|
||||
else
|
||||
result[n + 1] = 'return _[0]'
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user