The matter isn't compressed -- it's being torn apart. The gravity differential becomes so great that even on the atomic scale, the side of an atom nearer to the singularity is pulled far harder than the side opposite...so hard, the nuclear bonds are broken. Each atom being ripped apart releases a burst of X-rays.
That's not accurate. While that may certainly be happening inside the event horizon, closer to the black hole, the gradient is not that strong outside the event horizon. And we could never observe xrays emitted in this manner, as they all end up in the black hole and never escape the event horizon from within it.
What happens to gas near a black hole is that it loses angular momentum due to magnetic fields and friction, and that energy is converted to thermal energy. The gas then heats up so much that it emits xrays.