On Wed, Jun 3, 2009 at 1:38 PM, Tom Hughes <[email protected]> wrote:
> Frederik Ramm wrote:
>> [email protected] wrote:
>>> But with bzcat and the direct piping into Osmosis worked well.
>>> We tried on our project to read the bz2 File directly, which didn't work 
>>> with the same exception as in osmosis.
>>
>> There seems to be an issue with the libbz2 library and the way the
>> planet files are bzipped (they use a multi-threaded bz2 program that
>> creates slightly different bz2 files which *should* be fully compatible
>> but seem to be not).
>
> No, libbz2 is fine (if you use it right), the problem is with the pure
> Java bz2 implementation that osmosis uses.

to clarify, "if you use it right" means "if you don't use the
zlib-like interface".

pbzip2 makes use of the multiple streams feature of the bz2 format*,
which isn't supported by the zlib-like interface to libbz2 or, it
seems, the Java implementation.

cheers,

matt

*: basically, you can get an end-of-stream before the end-of-file -
you just have to reopen the stream and see if there's any more data
present.

_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/dev

Reply via email to