U.S. album sales were down 4.2 percent in the first half of the year, but sales of music downloaded online soared 77 percent, according to industry figures.

Total sales of albums across different formats — CDs, digital albums, cassette and others — stood at 270.6 million between Jan. 2 and July 2, compared to 282.6 million in the same period last year, according to Nielsen SoundScan figures released Friday.

The top-selling album so far this year is a soundtrack inspired by the Disney Channel movie "High School Musical," which has sold more than 2.6 million units.

Albums by Rascal Flatts, James Blunt, Mary J. Blige and Carrie Underwood round out the top five.

The decline reflects in part a dearth of big hits compared to the same period in 2005, which saw Mariah Carey and rapper 50 Cent each release multi-platinum sellers.

"Considering that you haven't had a 50 Cent to be the Pied Piper during the first half of the year or a Norah Jones the year before that, being behind 4 percent in album sales is really not that bad," said Geoff Mayfield, director of charts for music tracker Billboard.

The R&B genre accounted for the biggest slice of all albums sold so far this year with 53,806, but also represented the biggest percentage drop — 22.4 percent — in units sold by genre from the same period last year.

The country music genre saw a 17.7 percent increase in sales over the first half of 2005, the highest percentage of all.

While the CD remains the dominant album format despite a sales decline in all but one of the last five years, music fans have been increasingly buying digital downloads of single tracks and full albums.

Nearly 281 million digital singles were purchased through July 2, compared to 158.8 million in the time frame last year. More than 14 million full-album downloads were purchased in the first six months of this year, more than double the 6.5 million bought in the first half of 2005.

The growth of online music purchases is a mixed blessing for recording companies, however. Such sales often come at the expense of more profitable album sales as music fans opt to cherry pick a few songs online instead of purchasing a whole album.

"Digital distribution is an answer to the consumer who's been throwing up that complaint," Mayfield said. "It's a changing dynamic that the industry still needs to get its arms around."

Despite rampant music piracy, overall sales of albums, singles, music videos and digital music totaled 564 million units, a 23 percent increase over the same six-month period last year.

Among the four major recording companies, Universal Music Group led the pack with a market share of 31.66 percent. Sony BMG Music Entertainment was second with 26.25 percent market share, followed by Warner Music Group's 19.30 percent and Britain's EMI Music's 10 percent.

Independent record labels accounted for 12.79 percent of market share.