function splitbyte(K)local D,O,r=string.byte(K),128,{false;false;false;false;false;false,false;false}for K=1,8,1 do if D>=O then r[K],D=true,D-O end O=O/2 end return r end function formbyte(...)local K=0 for D=1,8,1 do local O=select(D,...)if O then K=K+2^(8-D)end end return string.char(K)end local K="\102"function deflate(D,...)return string.pack(string.rep(D or K,#{...}),...)end function flate(D,O,r)return string.unpack(string.rep(D or K,r),O)end function getNativeSize(D)return#string.pack(D or K,1)end
-- This is were the magic happens!
function splitbyte(input)
	local byte, p, flags = string.byte(input), 128, { false, false, false, false, false, false, false, false }
	for i = 1, 8 do
		if byte >= p then
			flags[i], byte = true, byte - p
		end
		p = p / 2
	end
	return flags
end
function formbyte(...)
	local byte = 0
	for p = 1, 8 do
		local bit = select(p, ...)
		if bit then
			byte = byte + 2 ^ (8 - p)
		end
	end
	return string.char(byte)
end
local valueType = "f"
function deflate(forceType, ...)
	return string.pack(string.rep(forceType or valueType, #{ ... }), ...)
end
function flate(forceType, raw, n)
	return string.unpack(string.rep(forceType or valueType, n), raw)
end

function getNativeSize(forceType)
	return #string.pack(forceType or valueType, 1)
end
