Huffman coding
✅ Huffman coding
문자의 빈도수를 가지고 압축하는 과정
assign variable length code to input characters,
lengths of the assigned codes are bsed on the frequencies of corresponding characters
- 부모 노드를 만들 때
왼쪽에는 0
,오른쪽에는 1
배치
✔️ 접두부 코드
- 각 문자에 부여된 이진 코드가 다른 이진 코드의 접두부가 되지 않는 코드
- 겹치지 않도록 이진 코드 만들기
✔️ 최적 코드
- 인코딩 메세지의 길이가 가장 짧은 코드
✅ Steps of huffman coding
- 빈도수 별로 노드 만들어 배치하기
This post is licensed under CC BY 4.0 by the author.