“How Music Got Free: The End of an Industry, the Turn of the Century, and the Patient Zero of Piracy,” by Stephen Witt. (Viking)

If you were casting the part of Man Who Brings Record Industry to Its Knees, Dell Glover probably wouldn’t make the cut. An unskilled laborer with no college education, he lived in a small Baptist town in western North Carolina, slaved for long hours at low pay and reserved his spare time for dance clubs, street bikes, guns and pit bulls.

But he knew a little bit about computers, and in 1999, after making inroads with an uber-secretive Internet group called Rabid Neurosis (RNS), he discovered his life’s mission. Drawing on his access as a shrink-wrapper at the local compact-disc manufacturing plant, he would smuggle out virtually every major CD release as soon as it was packaged and turn it over to an online spymaster named Kali.

In this fashion, hundreds upon hundreds of discs — from artists such as Jay Z, Mariah Carey, Eminem, Mary J. Blige, Kanye West and Beyoncé — were uploaded free to the Internet two weeks before their price-tagged counterparts hit the stores. Glover became the world’s premier music pirate, and with his help RNS became, in the words of the U.S. government, “the most pervasive and infamous Internet piracy group in history,” leaking some 20,000 albums over 11 years and costing the record industry millions.

Maybe you’d like to know how such a thing could happen. Or maybe you’re wondering where all the Tower Records stores went, or why your kids listen to music on YouTube, or what motivated J.K. Rowling to take down an operation called Oink’s Pink Palace, or what it’s like to listen to “Tom’s Diner” 2,000 times in a row (because somebody did). Whatever the case, you need to get hold of Stephen Witt’s jaundiced, whip-smart, superbly reported and indispensable “How Music Got Free.”

Only then can you meet the fella who made wide-scale music theft possible: a bearded German electrical engineer with the 18th-century name of Karlheinz Brandenburg. While still a graduate student, Brandenburg developed a rudimentary program for compressing audio into the smallest possible number of bits — which is to say, the bits the human ear could actually discern. At the state-run Fraunhofer Society, Brandenburg and his team turned that algorithm into a technology that could re-create the fidelity of a CD at one-twelfth the size.

Shawn Fanning, the creator and founder of Napster, appears at a forum on file sharing in Washington in April 2001. (David Scull/Napster via AFP)

“Do you realize what you’ve done?” cried one impresario. “You’ve killed the music industry!”

Brandenburg didn’t believe it at first, and neither did the industry. In the late 1990s, Americans were spending more on recorded songs than they ever had, and the accepted vehicle for that transaction was the compact disc: sleek, practical, easily replicated, and with at least a nodding kinship to the vinyl album it had superseded.

But the sudden availability of Brandenburg’s technology turned day into night. “On websites and underground file servers across the world,” Witt writes, “the number of mp3 files in existence grew by several orders of magnitude. In dorm rooms everywhere incoming college freshmen found their hard drives filled to capacity with pirated mp3s. . . . Music piracy became to the late ’90s what drug experimentation was to the late ’60s: a generation-wide flouting of both social norms and the existing body of law, with little thought of consequences.”

Of course, unscrupulous operators had been running roughshod over copyright for centuries, but this was piracy on an unprecedented scale, and it was predicated on the most basic of notions, that “if something was available for free, and could be freely and infinitely reproduced for free, with no degradation in quality, why would anyone pay to own it?”

With the arrival of Napster, users anywhere could acquire virtually any song, free, in a matter of seconds. The effects were not long in being felt. Between 2000 and 2007, CD sales plunged by 50 percent. By the end of the decade, the recording industry itself had been halved. Record companies merged or vanished; record stores disappeared (bye, Tower); and powerful execs like Doug Morris, then-head of the Universal Music Group, began to wonder if they were presiding over the liquidation of their own empire.

The industry’s initial response was ham-fisted: a campaign of “educational” lawsuits aimed not at pirate masterminds but at individual file-sharers, many of whom were too poor to cough up damages. Morris at least had the inspiration to launch Vevo, a YouTube channel that transformed music videos from promotional freebies into profit centers. But the surprise savior was prickly visionary Steve Jobs, who appreciated better than anyone the importance of intellectual property. Apple’s iTunes provided an easy way to download mp3s at a small cost to users, and Apple’s iPod offered the consummate listening gadget.

End of story? Not quite. To date, digital revenues haven’t fully plugged the deficit. Napster is long gone, but streaming media such as Spotify have devised subtler ways to stiff creators. And yet, against all prognostications, CDs (like printed books) live. Even in 2013, Witt tells us, “more than a third of the U.S. music industry’s revenues still came from physical album sales, and more than half globally.”

A version of Apple’s popular iPod mp3 player was introduced, featuring a larger hard drive and new software, at the Macworld Conference and Expo in New York in July 2002. (Chip East/Reuters)

These are, in short, uneasy times, and no one should go too easy on himself. Least of all Witt, who acknowledges up front that he is a “member of the pirate generation,” with hundreds of bootlegged songs in his computer files. In the book’s closing tableau, his accumulated hard drives are tossed in a Dumpster, but what survives is the millennial assumption that paying for creative expression is, in the words of the Swedish Pirate Party, “infringing on fundamental human rights.” Art? Meet entitlement.

Louis Bayard is a novelist and reviewer. His most recent book is “Roosevelt’s Beast.”

For more books coverage, go to washingtonpost.com/books.