
Hi Gerd I guessed that it was the \0 that cut the file off. You mean something like answer 5 here: https://stackoverflow.com/questions/759707/efficient-way-of-storing-huffman-... I looked at this earlier trying to work out if it was relevant but didn't make it fit - I should have tried harder. I still haven't spotted anything to determine the length of the 2 /3 byte in before and in the struct for {length} Ticker On Thu, 2021-12-23 at 01:17 +0000, Gerd Petermann wrote:
Hi Ticker,
sorry, just noticed that something went wrong with copy&paste because of the \0 character. Anyway, I think I understand the meaning of the part with the prefixes. I assume that Garmin reads the first 5 bits and uses this value as an index into a table which directly follows the first array. This 2nd table is a 32x2 lookup table, where the 2nd byte gives the value and the first byte some kind of status info which is used to position the bit reader. This would explain the repeating characters. Something like this:
--------- MDR 16 (decompression codebook Huffman tree) ---------------- --------- 000002b6 | 000000 | 4a | ???