Defensive swimming conserves energy.  Basically float on your back and use backstroke techniques to navigate to shore.  Keep your feet on the surface and use them as shock absorbers to bounce off rocks.  If you are about to go over a large drop or falls,curl into a ball so your feet don't hit the surface first and potentially become entrapped.  It is important to grab breaths of air when available.  If you are heading into an exploding wave, over a drop, or into a hole - grab a deep breath before getting submerged.  The laid back position is perfect for holding on a throw rope as well.  This article provides a lot of guidance for both defensive and aggressive swimming techniques: Swiftwater Swimming.  Here is a good video on defensive swimming: Defensive Swimming.

Aggressive swimming is used to get from point a to point b as fast as possible.  Perhaps there is a big drop below or you are floating towards a strainer.  Flip from your back to your belly and kick it into high gear with an American crawl.  Pretend you are a boat and set a ferry angle to cross fast moving current without floating downstream too far.  To break an eddy fence, barrel roll over it.  Another special form of aggressive swimming is when you can't avoid a strainer.  Turn around and go head first towards the strainer as fast as you can.  When you reach the strainer, push down on it and dive over the strainer.  Here is a good video on aggressive swimming techniques: Aggressive Swimming.  This is a video on how to swim over a strainer: Swimming over a Strainer.  This is a good video on dealing with eddies and the barrel roll technique:Swimming into an Eddy.

After a long swim (and beat down), you will be very tempted to stand up when you get close to shore.  Think before you stand.  If the water is moving quickly and deeper than your knees, you could slip and fall.  Worse yet, unstable footing can lead to foot entrapment.  Wait for still water like an eddy.  Always take your time standing and make certain you have decent footing.  Here is a decent video on the subject: When to Stand.

Even if your roll is 100% bombproof, take time to practice aggressive swimming techniques.  Even the best boaters swim occasionally (although not  very often).  Knowing how to swim in powerful water can save your life.  Short sprints of very aggressive swimming can also enable you to reach a pin victim very rapidly.

Although everyone strives for that perfect roll, sooner or later most of us swim (although it may be years in between those swims).  In addition, many rescues require getting someone out to the victim in a big hurry.  This is especially true for entrapment and some unstable pins.  Getting to the victim may require some boating, wading, and judicious swimming.  Really good boaters can pretty much swim any rapid up to class IV (and some class V rapids as well).  Two broad categories of swimming techniques are defensive (save your energy) and aggressive (get to a safe location ASAP!).  Knowing how to properly swim in whitewater can not only help you save others, it may save your life some day.  Here is a very humorous introduction to this subject: Revised Rapid Ratings Swim Scale.

Remember the acronym RETHROG.  This article covers the forst two parts - Reach and Throw.Reach is pretty easy to understand, someone fell off a bank close by.  You can simply reach down and grab them.  For a bit more reach, you can toss them webbing you might be carrying with you.  Throwing is much more common.  A key piece of gear every intermediate whitewater boater should have is a throw rope.  Throw ropes vary in length between 50' and 70'.  It takes some practice to become skilled in tossing a throw rope but in an emergency, your practice will pay off quite handsomely.  You typically aim for the center of their chest - don't make them swim for a rope as that can be quite dangerous.  Once they grab the line, be prepared with a strong belay position to handle the shock load.  Whenever working with ropes, set safety above and below the rapid.  The upstream person is responsible for warning other boaters about the danger down below.  You should also have some sort of cutting tool like a knife or trauma shears to protect against entanglement.  Here is a short video with an example: Throw Rope Toss.