Social networks are platforms that collect data related to human interactions and social characteristics, and due to the volume of data, the need for analysis methods is felt. Social network analysis (SNA) involves examining the structure of human interaction graphs using network theory and graph theory. Graphs are topological mathematical structures that are used to model various problems. Community clustering and detection is a key analysis performed on graph vertices. Community detection is an important task in social network analysis. To solve this problem, many community detection algorithms are based on graph theory. Despite all the advantages and interesting ideas, these algorithms are not very effective in analyzing social networks on a large scale. Community detection methods in large-scale social networks face challenges due to the large amount of data in social networks, which turns it into an NP-hard problem that has not yet been fully solved. Recent research has focused on developing algorithms with low computational complexity and high scalability. To solve this problem, in this research, we have proposed a new community detection algorithm based on graph compression for large-scale social networks. The simulation results of the proposed method show that this method can be applied with high accuracy (NMI=0.7364) and little computational complexity on standard networks.