Image compression has become an inevitable tool along with the advancing medical data acquisition and telemedicine systems. The run-length encoding (RLE), one of the most effective and practical lossless compression techniques, is widely used in two-dimensional space with common scanning forms such as zigzag and linear. In this study, an algorithm which takes advantage of the potential simplicity of the run-length algorithm is devised in a volumetric approach for three-dimensional (3D) binary medical data. The proposed algorithm, namely 3D-RLE, being different from the two-dimensional approach that utilizes only intra-slice correlations, is designed to compress binary volumetric data by employing also the inter-slice correlation between the voxels. Furthermore, it is extended to several scanning forms such as Hilbert and perimeter to determine an optimal scanning procedure coherent with the morphology of the segmented organ in data. The algorithm is employed on four datasets for a comprehensive assessment. Numerical simulation results demonstrated that the performance of the algorithm is 1:30 better than those of the state-of-the-art techniques, on average.