{{newin|[[11.0]]|110|type=function}}
Packs (serializes) simple Lua values.

This function behaves the same as Lua 5.3's [https://www.lua.org/manual/5.3/manual.html#pdf-string.pack string.pack].
 
== Function ==
=== Synopsis ===
<source lang="lua">
data = love.data.pack( container, format, v1, ... )
</source>
=== Arguments ===
{{param|ContainerType|container|What type to return the encoded data as.}}
{{param|string|format|A string determining how the values are packed. Follows the rules of [https://www.lua.org/manual/5.3/manual.html#6.4.2 Lua 5.3's string.pack format strings].}}
{{param|value|v1|The first value (number, boolean, or string) to serialize.}}
{{param|value|...|Additional values to serialize.}}
=== Returns ===
{{param|value|data|[[Data]]/[[string]] which contains the serialized data.}}

== Notes ==
Packing integers with values greater than 2^53 is not supported, as Lua 5.1 cannot represent those values in its number type. 

== See Also ==
* [[parent::love.data]]
* [[love.data.unpack]]
* [[love.data.getPackedSize]]
[[Category:Functions]]
{{#set:Description=Packs (serializes) simple Lua values.}}
== Other Languages ==
{{i18n|love.data.pack}}