

import math
import sys



def   __UpperCAmelCase					(      __a :     str      )     ->	str:

					"""simple docstring"""

					_a      :       Union[str, Any]   =						''''''
					try:
										with open(__a						,'''rb'''      ) as binary_file:
															_a      :       List[str]   =						binary_file.read()
										for dat in data:
															_a      :       str   =						F"""{dat:08b}"""
															result += curr_byte
										return result
					except OSError:
										print('''File not accessible'''      )
										sys.exit()



def   __UpperCAmelCase					(      __a :     str      )     ->	str:

					"""simple docstring"""

					_a      :       Any   =						{'''0''': '''0''', '''1''': '''1'''}
					_a ,   _a      :       Union[str, Any]   =						'''''', ''''''
					_a      :       Union[str, Any]   =						len(__a      )

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

										_a      :       Any   =						lexicon[curr_string]
										result += last_match_id
										_a      :       Optional[Any]   =						last_match_id + '''0'''

										if math.loga(__a      ).is_integer():
															_a      :       str   =						{}
															for curr_key in list(__a      ):
																				_a      :       Optional[int]   =						lexicon.pop(__a      )
															_a      :       Union[str, Any]   =						new_lex

										_a      :       Tuple   =						last_match_id + '''1'''
										index += 1
										_a      :       Dict   =						''''''
					return result



def   __UpperCAmelCase					(      __a :     str						,__a :     str      )     ->	None:

					"""simple docstring"""

					_a      :       List[str]   =						8
					try:
										with open(__a						,'''wb'''      ) as opened_file:
															_a      :       Optional[int]   =						[
															    to_write[i : i + byte_length]
															    for i in range(0						,len(__a      )						,__a      )
															]

															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(__a						,2      ).to_bytes(1						,byteorder='''big'''      )      )
					except OSError:
										print('''File not accessible'''      )
										sys.exit()



def   __UpperCAmelCase					(      __a :     str      )     ->	str:

					"""simple docstring"""

					_a      :       Union[str, Any]   =						0
					for letter in data_bits:
										if letter == "1":
															break
										counter += 1

					_a      :       Union[str, Any]   =						data_bits[counter:]
					_a      :       Optional[Any]   =						data_bits[counter + 1 :]
					return data_bits



def   __UpperCAmelCase					(      __a :     str						,__a :     str      )     ->	None:

					"""simple docstring"""

					_a      :       List[Any]   =						read_file_binary(__a      )
					_a      :       Any   =						remove_prefix(__a      )
					_a      :       Tuple   =						decompress_data(__a      )
					write_file_binary(__a						,__a      )


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










'''simple docstring'''




from collections import Counter
from timeit import timeit




def 						__lowerCamelCase			(	UpperCAmelCase_ = ""					,				)   ->bool:
	return sum(c % 2 for c in Counter(input_str.replace(' '					,				''							).lower()							).values()							) < 2




def 						__lowerCamelCase			(	UpperCAmelCase_ = ""							)   ->bool:
	if len(UpperCAmelCase_							) == 0:
		return True
	snake_case__	       =   input_str.replace(' '					,				''							).lower()
	# character_freq_dict: Stores the frequency of every character in the input string
	snake_case__	       =   {}

	for character in lower_case_input_str:
		snake_case__	       =   character_freq_dict.get(UpperCAmelCase_					,				0							) + 1
	snake_case__	       =   0

	for character_count in character_freq_dict.values():
		if character_count % 2:
			odd_char += 1
	if odd_char > 1:
		return False
	return True




def 						__lowerCamelCase			(	UpperCAmelCase_ = ""							)   ->None:
	print('\nFor string = '					,				UpperCAmelCase_					,				':'							)
	print(
	    '> can_string_be_rearranged_as_palindrome_counter()'					,				'\tans ='					,				can_string_be_rearranged_as_palindrome_counter(UpperCAmelCase_							)					,				'\ttime ='					,				timeit(
	        'z.can_string_be_rearranged_as_palindrome_counter(z.check_str)'					,				setup='import __main__ as z'					,				)					,				'seconds'					,				)
	print(
	    '> can_string_be_rearranged_as_palindrome()'					,				'\tans ='					,				can_string_be_rearranged_as_palindrome(UpperCAmelCase_							)					,				'\ttime ='					,				timeit(
	        'z.can_string_be_rearranged_as_palindrome(z.check_str)'					,				setup='import __main__ as z'					,				)					,				'seconds'					,				)


if __name__ == "__main__":
			a__					:			str          =     input(
			    '''Enter string to determine if it can be rearranged as a palindrome or not: '''
			).strip()
			benchmark(check_str)
			a__					:			List[Any]          =     can_string_be_rearranged_as_palindrome_counter(check_str)
			print(f"""{check_str} can {'' if status else 'not '}be rearranged as a palindrome""")



