Patent attributes
It is an object of the present invention to provide an encoding device and an encoding method that allow even faster speeds to be achieved by reducing the waiting time during which variable-length encoding is performed. An encoding device performing run-length encoding and variable-length encoding sequentially inputs one block of m×n data, determines whether a value of each unit of input data is 0 (zero), stores the results of the determination to an information register and stores input data to a data buffer, controls the reading of data from the data buffer based on the results of the determination, performs run-length encoding using the data read from the data buffer and the results of the determination, and performs variable-length encoding using as a data pair the data and the number of consecutive data having a value of 0 (zero).