(lencoding, x)
return lencoding(first_part) + binary(a,k)
The compressed data is calculated in two parts. 
	The first part is the unary number of 1 + ⌊log2(x)⌋. 
	The second part is the binary number of x - 2^(⌊log2(x)⌋).
	For the final result we add these two parts.
The compressed data is calculated in two parts. 
	The first part is the unary number of 1 + ⌊log2(x)⌋. 
	The second part is the binary number of x - 2^(⌊log2(x)⌋).
	For the final result we add these two parts.
The compressed data is calculated in two parts . The first part is the unary number of 1 + ⌊log2 ( x ) ⌋ . The second part is the binary number of x - 2^ ( ⌊log2 ( x ) ⌋ ) . For the final result we add these two parts .
def elias_generic(lencoding, x):
	"""
	The compressed data is calculated in two parts. 
	The first part is the unary number of 1 + ⌊log2(x)⌋. 
	The second part is the binary number of x - 2^(⌊log2(x)⌋).
	For the final result we add these two parts.
	"""
	if x == 0: return '0'
	
	first_part = 1 + int(log2(x))
	
	a = x - 2**(int(log2(x)))
	
	k = int(log2(x))

	return lencoding(first_part) + binary(a,k)
def elias_generic ( lencoding , x ) : if x == 0 : return '0' first_part = 1 + int ( log2 ( x ) ) a = x - 2 ** ( int ( log2 ( x ) ) ) k = int ( log2 ( x ) ) return lencoding ( first_part ) + binary ( a , k )