MCPcopy
hub / github.com/TheAlgorithms/Python / compress

Function compress

data_compression/lempel_ziv_decompress.py:100–107  ·  view source on GitHub ↗

Reads source file, decompresses it and writes the result in destination file

(source_path: str, destination_path: str)

Source from the content-addressed store, hash-verified

98
99
100def compress(source_path: str, destination_path: str) -> None:
101 """
102 Reads source file, decompresses it and writes the result in destination file
103 """
104 data_bits = read_file_binary(source_path)
105 data_bits = remove_prefix(data_bits)
106 decompressed = decompress_data(data_bits)
107 write_file_binary(destination_path, decompressed)
108
109
110if __name__ == "__main__":

Callers 1

Calls 4

remove_prefixFunction · 0.85
decompress_dataFunction · 0.85
read_file_binaryFunction · 0.70
write_file_binaryFunction · 0.70

Tested by

no test coverage detected