Packing/unpacking in preprocessing; tests.