I am implementing a huffman encoding procedure which for example encodes the decimal number -5 as '100010'. Until now I have implemented some code which correctly produces the encoded sequence. The encoded sequence is stored as a string. However, I want the bit sequence to be stored as a bit stream and use only the neccesary amount of space for storage. For example, I want the encoded sequence for -5, which is '100010', to take 6 bits of memory. Is that possible ?
1 Comment
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/499774-how-to-store-sequence-of-bits-as-a-bit-stream-and-use-the-least-possible-memory#comment_784981
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/499774-how-to-store-sequence-of-bits-as-a-bit-stream-and-use-the-least-possible-memory#comment_784981
Sign in to comment.