Here some raw code in c#:
voxelization c#.gh (14.5 KB)
It iteratively save each box that is fully inside the solid (by doing distance check with box diagonal) and split other boxex into 8 smaller (half size) for the next iteration. Boxes that are outside are discarded.
As how this works it always result in a set of boxex that is smaller than the original shape (it would take infinite time to reach correct volume).
43k boxes (centers+sizes) in less than a second, boxes have different size.
The rest of the work, the reconstruction and displaying of the boxes is actually more heavy: rhino viewport almost frozen (really low redraw fps) and baking take most of the time… so components inside attached solution are disabled.

