Objects are returned from Decode() in the same order as before (as they present in file).
Incompatible changes:
I added Start() method to Decoder. While it can be lazily called from Decode(), I think explicit call is better.
Error handling is simplified. Now decoder expects exactly one OSMHeader block followed by OSMData blocks. Other block types or other order is considered an error. I'm not aware about other types or order in the wild, so I think it's practical.
I implemented concurrent decoder of OSMData blocks. Also I added some small optimizations.
Benchmark results for
russia-european-part-latest.osm.pbf
. master:this branch:
Objects are returned from
Decode()
in the same order as before (as they present in file).Incompatible changes:
Start()
method toDecoder
. While it can be lazily called fromDecode()
, I think explicit call is better.OSMHeader
block followed byOSMData
blocks. Other block types or other order is considered an error. I'm not aware about other types or order in the wild, so I think it's practical.