I just read that, when a ray of light traveling in vacuum at $c$ strikes a glass slab, its speed decreases and then when it re-emerges it gets back to its original speed i.e $c$.
If I draw a comparison with a bullet fired at a metal sheet, then when it re-emerges its speed is drastically reduced.
So, why hasn't the same principle been applied in both the situations? Doesn't the first case violate any energy principle?