[OSM-dev] Delta-encoding in PBF

David Paleino dapal at debian.org
Sat Dec 18 15:20:06 GMT 2010


On Sat, 18 Dec 2010 13:28:09 +0100, Stefan de Konink wrote:

> Op 18-12-10 11:53, David Paleino schreef:
> > Hello people,
> > I'm writing a parser in C# for PBF dumps. However, I'm having issues with
> > the Delta-{en|de}coding.
> 
> http://git.openstreetmap.nl/index.cgi/pbf2osm.git/tree/src/main.c#n588
> 
> Maybe that helps?

Aha, yes! :)

From that code, it seems like you're using what I thought before, i.e. given x,
x1 and x2, the delta-coded list would contain x, x1-x, x2-x1. And then you're
reconstructing them just by summing up.

So I found my bug. I was summing up deltas between them, instead of
previous result + current delta.

Thank you!,
David

-- 
 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://deb.li/dapal
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20101218/bf4a3770/attachment.pgp>


More information about the dev mailing list