In the last 20 years, the variables in this equation have shifted radically. Computers have reduced the effort needed to write and edit a book, while distribution now has no cost at all.
Our intellectual property system very desperately needs to be reexamined in light of the way technology is changing creative production. What matters here is what benefits our entire civilization the most, not what any individual author 'deserves'.
It's clear to me that author moral rights are barely relevant here, since the decision to write a book or not is up to the author. Piracy is a fact, and so are libraries. Somebody who is thinking about writing a book needs to evaluate the effect that both piracy and libraries are going to have on their personal motivations for writing the book and reach a conclusion about whether or not it makes sense for them to put in the effort.