Patent attributes
An image recording apparatus is provided. The image recording apparatus includes a generator that generates information of recordable capacity of a storage and a holder for holding in advance data to be stored in the storage. A signal generator generates a signal indicating a data amount obtained when data held by the holder is variable-length encoded. A variable-length encoder means encodes the data held in the holder. A holder controller controls the holder so that the holder holds data to be stored, according to a comparison of the information generated by the generated by the generator and the data amount. A storage controller causes the storage to store the data controlled so as to be held by the holder, after encoding by the variable-length encoder means, on the basis of a predetermined condition.