implement hex file compression.