Three methods, three different threats, and one of them does not handle viruses. Match the method to where you are.

There are three categories of thing you are trying to remove: protozoa such as giardia and cryptosporidium, bacteria, and viruses. In most of the backcountry United States and Canada, protozoa and bacteria are the realistic concern and viruses are not, which is why a hollow fiber filter is the usual answer. Travel outside that context and the calculation changes.
A hollow fiber filter handles protozoa and bacteria and does not remove viruses. Chlorine dioxide handles all three but needs four hours of contact time for cryptosporidium. Boiling handles everything. Ultraviolet works but needs clear water and batteries.
Moving water above any trail crossing, campsite or grazing, and upstream of any drainage from a use area. A clear spring beats a clear lake beats a stagnant pool, every time.
Pour through a bandana first. Silt clogs hollow fiber filters fast and a clogged filter is a slow filter you will be tempted not to use.
Thirty minutes for most things, four hours for cryptosporidium in cold water. Dose it at the last water source before camp and it is done by the time you want to drink.
A rolling boil is enough at any elevation you will hike at. The idea that you need a long boil at altitude is a myth, though it costs fuel to run one anyway.
Dedicate one bottle to untreated water and never let the clean threads touch it. Most backcountry stomach illness is actually contamination at this handoff, or from unwashed hands, rather than the water itself.
Filter for protozoa and bacteria, tablets or boiling when viruses are on the table, pre-filter silt, respect contact times, and keep dirty and clean strictly apart.
FREECanister, locker or hang, and the rules are not the same everywhere. Most bear problems are food storage…
FREEForecasts are made for valleys. Ridges write their own weather, and the clouds tell you hours before it…