Click here to Skip to main content
15,894,410 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Francis Paran4-May-11 2:07
Francis Paran4-May-11 2:07 
AnswerRe: Huffman decoding from using two queues and cursors Pin
Stefan_Lang3-May-11 20:53
Stefan_Lang3-May-11 20:53 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Francis Paran4-May-11 2:03
Francis Paran4-May-11 2:03 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Stefan_Lang4-May-11 2:07
Stefan_Lang4-May-11 2:07 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Francis Paran4-May-11 2:11
Francis Paran4-May-11 2:11 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Stefan_Lang4-May-11 2:33
Stefan_Lang4-May-11 2:33 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Francis Paran4-May-11 3:58
Francis Paran4-May-11 3:58 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Stefan_Lang4-May-11 5:24
Stefan_Lang4-May-11 5:24 
I suspect that you need to replace
curNode = ithNode->rightCursor;
with
curNode = curNode->rightCursor;
but without knowing your tree structure that is just a guess. And that would still leave you with the problem that the whole file will be considered a single code, and the tree will have to be deep enough that it actually can descend at least as many times as there are '0' characters.

Are there really no separators in that file? Or are your codes supposed to have a fixed length? You need something to decide when the end of the code for the current 'word' is reached.

Or maybe when you reach the end of the tree branching (i. e. curNode->rightCursor==0), does that mean you have reached the end of the code and you have to take the value of the current node instead? I don't know Huffman encoding from the top of my head, but if it's a varied length encoding, this may be it.
GeneralRe: Huffman decoding from using two queues and cursors [modified] Pin
Francis Paran4-May-11 5:47
Francis Paran4-May-11 5:47 
AnswerRe: Huffman decoding from using two queues and cursors Pin
David Crow4-May-11 2:55
David Crow4-May-11 2:55 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Francis Paran4-May-11 3:50
Francis Paran4-May-11 3:50 
QuestionRe: Huffman decoding from using two queues and cursors Pin
David Crow4-May-11 5:38
David Crow4-May-11 5:38 
AnswerRe: Huffman decoding from using two queues and cursors Pin
Francis Paran4-May-11 5:59
Francis Paran4-May-11 5:59 
GeneralRe: Huffman decoding from using two queues and cursors Pin
David Crow4-May-11 7:10
David Crow4-May-11 7:10 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Francis Paran4-May-11 15:29
Francis Paran4-May-11 15:29 
QuestionProcessing CStringW one char at a time Pin
csrss2-May-11 23:10
csrss2-May-11 23:10 
AnswerRe: Processing CStringW one char at a time Pin
csrss2-May-11 23:23
csrss2-May-11 23:23 
GeneralRe: Processing CStringW one char at a time Pin
Niklas L3-May-11 1:08
Niklas L3-May-11 1:08 
Questioncopy text on clipboard Pin
john56322-May-11 23:05
john56322-May-11 23:05 
AnswerRe: copy text on clipboard Pin
_AnsHUMAN_ 3-May-11 0:00
_AnsHUMAN_ 3-May-11 0:00 
GeneralRe: copy text on clipboard Pin
David Crow3-May-11 3:00
David Crow3-May-11 3:00 
AnswerRe: copy text on clipboard Pin
Hamid_RT3-May-11 0:57
Hamid_RT3-May-11 0:57 
QuestionHow can I find style of CListCtrl ? Pin
_Flaviu2-May-11 22:03
_Flaviu2-May-11 22:03 
AnswerRe: How can I find style of CListCtrl ? Pin
«_Superman_»2-May-11 22:10
professional«_Superman_»2-May-11 22:10 
GeneralRe: How can I find style of CListCtrl ? Pin
_Flaviu2-May-11 22:23
_Flaviu2-May-11 22:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.