love.data.getPackedSize

Available since LÖVE 0.11.0
This function is not supported in earlier versions.

Gets the size in bytes that a given format used with love.data.pack will use.

This function behaves the same as Lua 5.3's string.packsize.

Function

Synopsis

size = love.data.getPackedSize( format )

Arguments

string format
A string determining how the values are packed. Follows the rules of Lua 5.3's string.pack format strings.

Returns

number size
The size in bytes that the packed data will use.

Notes

The format string cannot have the variable-length options 's' or 'z'.

See Also

Other Languages