Patent ID: 8331702

Claim:
A data compression device, comprising: an encoding unit that generates encoded data by compressing image data representing the image, in units of a band that represents an image divided every predetermined number of lines in a sub scanning direction; an image data storage unit having a plurality of addresses at which the image data is stored in pixel units; a plurality of encoded data storage units that have addresses for storing the encoded data for each band; a setting receipt unit that receives start address of an empty area settings in the encoded data storage units in which the encoded data for each band is to be stored, the setting receipt unit is constituted to further receive the settings of the start address of an image data in the image data storage unit and a data length of the image data; a control unit that stores the encoded data successively in any of the plurality of encoded data storage units every time encoded data for each band is generated by the encoding unit; an empty area start address acquisition unit that acquires the start address of an empty area, where the encoded data is not stored for every encoded data storage unit, and wherein while the encoding unit is generating encoded data for one band, the control unit sets in the setting receipt unit the start address of an empty area, where the encoded data is not stored, in an encoded data storage unit that is different from the encoded data storage unit where the encoded data that is being generated is to be stored and further sets in the setting receipt unit the start address of the image data in the image data storage unit and the data length of the image data while the encoding unit is generating the encoded data for the one band, and when finishing generating the encoded data of the one band, the encoding unit starts to generate encoded data for a next band, and stores the generated encoded data in the encoded data storage unit indicated by the start address set in the setting receipt unit, reads image data for a number of pixels corresponding to the data length set in the setting receipt unit from among the image data stored in the image data storage unit with the start address that is set in the setting receipt unit as the starting point, and compresses the number of pixels of the image data that has been read.