形式陈述
码字集合
直觉
一旦读到完整码字,就不可能还需等待后续字符确认它其实是更长码字的开头。
例子与边界
二元码
推论与应用
前缀码用于流式解码、Huffman 编码、协议字段和自定界表示。
参考资料
- Thomas M. Cover and Joy A. Thomas, Elements of Information Theory, 2nd ed., Wiley, 2006,Chs. 2–8。
- Claude E. Shannon, “A Mathematical Theory of Communication,” Bell System Technical Journal 27, 1948,Parts I–II。