joto / osmium

C++/Javascript framework for working with OSM files.
http://wiki.openstreetmap.org/wiki/Osmium
GNU General Public License v3.0
123 stars 31 forks source link

Support .gz and .bz2 files without using pipes? #73

Closed alex85k closed 8 years ago

alex85k commented 11 years ago

Currently to operate with osm.gz and osm.bz2 Osmium invokes console utilities. This is almost the feature that is hard no implement on non-Unix system (almost the last unsupported one).

Is there any possibilty to use bzip2 and zlib ? This should also increase performance...

joto commented 11 years ago

Just using the libraries without also doing some kind of multithreading would probably decrease performance. Because of the external programs the current implementation can use a different CPU for the (un)packing. So, yes, it would be nice to switch to multithreading and use internal (un)packing. There is a similar issue with PBF files. They use packing, too. Currently this is done internally, but should really be done in a separate thread.

Until now I have not used any threading. One reason was that there are several different ways of doing threading which would lead to more problems when porting to other systems or compilers. I am planning to switch to C++11 in the next major version of Osmium. This would allow us to use the standardized C++11 threading now built into C++.

joto commented 8 years ago

This has been implemented in libosmium. This version of osmium will not get that feature.