JP3D compression of solar data-cubes: photospheric imaging and spectropolarimetry