The Cost of Compression: Investigating the Impact of Compression on Parametric Knowledge in Language Models