Are there any efficient algorithems to find packets similarities in a list?
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.