Lua extensions implemented according to PHP's pack/unpack