Posters point wasn't that the vehicles you drive didn't effectively have engine breaking, but that in diesel designs this is something that had to be added intentionally - with [edit gas engines] you get it whether you want it or not.
Fun fact - the effect can be strong enough on a high compression motorcycle engine to break your rear tire free (obviously lots of other parameters there).
But what do you mean by 4 cycles. The diesel engines I know all have 4 cycles. I though 2 cycles engines were found on old tractors from the 50s no?
Edit: Looking at [0], assuming this is true, I understand the confusion now. It seems, in the US, heavy duty diesel engines are 2 strokes which, apparently, do not have engine braking.
Me being sloppy, of course you can have 2-stroke or 4-stroke diesels. Edited to improve.
The main thing going on here isn't the cycles, it's the lack of a throttle plate. With these designs the amount of air entering cylinder doesn't relate to your throttle position.
If you come off the throttle every compression cycle a "full" cylinder of new air gets compressed, then decompresses and pushes against the piston. In normal operation the energy is re-transferred to the crank (with some loss). It sort of "bounces". But with a compression brake, you force the engine to do the work of compressing that air, but then full open the exhaust valve to let the pressure escape... much more energy lost each cycle, which transfers through drive train and slows you down.
In comparison to typical ICE: in that case when you come off the throttle, the intake is sealed off, so the cylinder on intake stroke is "sucking" against a closed path, which loses energy. Similar effect, different cause.
In a 4-stroke engine, throttle or not, intake valves are shut down when in compression so cylinders are sealed off, compression happens anyway, diesel or gas. Indeed, in 2-cycles engines there are not intake valve so LinuxBender's point is valid.
I think you misread; I should have been clearer. This is how I understand/remember it although to be fair it's been a while since I've worked on either so might mess it up a bit.
Anyway it has nothing to do with compression or the intake valve in either case. Compression happens in both cases, and doesn't affect anything.
In diesel, Jake type breaks steal energy by opening the exhaust valve right after TDC, e.g. what would be the power stroke. The energy stored in compressed air escapes out the exhaust valve rather than being (mostly) reclaimed by the crank on expansion - this slows down the crank and hence (if not in neutral) the vehicle slows. NB this is not when the exhaust valve would normally open, but rather a cycle earlier.
In gas, on the intake stroke the intake is blocked (not by the valve, further up by throttle) so the intake motion creates vaccuum - this takes energy, which slows down the crank, and hence etc. etc. The exhaust valve doesn't change timing.
The latter approach only works if you have something blocking the intake "above" the intake valve. In a diesel engine the airflow is kept the same and the fuel adjusted (unlike gas) so there is no natural mechanism to do this with the throttle.
Most of the energy stored in the cylinder charge during the compression stroke is returned (as if an air spring) on the (what would be the) power stroke. The difference between a gas and diesel engine shows up in the higher pumping losses on the intake stroke (if you're pulling air past a closed throttle plate or not).
Fun fact - the effect can be strong enough on a high compression motorcycle engine to break your rear tire free (obviously lots of other parameters there).