Hello Sr EvilTwin
I'm not sure if I get your point of view about this. From what I understand, you like to compare if you have some repeated data inside clipboard, and if yes, ignore that data or perform some action.
Data in this context can be anything, can be a song file, an image file, a text, and can be what I do not have think about.
The solution is to look to data contents of the clipboard with raw eyes, just a byte sequence.
Its inviable if you have bigger files in clipboard, and compare each one against each other can spend some time.
Well, if you take a 'hash' of that data, things can be more easy. So, the 'hash' algorithm (like a mathematical formula) read all the data of specific files and return to you a number (hash). You need store this number for future reference. So, you copy the same file again on clipboard, the algorithm take action, and return to you a number. By comparing hashes, you can know if the file is the same or not.
So, to each file in memory you will have a hash as reference. The hash results generally have 16 bytes longer (spend less time comparing 16 bytes instead of all the file again), can have more or less bytes depending of your hash algorithm.
Linux have a md5sum tool.