1. A method for adding cooperative file coloring to data segments in a similarity based deduplication system using a processor device in a computing environment, comprising: parsing input streams of a backup application and marking the data segments with file coloring that represents a source file of the backup application for comparing the data segments to determine if the data segments are identical during a similarity check operation in the similarity based deduplication system, thereby identifying and associating incoming backup data with previous generations of the backup data; representing a preferred character for the file coloring in the data segments using a code selected from a plurality of codes that represent a plurality of contexts, wherein an original meaning of the preferred character is retained when representing the preferred character for the file coloring by the code selected from the plurality of codes; and deduplicating the data segments according to the file coloring that represents the source file of the backup application.