1. A computer-implemented method of data compression, the method comprising: identifying a dataset representing one or more images, wherein the dataset comprises at least one of point cloud data or points from a 3D mesh; determining a set of voxels for the dataset; determining a set of 2D slices from the set of voxels of the dataset, wherein determining the set of 2D slices comprises slicing the set of voxels in one direction to form cross-sections of the one or more images, and wherein the one direction is parallel to a coordinate axis corresponding to a shortest side of a bounding box for the set of voxels to form the set of 2D slices that are orthogonal to the shortest side of the bounding box; determining a set of segments for each slice in the set of 2D slices; wherein a segment comprises one or more connected pixels in a 2D slice; compressing, by one or more processors, each segment in the set of segments to form a compressed set of 2D slices; and applying entropy coding to the compressed set of 2D slices.