Patent ID: 7864359

Claim:
A data compression and decompression unit of a printer, wherein the printer includes a compression section that receives bit map data, compresses the bit map data with a predetermined compressibility, and generates compressed data; a decompression section that decompresses the compressed data into an original format, and generates decompressed data; a memory section that stores the bit map data, the compressed data, and the decompressed data, comprising: a first buffer and a second buffer shared by the compression section and the decompression section, wherein each of the first and second buffer temporarily stores the bit map data, the compressed data or decompressed data in a predetermined allocation area according to control of a control section; a control section that dynamically allocates areas of the first buffer and the second buffer in accordance with the predetermined compressibility, wherein the first buffer temporarily stores the bit map data read from the memory for compressing, or the compressed data read from the memory for decompressing, and the second buffer temporarily stores the compressed data or the decompressed data before storing the compressed data or the decompressed data to the memory, wherein the control section allocates a substantially entire part of the first and second buffer to the compression section when a printing operation of a printer engine is not yet started, allocates a part of the first buffer and a part of the second buffer to the compression section and the decompression section in accordance with the predetermined compressibility when a printing operation is being performed, and allocates a substantially entire part of the first and second buffer to the decompression section when no bit map data is being transmitted from a terminal.