As a technology that can prevent the information of original image and additional information from being disclosed, the reversible data hiding in encrypted images (RDHEI) has been widely concerned by researchers. How to further improve the performance of RDHEI methods has become a focus of research. To this end, this work proposes a high-capacity RDHEI method based on bit plane compression of prediction error. Firstly, to reserve the room for embedding information, the image owner rearranges and compresses the bit plane of prediction error. Next, the image after reserving room is encrypted with a serect key. Finally, the information hiding device embeds the additional information into the reserved room. This paper makes full use of the correlation between adjacent pixels. Experimental results show that this method can realize the real reversibility and provide higher embedding capacity than state-of-the-art works.