Are there any efficient algorithems to find packets similarities in a list? I would like to make a program which finds similar packets (there might be more then one class of similarity) in packet list (which is updated all the time). Are there any efficient algorithems to find these similarities?

By similarities I mean that they have the same size, type and payload. 

I thought about using tree(with conditions on the branches just like  decision tree) or vector support machine with k classes (k>2), but it means that it should have a lot of classes/nodes. Say there are 10 different packets and 2 kinds of similar packets (3 packets in each group). Then there will be 10 classes with single packet, 2 classes with 3 packets - So its size depends on the amount of packets which can be really big. 

thank you
There are many possible approaches for measuring document similarity:


edit distance
shingling
Jaccard similarity
TF-IDF and cosine similarity
https://stackoverflow.com/q/101569/781723
https://stackoverflow.com/q/8897593/781723
https://stackoverflow.com/q/29842137/781723


I suggest you think more about what metric makes sense for you, and review the literature on information retrieval and natural language processing to see what metrics have been used in other contexts.