Is there way to compress the core files during core dump generation?

If the storage space is limited in the system, is there a way of conserving it in case of need for core dump generation with immediate compression?

Ideally the method would work on older versions of linux such as 2.6.x.

Edit
Report