-- 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