Section 108(a) is the most useful for an infringer who posts an entire copy of a protected work in public. Subsections(b,c) require that the copy not be made available outside the premises, which precludes internet posting; (d) requires a user request to make a copy; (e) applies only to items that are off the market and transferred to a specific user; (h) allows more copying in the last 20 years of the period when a work is protected (not applicable here). Subsection (a) allows a library or archive to make one copy of a work, as long as there is no commercial advantage to making the copy, the library is relatively public (it might restrict access to bona fide researchers), and a copyright notice is included: this has the fewest restrictions on copying.
The internet downloader is not a library or an archive, so the downloader is not granted any permission under 108 to make a copy. Under 108(a) a library can make no more than one copy available, but every uploading or downloading is "making a copy". A library would be contributorily liable for the illegal downloadings of their "customers".
It is difficult to know exactly what one can get away with under 17 USC 107 a.k.a. "fair use". I am fairly sure that posting a copy of a contemporary book in the open is not "fair use" even if the intent is to make it possible for dummies to study chemistry: such copying is not at all transformative, totally unlimited, and provides a significant market substitute for the protected work.