Compress.Encode=function(N)local f=false if type(N)=="\116\097\098\108\101"then local z=pcall(function()N=_L.Services.HttpService:JSONEncode(N)f=true end)if not z or not N then _L.Print("\070\097\105\108\101\100 \116\111 \099\111\110\118\101\114\116 \116\097\098\108\101 \116\111 \115\116\114\105\110\103",true)return end end local z=Encode(N)if utf8.len(N)>utf8.len(z)then return z else return N,f end end
--- Encode/compress
Compress.Encode = function(str)
	--- Vars
	local convertedToJSON = false

	--- Convert table to JSON
	if type(str) == "table" then
		--- Attempt to conver to JSON
		local success = pcall(function()
			str = _L.Services.HttpService:JSONEncode(str)
			convertedToJSON = true
		end)

		--- Failed to encode to JSON (userdata or empty?)
		if (not success) or not str then
			_L.Print("Failed to convert table to string", true)
			return
		end
	end

	--- Compress string
	local encoded = Encode(str)
	if utf8.len(str) > utf8.len(encoded) then
		--- Successfully compressed
		return encoded
	else
		--- Size of compressed string larger than original
		return str, convertedToJSON
	end
end
