
"""simple docstring"""
from math import isclose, sqrt

def  lowercase     (_lowerCAmelCase ,    _lowerCAmelCase ,    _lowerCAmelCase						):
						__lowerCAmelCase     =  point_y / 4 / point_x
						__lowerCAmelCase     =  2 * normal_gradient / (1 + normal_gradient * normal_gradient)
						__lowerCAmelCase     =  (1 - normal_gradient * normal_gradient) / (
						    1 + normal_gradient * normal_gradient
						)
						__lowerCAmelCase     =  (sa - ca * incoming_gradient) / (ca + sa * incoming_gradient)

						# to find the next point, solve the simultaeneous equations:
						# y^2 + 4x^2 = 100
						# y - b = m * (x - a)
						# ==> A x^2 + B x + C = 0
						__lowerCAmelCase     =  outgoing_gradient**2 + 4
						__lowerCAmelCase     =  2 * outgoing_gradient * (point_y - outgoing_gradient * point_x)
						__lowerCAmelCase     =  (point_y - outgoing_gradient * point_x) ** 2 - 100

						__lowerCAmelCase     =  (
						    -linear_term - sqrt(linear_term**2 - 4 * quadratic_term * constant_term						)
						) / (2 * quadratic_term)
						__lowerCAmelCase     =  (
						    -linear_term + sqrt(linear_term**2 - 4 * quadratic_term * constant_term						)
						) / (2 * quadratic_term)

						# two solutions, one of which is our input point
						__lowerCAmelCase     =  x_minus if isclose(lowerCAmelCase__ ,    lowerCAmelCase__						) else x_plus
						__lowerCAmelCase     =  point_y + outgoing_gradient * (next_x - point_x)

						return next_x, next_y, outgoing_gradient

def  lowercase     (_lowerCAmelCase = 1.4 ,    _lowerCAmelCase = -9.6						):
						__lowerCAmelCase     =  0
						__lowerCAmelCase     =  first_x_coord
						__lowerCAmelCase     =  first_y_coord
						__lowerCAmelCase     =  (10.1 - point_y) / (0.0 - point_x)

						while not (-0.01 <= point_x <= 0.01 and point_y > 0):
												__lowerCAmelCase   ,     __lowerCAmelCase   ,     __lowerCAmelCase     =  next_point(lowerCAmelCase__ ,    lowerCAmelCase__ ,    lowerCAmelCase__						)
												num_reflections += 1

						return num_reflections


if __name__ == "__main__":
			print(F"{solution() = }")





import math
import sys






def  lowerCamelCase_	(      lowerCAmelCase__	:	str				)       ->							str:

							'''simple docstring'''






							A      						=    ''
							try:
														with open(lowerCAmelCase__			,	'rb'				) as binary_file:
																					A      						=    binary_file.read()
														for dat in data:
																					A      						=    F'''{dat:08b}'''
																					result += curr_byte
														return result
							except OSError:
														print('File not accessible'				)
														sys.exit()






def  lowerCamelCase_	(      lowerCAmelCase__	:	str				)       ->							str:

							'''simple docstring'''






							A      						=    {'0': '0', '1': '1'}
							A						,   A      						=    '', ''
							A      						=    len(lowerCAmelCase__				)

							for i in range(len(lowerCAmelCase__				)				):
														curr_string += data_bits[i]
														if curr_string not in lexicon:
																					continue

														A      						=    lexicon[curr_string]
														result += last_match_id
														A      						=    last_match_id + '0'

														if math.loga(lowerCAmelCase__				).is_integer():
																					A      						=    {}
																					for curr_key in list(lowerCAmelCase__				):
																												A      						=    lexicon.pop(lowerCAmelCase__				)
																					A      						=    new_lex

														A      						=    last_match_id + '1'
														index += 1
														A      						=    ''
							return result






def  lowerCamelCase_	(      lowerCAmelCase__	:	str			,	lowerCAmelCase__	:	str				)       ->							None:

							'''simple docstring'''






							A      						=    8
							try:
														with open(lowerCAmelCase__			,	'wb'				) as opened_file:
																					A      						=    [
																					    to_write[i : i + byte_length]
																					    for i in range(0			,	len(lowerCAmelCase__				)			,	lowerCAmelCase__				)
																					]

																					if len(result_byte_array[-1]				) % byte_length == 0:
																												result_byte_array.append('10000000'				)
																					else:
																												result_byte_array[-1] += "1" + "0" * (
																												    byte_length - len(result_byte_array[-1]				) - 1
																												)

																					for elem in result_byte_array[:-1]:
																												opened_file.write(int(lowerCAmelCase__			,	2				).to_bytes(1			,	byteorder='big'				)				)
							except OSError:
														print('File not accessible'				)
														sys.exit()






def  lowerCamelCase_	(      lowerCAmelCase__	:	str				)       ->							str:

							'''simple docstring'''






							A      						=    0
							for letter in data_bits:
														if letter == "1":
																					break
														counter += 1

							A      						=    data_bits[counter:]
							A      						=    data_bits[counter + 1 :]
							return data_bits






def  lowerCamelCase_	(      lowerCAmelCase__	:	str			,	lowerCAmelCase__	:	str				)       ->							None:

							'''simple docstring'''






							A      						=    read_file_binary(lowerCAmelCase__				)
							A      						=    remove_prefix(lowerCAmelCase__				)
							A      						=    decompress_data(lowerCAmelCase__				)
							write_file_binary(lowerCAmelCase__			,	lowerCAmelCase__				)


if __name__ == "__main__":
				compress(sys.argv[1], sys.argv[2])