Neil Williams parseheaderlength function in dvarchive.c, modified from extract.c in dpkg by Ian Jackson port for GTK3 by Josef Schneider