How to store Huffman code obtained after Huffman compression inside an image?

조회 수: 1 (최근 30일)
Anushka
Anushka 2015년 7월 28일
답변: Walter Roberson 2015년 7월 29일
How to store Huffman code obtained after Huffman compression inside an image?Since the code obtained after encoding is very large it is not been able to store.How can I reduce the length of the code obtained?

답변 (1개)

Walter Roberson
Walter Roberson 2015년 7월 29일
See the save() -7.3 option. You can save very large data structures when you use it. If you do not use it then by default you are limited to 2 gigabytes.
If you are getting anywhere close to 2 gigabytes of Huffman data then either you were working with long movies or you have a mistake in your implementation or your implementation is terribly inefficient.
The normal way to save Huffman data is to pack it into bit vectors. This is normally a nuisance to manage.
Fortunately if you use fwrite() you can specify a precision of the form 'ubitN' where N is the number of bits to write, such as 'ubit7' to write 7 bits. I have never used that myself though.

카테고리

Help CenterFile Exchange에서 Denoising and Compression에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by