Osmium is a fast and flexible C++ toolkit and framework for working with OSM data. It can, among other things, read and write OSM files in different formats, assemble way and multipolygon geometries and convert OSM data into other formats. It can process OSM data with or without object history information.
You can find more information about Osmium at http://osmcode.org/ .
The old, now deprecated version of Osmium is documented here.