what about using the maps navit uses? there are preprocessed maps available of all of osm and the maps need by far less space than the tiles maep or tiles baesd approaces use (germany is at about 1.6g in the current osm navit map while the tiles will be a multiple of that). besides, navit is open source, you could easily re-use the code to read those maps.