Hack code - still work in progress
We write this manually for now - but maybe we should use the MAT-file interface available in MATLAB
Unused R*-Tree algorithm [1] is still present, but unused (notably; OVERFLOW and MIN are both ignored in packing)
There may be potential imporvements that can be made to the packing algorithm to make it better for meshes (some better ordering to keep elements continuous where possible maybe or better bounding boxes)