Uncovering and explaining how our digital world is changing — and changing us.

For nearly two decades, the music business was in free fall. Now that’s over, thanks to streaming.

The music industry has known this for a while, but today we have another data point: U.S. music sales were up 14 percent when adjusted for inflation, to $8.7 billion last year, according to the labels’ trade group.

That’s the second year in a row that the industry has seen a significant leap in revenue, and that’s due entirely to streaming services like Spotify and Apple Music, which are more than balancing the decline in CD sales (people still buy CDs!) and download sales.

The industry still isn’t back to where it was at its 1999-ish peak, when Britney Spears was a giant star and people bought CDs for $15, even if they only wanted to hear a single song. But it is getting much closer than optimists might have imagined only a few years ago.

Related: That boom in streaming subscriptions — and the belief that there is much more growth to come — is the reason Spotify is set to go public next month, even though the music service isn’t close to turning a profit. It is telling investors that it is going to sell many more subscriptions — it is currently at 70 million worldwide — and that as it does, its margins will get much better.

Sign up for the newsletter Recode Daily Email (required) By signing up, you agree to our Privacy Notice and European users agree to the data transfer policy. Subscribe