Method for Measuring the Magnetic Properties of High-Density Magnetic Composites Under Compressive Stress