简体   繁体   English

需要在 stl::bitset 中存储变长位码

[英]Need to store variable length bit code in the stl::bitset

I am working on compression of file.I have generated codes in binary form for distinct symbols exist in file, using shannon fano algorithm and i want to store these codes in bitset.我正在压缩文件。我使用 shannon fano 算法为文件中存在的不同符号生成了二进制形式的代码,我想将这些代码存储在 bitset 中。 Codes are resides in map.Now my problem is, as the codes for different symbol are of different length, how i will do this?代码位于 map。现在我的问题是,由于不同符号的代码长度不同,我将如何做到这一点?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM