Hello! Are you trying to create a program that does file compression? If so, it might be important for you to look for compression algorithms.

Regards