Last month an e-mail message washed up at the offices of The Cook Islands News in the South Pacific. It was a request to place a half-page advertisement in the newspaper, which has a circulation of 2,500. The cost was $370.

“We were amazed  it came from out of nowhere,” the newspaper’s editor, John Woods, said in a telephone interview. “We are very skeptical of ads like that.”

Even more surprising was who was paying for it: Google.

Google, the online giant, had been sued in federal court by a large group of authors and publishers who claimed that its plan to scan all the books in the world violated their copyrights.

As part of the class-action settlement, Google will pay $125 million to create a system under which customers will be charged for reading a copyrighted book, with the copyright holder and Google both taking percentages; copyright holders will also receive a flat fee for the initial scanning, and can opt out of the whole system if they wish.