love.data.getPackedSize
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.
size = love.data.getPackedSize( format )
format string A string determining how the values are packed. Follows the rules of Lua 5.3's string.pack format strings.
size number The size in bytes that the packed data will use.