This info is found on Bad Ass Cars.com How do cams affect compression?
I am pasting it here to ensure it remains should the link or website disappear. This gives a great explanation of the camshaft.
How do cams affect compression?
This is a good one with no single answer. There are several types of compression such as "static" and "effective" (aka "dynamic") compression. It all has to do with cylinder pressure. Static compression is the actual mechanical compression ratio number that you get by combining a given piston size with a given combustion chamber size, with a given amount of stroke and displacement of the engine. So; bore, stroke, compression height, deck height, head gasket thickness and combustion chamber size, (among others), have to do with the "static compression", but they don't dictate the actual working or "effective" aka "dynamic" compression which directly affects "cylinder pressure". The cam dictates this for the engine.
Example: two identical engines both with 9:1 "static compression". The only difference is in the cam profiles. One has no overlap with a given intake valve timing to go along with the rest of the cam's profile, and the other has a lot of overlap with a completely different intake valve timing to go with that cam's overall profile. Overlap is the time in which both valves are open as the piston pushes exhaust out and starts to suck new fuel and air into the cylinder. When the exhaust valve is closing and the intake valve begins to open, there is a time (on high performance and race cams) where both valves are actually open at the same time. As both valves are open, a little "reversion" gets pushed up the intake valve which slows the overall velocity down of the new fuel & air charge coming into the cylinder, and exhaust gas trying to still get out of the cylinder at low RPMs. This overlap period in the valve timing is what causes that "rumpity rump" sound everyone likes so much. Overlap causes a "scavenging effect" as the engine RPM increases. This is why performance cams "come alive" at higher RPMs. It's not "just" the cam making the power, it's the cam's scavenging effect working as the RPM increases which increases cylinder pressure (dynamic or effective compression). Cylinder pressure makes the power. The downside to that rumpidy rump sound in most street engines is that the overlap also causes a decrease in manifold vacuum, making power brakes a nightmare and throttle response a bit sluggish.
When you have too much overlap, you end-up with a dog for an engine at low RPM's and the car will require things to make up for it such as low rear-end gears and high stall converters to help "spool the engine up" quicker to GET IT TO those higher RPMs where it can begin to do its scavenging thing and increase cylinder pressure. When you have too much overlap in an engine without enough static compression to support it, it is what's known as being over-cammed. Lots of sound but not lots of GO, especially at low RPMs. Lots of engines out there are over cammed because guys like that rumpity rump sound, not knowing that although in many cases it may make more power at a higher RPM, it kills low-end power and torque which is what street performance engines should be concentrating on. TORQUE is what moves the vehicle below 4,000 RPM, not horsepower. Unfortunately, most guys only look at HP numbers, which is why there are a lot of turd cars out there.
Now, I get into arguments all of the time with guys who want to get technical with me, and they lose every time. They want to say that math and physics say horsepower and torque cross each other at 5,250 RPM, which is true, but that's where they CROSS, not where they are most effective! In other words, when it comes to torque, the closer your get to 5,250 RPM, the LESS EFFECTIVE torque becomes because horsepower is coming-up fast and takes over at 5,250. So the further you get below 5,250, the MORE you rely on just torque for moving that vehicle. 95% o the time for most street cars, you are driving below 4,000 RPM, and usually under 3,000, so in those RPM ranges, you are almost solely relying on JUST torque to move that vehicle, therefore, in MOST situations, everything below about 4,000 or so you are pretty much relying on torque, NOT horsepower to move that vehicle. In the real world you aren't always relying on nerd math and literal physics. There is also a real world out there that has other variables working in it.
So back to those two identical engines with different cams; if you did a compression test on either of these two 9:1 static compression engines, the engine with no overlap (or even negative overlap) would probably have about 140 -150psi or so in the cylinders. The engine with more overlap may only have 110 - 120 psi or so, depending on how much overlap the cam has, how narrow the lobe separation angle is, and most importantly... what the intake valve timing is.
Some racing engines with 13:1 or so compression only have 125psi - 150 psi or so of cylinder pressure when a compression test is done. That's less than what most bone stock engines have. It just means that the cam has a ton of overlap and has intake valve timing designed to work with the rest of the cam's profile to create that scavenging effect, which in turn actually increases cylinder pressure at higher RPMs. Not to mention, if you do a compression test on a seriously high performance engine when it's cold, all of the components are at their loosest and don't provide much of a seal because they NEED the heat in the cylinders to expand the pistons and rings to make them seal better.
Static compression always stays the same. You can't change that unless you change the pistons or the heads, the head gasket thickness, etc. This is why race engines have "power bands" and come alive at higher RPM's. It's because the cylinder pressure increases as the engine RPM comes-up. It's from the scavenging effect from the valve timing and overlap in the cam, which raises the cylinder pressure and increases horsepower with RPM. This is what you are feeling when the cam comes alive or hits its power band. if it didn't have the scavenging effect, there wouldn't be much of a power band. It would just be smooth power all through the RPM range like any stock engine has.
Narrowing the lobe separation down also affects the power band. A wider lobe separation will smooth-out and "broader" the power band. On that very same cam, if you narrow the lobe separation, the power band will come-on a little higher in the RPM range, but when it comes-on, the power curve is steep and brutal. This is why hard core race cams have explosive power bands. The static compression never changed, but the effective compression surer did.
As a rule of thumb (and this has a LOT of grey area), you can run upwards of 9.0 - 9.5:1 compression on pump gas with cast iron heads, and "about" one full point higher with aluminum heads because of how quick the combustion chambers cool. Can you run 11:1 static on pump gas? Sure. There are still LOTS of older muscle cars running that have compression ratios that high that run on pump gas. You just have to back the timing off a little. Timing is VERY important when dealing with compression ratios, cams and fuel octanes.