Implement event compression