With pirated material available online, the conversion from hard copy to digital ebook formats, and budget cuts, libraries are in danger of going extinct.