containers.Map How to match double values with the values of the map to retrieve the maps key? This is like a huffmandict that exists within.

3 views (last 30 days)
I am trying to generate my own huffman tree to encode and decode data. I have implemented all the steps.
However, my recursion function takes really long to decode for large values. It even gives error for "out of memory" at times.
Anyways, I do have a cell dictionary that points binary code to the base of the tree or original input. Something like this
Cell1 1 2 3 4 5 6
Cell2 [1,0,0] [1,1,1] [1,1,0] [1,0,1,1] [1,0,1,0] 0
I need help how to map this with encoded inputs in double such as 1 0 0 1 1 1 1 1 0 1 0 1 1 Riight now I am using the encoded input with the tree to decode, but I want to use the dictionary above directly instead?
How will compare a set of individual double numbers to cell array to match to its key? Such as 1 2 3 in this case.

Answers (0)

Categories

Find more on Large Files and Big Data in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!