I have mixed feelings on z-library. I don't condone book piracy but will admit that I've used it in the past in these situations:
1. I have the book in print but want the convenience of reading while traveling without a bunch of books in tow. This one is, IMO, a morally grey area.
2. I have put books on my daughter's Kindle which she checked out from the local library through overdrive. Far too many e-books from the library require Adobe Acrobat with some DRM garbage which realistically allows you to read it on a PC or an iPad.