one way to reduce the size of the header is to take a frequency approach, but to also think about how many bytes you really need to store each integer. answering this question relates to the maximum size of the files that you are required to encode: your compress program must work for input files up to 10 mb in size, so a particular byte value may occur up to ~10 million times in the file. this fact should help you determine the minimum number of bytes required to represent each frequency count in your header.