From 773207e3c4280133b68d61211846c6431b2eb33f Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Tue, 2 Jun 2015 19:16:50 +0200 Subject: Document version 3 --- README | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'README') diff --git a/README b/README index ef9f374..744b020 100644 --- a/README +++ b/README @@ -53,4 +53,10 @@ Now we look at the continuation entry parts: A column_id of 0x4003 denotes a sta version 3 ========= -TBD. +Some of the files on disc are obfuscated while others are plain. They consist of chunks of lha compressed data (as readable by the lha command). The obfuscation is a simple XOR of the first 32 (for streets: 34) bytes with a static 4 byte key that changes with every CD. Since lha headers do have a static signature (i.e. -lh5-), it's easy to derive the current key by xoring the static value with the bytes found in the file. Conveniently un-obfuscated files generate a all-zero key and don't need special treatment. The path name of each chunk is identical so it must be re-written and the header checksum must be re-calculated. + +After decompressing all files (quite a lot, it's split at 3k entries per file) from dat/teiln.dat (case insensitive), we get three kinds of files: one with all Vorname columns, one with all Nachname columns and one with the rest of the columns. Before 2000_Q1 files {0,3,6,...} were Nachname, {1,4,7,...} were Vorname and {2,5,8,...} were all the other tables. After 2000_Q1 (incl.) {0,3,6,...} were all other columns, while {1,4,7,...} were Nachname and {2,5,8,...} Vorname columns. The first char in each entry in the Nachname column contains a continuation flag, where "1" means single line entry, "3" is the first and "2" are the remaining lines in a continuation. + +If there is a dat/strassen.dat (case insensitive), the concatenated decompressed chunks are a list of all street names referenced in the street/hnr column. + +If there is a dat/karto.dat (case insensitive), the concatenated decompressed chunks are a sorted list of all zip/streetname(/hnr) combinations on that CD, each line finished by the geo coordinates of that address. -- cgit v1.2.3