ABSTRACT

This chapter discusses several codeword assignment (encoding) techniques. It provides two types of variable-length coding: Huffman coding and arithmetic coding. The chapter focuses on the promising arithmetic coding algorithm, which is quite different from Huffman coding and introduces some fundamental concepts of encoding. Prior to presenting Huffman coding and arithmetic coding, it provides some fundamental concepts and results as necessary background. A uniquely decodable code is said to be instantaneous if it is possible to decode each codeword in a code symbol sequence without knowing the succeeding codewords. Instead of coding each source symbol in a discrete source alphabet, it is often useful to code blocks of symbols. As a systematic procedure to encode a finite discrete memoryless source, the Huffman code has found wide application in image and video coding. As a result of Huffman coding, a set of all the codewords, called a codebook, is created.