#NEWLINE# def encodeint( y ) : #NEWLINE# #INDENT# bits = [ ( ( y >> i ) & 1 ) for i in range ( b ) ] #NEWLINE# e = [ sum ( [ ( bits [ ( ( i * 8 ) + j ) ] << i ) for j in range ( 8 ) ] ) for i in range ( ( b // 8 ) ) ] #NEWLINE# return asbytes ( e )