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