2

I am trying to read a JT File. JT file may have information which is compressed by using Huffman Algorithm. I am facing a problem while building the Huffman tree. There's an ambiguity in the implementation which occurs when two symbols have the same frequency, depending on the comparison that we use between the nodes, the order may be different and leads to an inversion of some branches of the tree. So I am unable to build proper Huffman tree. Have anyone faced this issue earlier? Is there any solution for this?

Isentropic
  • 145
  • 2
  • 7
  • [This file type](http://en.wikipedia.org/wiki/JT_%28visualization_format%29)? If so, edit your question and add the link. – genpfault Jul 21 '11 at 15:09
  • What comparision? Do you mean you have a problem with the lexicgraphic order of the tree? Can you elaborate a bit more? – Micromega Aug 18 '11 at 18:00

1 Answers1

0

I have faced the same issue when I tried to implement a parser for JT. Didn't get a solution. I also tried to contact some guys from Siemens but without getting a solution. There IS an ambiguity which can't be solved without further information from Siemens. The Spec alone doesn't help. But I think Huffman is dropped out in the newest JT Spec.

  • I'm looking at exactly this problem today for work. In their sample code, this tie-breaking appears to depend on the behavior of the `HeapVector` class. Naturally the spec doesn't say anything about how this class behaves. I'm about to write a priority queue to see if I can come up with a behavior that matches the JT files I'm looking at... – Sol Jun 13 '12 at 18:54