JPH08186503A - System and device for compressing/extending data - Google Patents

System and device for compressing/extending data

Info

Publication number
JPH08186503A
JPH08186503A JP6339927A JP33992794A JPH08186503A JP H08186503 A JPH08186503 A JP H08186503A JP 6339927 A JP6339927 A JP 6339927A JP 33992794 A JP33992794 A JP 33992794A JP H08186503 A JPH08186503 A JP H08186503A
Authority
JP
Japan
Prior art keywords
data
compression
compressed
output
string
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP6339927A
Other languages
Japanese (ja)
Inventor
Koichi Hatano
光一 秦野
Shinichi Fukai
進一 深井
Kenichi Sonoda
健一 園田
Ryoichi Onoe
涼一 尾上
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Japan Digital Laboratory Co Ltd
Original Assignee
Japan Digital Laboratory Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Japan Digital Laboratory Co Ltd filed Critical Japan Digital Laboratory Co Ltd
Priority to JP6339927A priority Critical patent/JPH08186503A/en
Publication of JPH08186503A publication Critical patent/JPH08186503A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE: To provide satisfactory data compressibility for the image data of gradation expressions and to make time for extension in the case of providing restored data correspondent to output speed requested by external equipment. CONSTITUTION: A compressing part 4 starts compression from the head of image data equivalent to one line for each compression format while preparing plural kinds of compression formats composed of data compression formats by utilizing the continuity of bit values in data concerning the image data equivalent to one line from an image memory 21, selects the compression format storing the maximum number of data as compressed data and performs the compression of data equivalent to one line by repeating the same operation concerning the next compression starting position data as well. An extending part 5 discriminates whether compressed records equivalent to each line are compressed data or source data and restores the data later by using a restoring method decided by the compression format but outputs the source data as they are.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はデータの圧縮・伸張方式
およびデータ圧縮・伸張処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data compression / expansion system and a data compression / expansion processing device.

【0002】[0002]

【従来の技術】従来、一般的にプリンタやプロッタ等の
印刷出力機器では出力の際に画像データをすべて画像メ
モリに展開してから印刷を行っている。しかしながら、
このような方法では印刷出力機器等の大型化や高解像度
化が進むにしたがって膨大な大きさの画像メモリが必要
になるという問題点があった。
2. Description of the Related Art Conventionally, in a print output device such as a printer or a plotter, generally, when outputting, all image data is expanded in an image memory before printing. However,
Such a method has a problem that an enormous size of image memory is required as the size of a printout device and the resolution thereof are increased.

【0003】例えば、解像度が400DPIのA0サイ
ズ1面分の画像を出力するには約36MB(メガバイ
ト)のメモリが必要であり、更に、15〜20フィート
(feet)程度の長尺印刷を実現するためには約135〜
180MBものメモリを実装しなければならないことと
なり、コスト負担が大きくなるという問題点があった。
For example, about 36 MB (megabytes) of memory is required to output an image of one A0 size image having a resolution of 400 DPI, and long printing of about 15 to 20 feet is realized. About 135 to
Since a memory of 180 MB must be mounted, there is a problem that the cost burden increases.

【0004】このような問題点の解消、すなわち、画像
メモリの量を増すことなく長尺印刷等長尺データの出力
を行うには画像データを圧縮して一時的に保存し伸張し
ながら印刷することで実現できる。ここで、従来からの
画像データの圧縮方法の一つにランレングス符号化方式
がある。ランレングス符号化方式は”0”または”1”
の2値データ連続数をカウントして予め定義された符号
表から連続数に対応した符号を割り付けることにより画
像データを非固定長符号化することにより圧縮するデー
タ圧縮方式である。ランレングス符号化方式により圧縮
された符号化データを用いる装置では圧縮された符号化
データを記憶装置に格納し、出力時に格納した符号化デ
ータを読み出し復号化により復元データとして出力す
る。この場合、複合化処理の速度は記憶装置から読み出
す各符号化データの符号長に依拠することとなる。した
がって、圧縮率の高い部分では符号化速度が早く低い部
分では遅くなるので、復元データを処理する装置によっ
ては不都合が生じる場合があった。具体的には、復元デ
ータの速度を一定に保つ必要のある出力装置、例えば、
プリンタ、プロッタ、CRT、等では最も復号化の遅い
符号化データの復号化時間に出力速度を抑えねばならな
い、という問題点があった。
In order to solve such a problem, that is, in order to output long data such as long printing without increasing the amount of image memory, the image data is compressed and temporarily stored and expanded while printing. It can be realized. Here, as one of conventional image data compression methods, there is a run-length encoding method. Run length coding method is "0" or "1"
Is a data compression method in which image data is compressed by non-fixed length coding by counting the number of consecutive binary data and assigning a code corresponding to the number of consecutives from a predefined code table. In a device that uses coded data compressed by the run length coding method, the compressed coded data is stored in a storage device, and the coded data stored at the time of output is read out and output as restored data by decoding. In this case, the speed of the composite processing depends on the code length of each encoded data read from the storage device. Therefore, since the coding rate is high in the high compression rate portion and low in the low compression rate portion, inconvenience may occur depending on the device that processes the restored data. Specifically, an output device that needs to keep the speed of the restored data constant, for example,
In printers, plotters, CRTs, etc., there is a problem that the output speed must be suppressed during the decoding time of the coded data that is the slowest to decode.

【0005】これに対し、特開平1−273429号に
記載の「データ圧縮・伸張方式」は、データの圧縮段階
で、圧縮前のデータ(以下、元データ)を指定した単位
(例えば、1ブロック)毎に非固定長符号化し、その単
位毎の符号化データのデータ圧縮率を求めて所与の基準
圧縮率と比較し、求めたデータ圧縮率が基準圧縮率より
高い場合には”符号化”を意味する識別データと共に符
号化データを記憶装置に格納し、低い場合には”非符号
化”を意味する識別データと共に元データを格納し、復
号化(すなわち、圧縮データの伸張)段階で符号化デー
タは復号化して出力し、非符号化データ(すなわち、格
納されている元データ)はそのまま出力することによ
り、指定した単位での非固定長符号の復元化速度を一定
値以上に保ち得るものとしている。
On the other hand, the "data compression / expansion method" described in Japanese Patent Laid-Open No. 1-273429 discloses a unit (for example, one block) in which data before compression (hereinafter referred to as original data) is designated at the data compression stage. ) For each non-fixed length, calculate the data compression rate of the encoded data for each unit, and compare it with the given standard compression rate. If the calculated data compression rate is higher than the standard compression rate, "encode" The encoded data is stored in the storage device together with the identification data meaning "", and if it is low, the original data is stored together with the identification data meaning "non-coded", and at the decoding (that is, decompression of compressed data) stage. The encoded data is decoded and output, and the uncoded data (that is, the stored original data) is output as it is, so that the restoration speed of the non-fixed length code in the specified unit is kept above a certain value. Get too It is set to.

【0006】[0006]

【発明が解決しようとする課題】ここで、従来技術の問
題点として、 前述したような出力するサイズの分だけの大きさの
メモリを要するという方式では、長尺画像の印刷出力装
置等の長尺データ出力装置では出力メモリ(画像メモ
リ)が膨大になりコスト負担が大きくなる点、 前述したようなランレングス符号化方式によるデー
タ圧縮方式では”0”または”1”の2値データに連続
性のない階調表現された画像データについては圧縮効果
は望めず、場合によっては圧縮データ量の方が元データ
量より極端に多くなるという欠点があり、さらに、圧縮
データ量の方が元データ量より極端に多くなる現象が生
ずると所定単位長L分の伸張時間をレーザプリンタ等の
出力機器の走査時間内に収めることが困難になる点、 特開平1ー273429号に記載の「データ圧縮・
伸張方式」では、指定した単位での非固定長符号の復元
化速度を一定値以上に保ち得るための条件が、上述した
圧縮段階における符号化データのデータ圧縮率に対する
基準圧縮率として上述の「データ圧縮・伸張方式」を用
いる出力装置が要求する伸張データ出力速度を実現し得
る最低の圧縮率を登録することであるため、仮に、上述
の「データ圧縮・伸張方式」に基づいたデータ圧縮・伸
張処理装置に、外部機器としてプリンタ等の出力機器を
接続するものとした場合に出力機器の種類や出力速度に
対応するためには接続可能な外部機器の規定の速度毎に
伸張データ出力速度を実現し得る最低の圧縮率を求め登
録するか装置内で計算する必要があるという不都合があ
り、また、符号化データの圧縮率の計算(上記で圧縮基
準値を計算する場合にはその計算も含む)等複雑な算術
演算を要するので上記「データ圧縮・伸張方式」に基づ
く装置のハードウエア化が困難であるという点、があ
る。
Here, as a problem of the prior art, in the method of requiring a memory as large as the size to be output as described above, the length of a print output device for a long image is long. In the shaku data output device, the output memory (image memory) becomes enormous and the cost burden becomes large. In the data compression method by the run length coding method as described above, continuity is provided in binary data of "0" or "1". There is a drawback that the compression effect cannot be expected for image data that has no gradation and that the compressed data amount becomes extremely larger than the original data amount in some cases. If a phenomenon that becomes more extremely large occurs, it becomes difficult to keep the expansion time for a predetermined unit length L within the scanning time of an output device such as a laser printer. JP-A-1-273429 "Data compression and according to
In the "expansion method", the condition for maintaining the decompression speed of the non-fixed length code in the specified unit at a certain value or higher is the above-mentioned "reference compression ratio" with respect to the data compression ratio of the encoded data in the compression stage. Since the lowest compression rate that can achieve the decompressed data output speed required by the output device using the "data compression / decompression method" is registered, the data compression / decompression method based on the above "data compression / decompression method" is temporarily registered. When connecting an output device such as a printer as an external device to the decompression processing device, in order to correspond to the type and output speed of the output device, the decompression data output speed is set for each specified speed of the connectable external device. There is an inconvenience that it is necessary to obtain and register the lowest feasible compression rate or to calculate it in the device, and to calculate the compression rate of encoded data (when calculating the compression reference value above). Since requires the calculation including) such complicated arithmetic operations that the hardware of the device based on the "Data compression and decompression method" is difficult, there is.

【0007】本発明は上記問題点を解消するために創案
されたものであり、第1の目的は、従来のランレングス
符号化方式の特徴である”0”または”1”の2値デー
タに連続性がある画像データに対しての良好なデータ圧
縮性能とランレングス方式では圧縮が困難な階調表現さ
れた画像データに対してのデータ圧縮性能の実現と、伸
張時には圧縮データから所定単位の復元データを復号化
する際の伸張時間を外部機器の要求する出力速度に対応
させ得るデータ圧縮・伸張方式を提供することであり、
第2の目的は、出力メモリを増やすことなくプリンタや
プロッタなどの長尺印刷装置やその他の出力装置による
長尺データの出力を可能とするデータ圧縮・伸張処理装
置の提供を目的とする。
The present invention was devised to solve the above problems, and a first object is to provide binary data of "0" or "1" which is a characteristic of the conventional run length coding system. Good data compression performance for continuous image data and realization of data compression performance for gradation-represented image data that is difficult to compress with the run length method, and when decompressing data It is to provide a data compression / decompression method capable of making the decompression time when decoding the restored data correspond to the output speed required by an external device,
A second object is to provide a data compression / decompression processing device capable of outputting long data by a long printing device such as a printer or a plotter and other output devices without increasing the output memory.

【0008】[0008]

【課題を解決するための手段】上記の目的を達成するた
めに第1の発明のデータ圧縮方式は、予め符号化形式を
規定した複数種類の固定長の圧縮フォーマットにより、
所定単位L毎に元データを最初の圧縮開始位置から各圧
縮フォーマットでそれぞれ符号化したのち、各々の圧縮
フォーマットの中から符号化された元データ数が最大の
圧縮フォーマットを選択して圧縮データとし、前回の圧
縮開始位置に上記符号化された元データ数を加えて新た
な圧縮開始位置とし該圧縮開始位置からの各圧縮フォー
マットによる符号化及び圧縮フォーマットの選択を繰返
して所定単位L毎の元データの圧縮データ列を生成す
る、ことを特徴とする。
In order to achieve the above object, the data compression method of the first invention uses a plurality of types of fixed-length compression formats in which encoding formats are defined in advance.
After the original data is encoded in each compression format from the first compression start position for each predetermined unit L, the compression format with the maximum number of encoded original data is selected from each compression format as compressed data. , A new compression start position is obtained by adding the number of the above-mentioned encoded original data to the previous compression start position, and the encoding for each compression format from the compression start position and the selection of the compression format are repeated to obtain an element for each predetermined unit L. It is characterized in that a compressed data string of data is generated.

【0009】第2の発明は上記第1の発明のデータ圧縮
方式において、選択された圧縮フォーマットにより符号
化された元データ数が所定値より少ないとき、圧縮開始
位置から所定単位値分の長さの元データを格納する圧縮
フォーマットを設けていることを特徴とする。
In a second aspect of the present invention, in the data compression method of the first aspect, when the number of original data encoded by the selected compression format is smaller than a predetermined value, a length corresponding to a predetermined unit value from the compression start position. Is provided with a compression format for storing the original data.

【0010】第3の発明は上記第2の発明のデータ圧縮
方式において、所定単位Lの元データから圧縮データ列
を生成したあと、圧縮データ列の長さと所定単位Lの元
データの長さを比較し、圧縮データ列の長さが所定単位
Lの元データの長さより短いとき識別データを該圧縮デ
ータ列の先頭に付加して圧縮データ列と共に出力し、圧
縮データ列の長さが所定単位Lの元データの長さより短
くないときは識別データを所定単位Lの元データ列の先
頭に付加して出力する、ことを特徴とする。
A third aspect of the present invention is the data compression method according to the second aspect, wherein after generating a compressed data string from the original data of a predetermined unit L, the length of the compressed data string and the length of the original data of the predetermined unit L are set. In comparison, when the length of the compressed data string is shorter than the length of the original data of the predetermined unit L, the identification data is added to the head of the compressed data string and output together with the compressed data string, and the length of the compressed data string is the predetermined unit. When it is not shorter than the length of the original data of L, the identification data is added to the head of the original data string of the predetermined unit L and output.

【0011】第4の発明は上記第3の発明のデータ圧縮
方式により出力された識別データにより次に続くデータ
が圧縮データ列か元データかの別を判定し、圧縮データ
列の場合は圧縮データの種類別に元データを復元して出
力同期信号に同期させて出力し、元データ列の場合はそ
のまま出力同期信号に同期させて出力する、ことを特徴
とする。
According to a fourth aspect of the present invention, it is determined whether the next succeeding data is a compressed data sequence or original data based on the identification data output by the data compression method of the third aspect of the invention. The original data is restored for each type and output in synchronism with the output synchronization signal, and in the case of the original data string, it is output in synchronism with the output synchronization signal.

【0012】第5の発明のデータ圧縮・伸張処理装置
は、少なくともデータの転送制御を行う制御部と、順次
受け取る所定単位L毎の元データについて、請求項3の
データ圧縮方式により所定単位L毎の元データの圧縮及
び識別データを先頭とした圧縮データ列または識別デー
タを先頭とした所定単位L分の元データ列の出力を行う
圧縮部と、圧縮部により生成された、識別データを先頭
とした上記圧縮データ列または上記元データ列を順次格
納する格納部と、格納部に格納された識別データを先頭
とした圧縮データ列または識別データを先頭とした元デ
ータ列を順次受け取って、該識別データから次に続くデ
ータが圧縮データ列か元データ列かを判定し、圧縮デー
タ列の場合は圧縮データの種類別に元データを復元して
外部機器からの出力同期信号に同期させて出力し、元デ
ータ列の場合はそのまま外部機器からの出力同期信号に
同期させて出力する伸張部と、を有することを特徴とす
る。
According to a fifth aspect of the present invention, in a data compression / expansion processing device, at least a control unit for controlling transfer of data and original data for each predetermined unit L that is sequentially received are provided for each predetermined unit L by the data compression method of claim 3. Of the original data and a compressed data string having the identification data as the head or an original data string of a predetermined unit L having the identification data as the head, and the identification data generated by the compression unit as the head. The storage unit that sequentially stores the compressed data sequence or the original data sequence, and the compressed data sequence starting with the identification data stored in the storage unit or the original data sequence starting with the identification data are sequentially received and the identification is performed. Determines whether the following data is a compressed data string or an original data string. If the data is a compressed data string, restores the original data according to the type of compressed data and outputs from the external device. Output in synchronization with the period signal, and having a, a decompression unit for outputting in synchronization directly with the output sync signal from the external device when the original data string.

【0013】[0013]

【作用】上記構成により、第1および第2の発明のデー
タ圧縮方式では、予め符号化形式を規定した複数種類の
固定長の圧縮フォーマットにより、所定単位L毎の元デ
ータを最初の圧縮開始位置から各圧縮フォーマットでそ
れぞれ符号化したのち、各々の圧縮フォーマットの中か
ら符号化された元データ数が最大の圧縮フォーマットを
選択して圧縮データとするので、従来のランレングス符
号化方式では圧縮が困難な階調表現された画像データに
ついても良好な圧縮結果を得ることができる。
With the above structure, in the data compression methods of the first and second inventions, the original data for each predetermined unit L is compressed to the first compression start position by a plurality of types of fixed-length compression formats in which the encoding format is defined in advance. After each is encoded in each compression format, the compression format with the maximum number of encoded original data is selected from each compression format to be the compressed data, so the conventional run-length encoding method does not compress. A good compression result can be obtained even for image data that is difficult to express in gradation.

【0014】第3の発明のデータ圧縮方式では、さら
に、圧縮データの容量が元データ量を上回った場合の例
外処理として元データ列を出力するので、圧縮データ容
量に上限が定められ、所定単位L分の伸張データを伸張
する際の処理時間を一定に保つことができる。
In the data compression method of the third invention, since the original data string is output as an exceptional process when the capacity of the compressed data exceeds the amount of the original data, the upper limit is set in the compressed data capacity and the predetermined unit is set. The processing time when decompressing the decompressed data for L can be kept constant.

【0015】第4の発明のデータ伸張方式では、第3の
発明のデータ圧縮方式により生成される圧縮データ列が
元データの所定単位長毎に対応しているので、外部出力
機器からの同期信号を基準に一定時間内に安定した伸張
処理を繰返し行うことが可能となり、外部出力機器との
インターフェイスが容易になる。また、伸張データを画
像メモリに再展開することなく出力することができる。
In the data decompression method of the fourth invention, since the compressed data string generated by the data compression method of the third invention corresponds to each predetermined unit length of the original data, the synchronization signal from the external output device is used. It becomes possible to repeat stable decompression processing within a fixed time based on the above, and the interface with an external output device becomes easy. Further, the decompressed data can be output without re-expanding to the image memory.

【0016】第5の発明のデータ圧縮・伸張処理装置で
は、請求項3のデータ圧縮方式により生成される圧縮デ
ータ列が元データの所定単位長毎に対応しているので伸
張データを画像メモリに再展開することなく出力するこ
とができ、外部出力機器からの同期信号を基準に一定時
間内に安定した伸張処理を繰返し行うことが可能であ
り、外部出力機器とのインターフェイスが容易である。
In the data compression / expansion processing device of the fifth invention, since the compressed data string generated by the data compression method of claim 3 corresponds to each predetermined unit length of the original data, the expanded data is stored in the image memory. It is possible to output without re-expansion, it is possible to repeatedly perform stable expansion processing within a fixed time with reference to the synchronization signal from the external output device, and it is easy to interface with the external output device.

【0017】[0017]

【実施例】図1は本発明のデータ圧縮・伸張方式を用い
たデータ圧縮・伸張処理装置の一実施例の構成を示すブ
ロック図であり、データ圧縮・伸張処理装置19は制御
命令解析部2、転送制御部3、圧縮部4、及び伸張部5
とデータを格納する格納部を有している。なお、格納部
は、データ圧縮・伸張処理装置19が図2に示すように
コンピュータ装置の1つの構成部分である場合にはバス
を介して接続する補助記憶装置(外部記憶装置)でよ
い。
1 is a block diagram showing the configuration of an embodiment of a data compression / expansion processing apparatus using the data compression / expansion method of the present invention. , Transfer control unit 3, compression unit 4, and decompression unit 5
And a storage unit for storing data. The storage unit may be an auxiliary storage device (external storage device) connected via a bus when the data compression / expansion processing device 19 is one component of the computer device as shown in FIG.

【0018】図2は図1のデータ圧縮・伸張処理装置1
0を構成とするコンピュータシステムの一実施例として
の長尺印刷装置の構成例を示すブロック図であり、図1
のシステムバス・インターフェイス(I/F)部1は図
2の場合にはデータ圧縮・伸張処理装置19側に設け、
また、出力インターフェイス(I/F)部6はデータ圧
縮・伸張処理装置19側か印刷出力機23側のいずれに
あってもよい。また、図3はMビット×Nラインの画像
データ(ラスタデータ)の画像メモリ21上の展開図で
ある。
FIG. 2 shows the data compression / expansion processing apparatus 1 of FIG.
1 is a block diagram showing a configuration example of a long-size printing apparatus as an example of a computer system having a configuration of 0. FIG.
2, the system bus interface (I / F) unit 1 of FIG.
Further, the output interface (I / F) unit 6 may be provided on either the data compression / expansion processing device 19 side or the print output device 23 side. FIG. 3 is a development view of the image data (raster data) of M bits × N lines on the image memory 21.

【0019】図1および図2で、制御命令解析部2はシ
ステムバス・インターフェイス部1を介して取込まれた
CPU20からの制御命令を解析し、転送制御部3に対
し必要な指示を与える。例えば、圧縮処理時には画像メ
モリ21に展開されている画像データを取込み圧縮部4
に渡し、圧縮部4から出力される圧縮データや識別デー
タを補助記憶装置22等の格納部に格納する。また、伸
張処理時には補助記憶装置22から識別データおよび圧
縮データを取込み伸張部5に渡し、伸張部5で伸張され
た画像データを出力インターフェイス6を介してプリン
タやプロッタ等の印刷出力機23に出力する。なお、本
実施例では制御命令解析部2でCPUを用いる場合、そ
のCPUと図2のCPU20を別個のものとして構成し
ているが、同一のCPUを用いるよう構成することもで
きる。制御命令解析部2と転送制御部3を一つの制御部
として構成してもよい。
In FIG. 1 and FIG. 2, the control instruction analysis unit 2 analyzes the control instruction from the CPU 20 fetched through the system bus interface unit 1 and gives a necessary instruction to the transfer control unit 3. For example, at the time of compression processing, the image data expanded in the image memory 21 is captured and the compression unit 4
The compressed data and the identification data output from the compression unit 4 are stored in the storage unit such as the auxiliary storage device 22. Further, at the time of decompression processing, identification data and compressed data are taken from the auxiliary storage device 22 and passed to the decompression unit 5, and the image data decompressed by the decompression unit 5 is output to the print output device 23 such as a printer or a plotter via the output interface 6. To do. In the present embodiment, when the CPU is used in the control command analysis unit 2, the CPU and the CPU 20 of FIG. 2 are configured separately, but it is also possible to use the same CPU. The control command analysis unit 2 and the transfer control unit 3 may be configured as one control unit.

【0020】転送制御部3は制御命令解析部2からの指
示により、圧縮時には圧縮部4に対する画像メモリ21
からの画像データの転送と圧縮部4からの1ライン分の
圧縮レコード(識別データを先頭とする圧縮データ列ま
たは元データをいう)の補助記憶装置22への転送制御
を行い、データ伸張時には伸張部5に対する補助記憶装
置22からの1ライン分の圧縮レコードの転送制御と伸
張部5によって復元された画像データの出力インターフ
ェイス部6を介しての外部機器(例えば、図2の印刷出
力機23)への出力制御を行う。
The transfer control unit 3 receives an image from the image memory 21 for the compression unit 4 at the time of compression according to an instruction from the control instruction analysis unit 2.
Of the image data from the compression unit 4 and the transfer of the compressed record for one line from the compression unit 4 (referred to as the compressed data string starting with the identification data or the original data) to the auxiliary storage device 22 and decompressed when decompressing the data. External device via the transfer control of the compressed record for one line from the auxiliary storage device 22 to the unit 5 and the output interface unit 6 of the image data restored by the decompression unit 5 (for example, the print output device 23 in FIG. 2). Output control to.

【0021】圧縮部4は転送制御部3の制御によって画
像メモリ21から転送されてきた1ライン分の画像デー
タ(ラスタデータ)の圧縮処理を行う。圧縮処理は後述
(図7参照)するように画像データのビット値の連続性
を利用してデータ圧縮を行うフォーマットやビットパタ
ーンの繰返しを利用してデータ圧縮を行うための圧縮フ
ォーマット等からなる複数種類の圧縮フォーマット(図
4(a)〜(c)参照)を用意しておき1ライン分の画
像データの圧縮開始位置(後述)からのデータの連続が
なす同種のデータの個数またはパターンの繰返しをカウ
ントし、その個数及びデータの種類またはパターンを各
(種類別の)圧縮フォーマットに格納し(図5参照)、
最大データ数を格納した圧縮フォーマットを選択して圧
縮データとし、次のデータの連続について同じ動作を繰
返して1ライン分の圧縮データ列を構成してからその圧
縮データ列を補助記憶装置22へ格納するか(図8参
照)1ライン分の元データ列を補助記憶装置22へ格納
するかを決定してから出力する。
The compression unit 4 compresses one line of image data (raster data) transferred from the image memory 21 under the control of the transfer control unit 3. As will be described later (see FIG. 7), the compression process is composed of a plurality of formats such as a format for performing data compression using the continuity of the bit values of image data and a compression format for performing data compression using the repetition of bit patterns. 4 types of compression formats (see FIGS. 4 (a) to 4 (c)) are prepared, and the number of the same type of data or the repetition of the pattern formed by the continuous data from the compression start position (described later) of the image data for one line , And stores the number and the type or pattern of data in each (type-specific) compressed format (see FIG. 5),
The compression format that stores the maximum number of data is selected as compressed data, the same operation is repeated for the next consecutive data to form a compressed data string for one line, and then the compressed data string is stored in the auxiliary storage device 22. Output (see FIG. 8) after determining whether to store the original data string for one line in the auxiliary storage device 22.

【0022】伸張部5は転送制御部3の制御により補助
記憶装置22から受け取った1ライン分毎の圧縮レコー
ド列が圧縮データか元データ列かを識別データにより判
別した上、圧縮データ列については圧縮フォーマットに
より定まる復元方法でデータを復元し、元データ列につ
いてはそのまま、転送制御部3が出力インターフェイス
部6を介して受け取る外部機器からの同期信号に同期さ
せて、出力インターフェイス部6を介して外部機器(例
えば、印刷出力機23)へ出力する。
Under the control of the transfer control unit 3, the decompression unit 5 determines whether the compressed record string for each line received from the auxiliary storage device 22 is the compressed data or the original data string, based on the identification data. Data is decompressed by a decompression method determined by the compression format, and the original data string is kept as it is, in synchronization with the synchronization signal from the external device received by the transfer control unit 3 via the output interface unit 6, and via the output interface unit 6. It is output to an external device (for example, the print output device 23).

【0023】図4は圧縮部4で用いる圧縮フォーマット
の例を示した図であり、各圧縮フォーマットは32ビッ
トで構成され、伸張時に圧縮データ中の各フォーマット
を識別するための2〜4ビットのコントロールビット部
41と(圧縮フォーマット長ーコントロールビット長の
大きさの)データ記述部からなっている。また、データ
記述部は次に述べるように圧縮フォーマットの種類によ
りそれぞれ異なる構成を有している。なお、圧縮フォー
マットサイズは本実施例では32ビット長であるがこれ
に限られることなく、例えば、16ビットまたは8の倍
数でもよい。また、コントロールビット長も2〜4ビッ
トに限られず、圧縮フォーマットの種類数に応じてきめ
ることができる。
FIG. 4 is a diagram showing an example of a compression format used in the compression unit 4. Each compression format is composed of 32 bits, and each compression format has 2 to 4 bits for identifying each format in the compressed data at the time of decompression. It comprises a control bit section 41 and a data description section (compressed format length-control bit length). The data description section has a different structure depending on the type of compression format as described below. The compression format size is 32 bits long in this embodiment, but is not limited to this, and may be 16 bits or a multiple of 8, for example. Also, the control bit length is not limited to 2 to 4 bits, and can be adjusted according to the number of types of compression formats.

【0024】図4(a)は図5(a)の画像データのよ
うなビット値の連続性を利用してデータ圧縮を行うた
め、画像データの連続するデータ種及びそのデータ種毎
のカウント値を格納可能なフォーマットからなる圧縮フ
ォーマットの一実施例であり、この例では、1ライン分
の画像データの連続する同種のデータを弁別するための
4つのデータビット(この例では各データビットは0”
か”1”の値をとる1ビットで構成されている)42ー
1〜42ー4と各データビットに対応するデータの個数
を格納する部分(以下、カウンタ値格納部)43−1〜
43−4を有する圧縮フォーマットである(以下、タイ
プ1の圧縮フォーマットという)。
In FIG. 4A, since the data compression is performed by utilizing the continuity of bit values like the image data of FIG. 5A, the continuous data type of the image data and the count value for each data type Is one example of a compression format that is capable of storing data. In this example, four data bits (in this example, each data bit is 0 for discriminating continuous continuous data of one line of image data of the same type) are used. ”
4-1 to 42-4, which is composed of 1 bit taking a value of "1", and a portion (hereinafter, counter value storage portion) 43-1 to store the number of data corresponding to each data bit.
It is a compression format having 43-4 (hereinafter referred to as a type 1 compression format).

【0025】図4(a)の例では圧縮フォーマットは6
ビット(最大カウント値=63)のカウンタ値格納部を
4つ持っているが、タイプ1の圧縮フォーマットとして
は圧縮フォーマットサイズを32ビットとし、各カウン
タ値格納部の大きさを同じにする場合には3〜9ビット
(最大カウント値=7〜511)までのカウンタ値格納
部およびコントロールビットを7〜3個もつ圧縮フォー
マットデータを用意することができる。また、カウント
値格納部は別のカウンタで数えた個数を格納するよう構
成してもよいし、カウント値格納部自体をそれぞれカウ
ンタとして用いてもよい。
In the example of FIG. 4A, the compression format is 6
Although there are four bit (maximum count value = 63) counter value storage units, the compression format size of Type 1 is 32 bits, and when the size of each counter value storage unit is the same. Can prepare compressed format data having a counter value storage section of 3 to 9 bits (maximum count value = 7 to 511) and 7 to 3 control bits. Further, the count value storage unit may be configured to store the number counted by another counter, or the count value storage unit itself may be used as each counter.

【0026】本実施例では、6ビットのカウンタ値格納
部4つを持つ圧縮フォーマットのほかに、タイプ1とし
て3ビットのカウンタ値格納部7つを持つもの、4ビッ
トのカウンタ値格納部6つを持つもの、9ビットのカウ
ンタ値格納部3つを持つものを用意したが、1ライン分
の画像データの変化点の多様性を考慮して圧縮フォーマ
ット中の各カウンタ値格納部の大きさを異なるようにし
て構成した圧縮フォーマットデータ(例えば、4ビッ
ト、9ビット、9ビット、4ビットのカウンタ値格納部
をもつ圧縮フォーマット)を用意するようにしてもよ
く、圧縮フォーマットサイズや利用目的に応じて様々な
種類のタイプ1の圧縮フォーマットを用意すればよい。
In the present embodiment, in addition to the compression format having four 6-bit counter value storage units, the type 1 has seven 3-bit counter value storage units, and the four 4-bit counter value storage units. Prepared, and one having three 9-bit counter value storage units, the size of each counter value storage unit in the compressed format is taken into consideration in consideration of the variety of change points of image data for one line. Compressed format data configured differently (for example, a compressed format having a 4-bit, 9-bit, 9-bit, and 4-bit counter value storage unit) may be prepared, depending on the compressed format size and the purpose of use. Therefore, various types of compression formats of type 1 may be prepared.

【0027】図5はタイプ1の圧縮フォーマットによる
画像データの圧縮例であり、図5(a)のビット列を図
4(a)の圧縮フォーマットを用いて圧縮すると、図5
(b)に示すようにコントロールビット41の後に第1
データビットとして白に対応する”0”が入られ、カウ
ント値格納部43ー1には白ビットの個数50が格納さ
れ、以下同様に第3〜第4データビットに連続ビットに
対応するビット値が入られ、カウント値格納部43−2
〜43−3には各連続ビットの個数が格納されて32ビ
ット形式のタイプ1の圧縮フォーマットに基づく圧縮デ
ータが形成される。
FIG. 5 shows an example of compression of image data according to the type 1 compression format. When the bit string of FIG. 5A is compressed using the compression format of FIG.
As shown in (b), the first bit after the control bit 41
"0" corresponding to white is entered as a data bit, the number of white bits 50 is stored in the count value storage unit 43-1, and the bit values corresponding to consecutive bits are similarly stored in the third to fourth data bits. Is entered, and the count value storage unit 43-2
The number of consecutive bits is stored in 43 to 43-3 to form compressed data based on the 32-bit type 1 compression format.

【0028】図4(b)の圧縮フォーマットは図6
(a)の画像データのようにある一定のパターンをもっ
たビット列が繰返して連続している画像データに対し有
効な圧縮フォーマットであり、この場合の圧縮フォーマ
ットはコントロールビット42とパターンの繰返し回数
格納部52と参照パターン格納部53を有するデータ記
述部からなる(以下、タイプ2の圧縮フォーマットとい
う)。
The compression format of FIG. 4B is shown in FIG.
This is a compression format effective for image data in which a bit string having a certain pattern is repeated continuously like the image data in (a). The compression format in this case is the control bit 42 and the number of times the pattern is repeated. The data description section has a section 52 and a reference pattern storage section 53 (hereinafter referred to as a type 2 compression format).

【0029】さらに、図4(c)の圧縮フォーマットは
タイプ1のそれぞれの圧縮フォーマットの各カウント値
格納部に格納された値(個数)のそれぞれの合計Ti
が、いずれも Ti<圧縮データサイズ−コントロー
ルビット=Rの場合に選択される圧縮フォーマットであ
り、Rビットの元データ(ラスタデータ列)が格納され
る(以下、タイプ3の圧縮フォーマットという)。
Further, in the compression format of FIG. 4C, the total Ti of the values (numbers) stored in each count value storage of each compression format of type 1 is used.
Is a compression format selected when Ti <compressed data size-control bit = R, and stores R-bit original data (raster data string) (hereinafter, referred to as type 3 compression format).

【0030】本実施例では圧縮データサイズは32ビッ
トでありコントロールビット数を2ビットとしてタイプ
3の圧縮フォーマットには図6に示すように30ビット
の元データが格納される(すなわち、本実施例ではタイ
プ1の各圧縮フォーマット,タイプ2の圧縮フォーマッ
トで圧縮された1フォーマット分のデータ数がいずれの
圧縮フォーマットでも30に満たない場合に原則(図7
の説明参照)としてタイプ3の圧縮フォーマットが用い
られる)。タイプ3の圧縮フォーマットはタイプ1、タ
イプ2での圧縮データ数が圧縮フォーマットサイズ以下
の場合に圧縮効率を高めるために設けているものであ
る。
In this embodiment, the compressed data size is 32 bits, the number of control bits is 2 bits, and the original data of 30 bits is stored in the compression format of type 3 as shown in FIG. 6 (that is, this embodiment). Then, in principle, when the number of data for one format compressed by each type 1 compression format and type 2 compression format is less than 30 in any compression format (see FIG.
Type 3 compression format is used). The type 3 compression format is provided to improve the compression efficiency when the number of compressed data in type 1 and type 2 is equal to or smaller than the compression format size.

【0031】図7は圧縮部4における圧縮処理の一実施
例を示すフローチャートであり、先ず、前述したように
転送制御部3の制御によって画像メモリ21から転送さ
れてきた1ライン分の画像データを受取り、データ数カ
ウンタCを0に圧縮開始位置カウンタDを1にセットす
る(ステップS0)。なお、1ライン分のデータ数は既
知であることから、データ数カウンタDを設けなくても
よいが、本実施例では1ライン分の最終データの処理上
データ数カウンタDを設けている。
FIG. 7 is a flow chart showing an embodiment of the compression processing in the compression unit 4. First, as described above, the image data for one line transferred from the image memory 21 under the control of the transfer control unit 3 is processed. Upon reception, the data number counter C is set to 0 and the compression start position counter D is set to 1 (step S0). Since the number of data for one line is known, it is not necessary to provide the data number counter D, but in the present embodiment, the data number counter D for processing the final data for one line is provided.

【0032】ステップS1では、全ての圧縮フォーマッ
ト(設定(用意)されているタイプ1の圧縮フォーマッ
トの全て、およびタイプ2,タイプ3の圧縮フォーマッ
ト)のデータ記述部を初期化すると共に、各圧縮フォー
マット毎の圧縮合計数カウンタFCi(iは1〜圧縮フ
ォーマット数)を初期化してステップS2に移行する。
なお、圧縮合計数カウンタFCiは後述するようにデー
タを1フォーマットに最も多く圧縮した圧縮フォーマッ
トを選択するためと、次の圧縮を開始するデータ位置を
知るための圧縮開始位置カウンタD値を算出するために
設けているが、圧縮合計数カウンタFCiを設けなくて
も各フォーマットでの圧縮データ数を知ることができる
(例えば、タイプ1についていえば圧縮フォーマットの
各カウンタ値を合計すればよい)ので、圧縮合計数カウ
ンタFCiによらず最も多く圧縮した圧縮フォーマット
の選択と次の圧縮を開始するデータ位置の算出を行うよ
うにしてもよい。
In step S1, the data description part of all compression formats (all of the type 1 compression formats that have been set (prepared) and the compression formats of type 2 and type 3) are initialized, and each compression format is initialized. The total compression number counter FCi (i is 1 to the number of compression formats) is initialized for each and the process proceeds to step S2.
As will be described later, the total compression counter FCi calculates a compression start position counter D value for selecting a compression format in which data is most compressed into one format and for knowing the data position at which the next compression is started. However, since it is possible to know the number of compressed data in each format without providing the total compression counter FCi (for example, in the case of type 1, it is sufficient to add up the respective counter values of the compression formats). Alternatively, regardless of the total compression number counter FCi, the most compressed compression format may be selected and the data position for starting the next compression may be calculated.

【0033】ステップS2では、圧縮合計数カウンタF
Ciの値を1ライン分のデータの圧縮開始位置として、
それぞれ各圧縮フォーマット毎に圧縮を実行するととも
にデータ数カウンタCによるカウントと各圧縮フォーマ
ット毎の圧縮合計数カウンタFCiによる圧縮数のカウ
ントを行い、ステップS3に移行する。例えば、タイプ
1の圧縮フォーマットの種類を3ビットのカウンタ値格
納部7つを持つタイプ1−1、4ビットのカウンタ値格
納部6つを持つタイプ1−2、6ビットのカウンタ値格
納部4つを持つタイプ1−3、9ビットのカウンタ値格
納部3つを持つタイプ1−4とすると、タイプ1−1〜
1−4の圧縮フォーマットについては圧縮開始位置から
のデータビット値の連続性を利用して連続する同種のデ
ータにつきカウンタ値格納部の最大格納値数を限度とし
てカウントを行い、カウント値及びデータビットを格納
する。この動作を各圧縮フォーマットのもつ繰返し可能
数(カウンタ値格納部の個数)を限度として繰返して、
各圧縮フォーマットのもつ繰返し可能数分のカウンタ値
格納部に対する連続データカウント値の格納と、対応す
るデータビットの設定を行うことによりデータの圧縮を
行う。
In step S2, the total compression counter F
Using the value of Ci as the compression start position of the data for one line,
The compression is executed for each compression format, the data number counter C counts, and the total compression number counter FCi counts the compression number for each compression format. Then, the process proceeds to step S3. For example, the type 1 compression format is a type 1-1 having seven 3-bit counter value storage units, and a type 1-2 having six 4-bit counter value storage units and a 6-bit counter value storage unit 4 Assuming that the type 1-3 has three and the type 1-4 has three 9-bit counter value storage units, the types 1-1 to 1-1
For the compression formats 1-4, the continuity of the data bit values from the compression start position is used to count the continuous data of the same type up to the maximum number of stored values in the counter value storage unit, and the count value and the data bit are counted. To store. This operation is repeated up to the number of repeatable numbers (counter value storage units) of each compression format,
Data is compressed by storing the continuous data count value in the counter value storage unit for the repeatable number of each compression format and setting the corresponding data bit.

【0034】タイプ2の圧縮フォーマットについては圧
縮開始位置からのデータの繰返しパターンをとり出し
て、パターン数とそのパターンを格納することによりデ
ータの圧縮を行う。タイプ3の圧縮フォーマットについ
ては他の圧縮フォーマットによる圧縮データ数(圧縮合
計数カウンタFCiの値)がいずれも一定数R(本実施
例では30)未満の場合に圧縮開始位置からその一定数
分のデータをそのままフォーマットの格納位置に格納す
る。ただし、1ライン分の連続する最終データに関して
はその連続数がR未満の場合があり、この場合フォーマ
ット3を用いると伸張部5による処理に不都合があるの
で、タイプ1またはタイプ2の圧縮フォーマットをその
まま用いる。また、1ライン分の画像データにおいて、
ある圧縮フォーマットが確定する以前に1ラインの画像
データが終了した場合には仮に0(ゼロ)を付加して、
圧縮データを完成させる。この圧縮データは伸張処理時
にMビット以降の0データを無効データとして処理する
ようにする。
With regard to the type 2 compression format, the data is compressed by extracting a repeating pattern of data from the compression start position and storing the number of patterns and the pattern. In the case of the type 3 compression format, when the number of pieces of compressed data (value of the total compression counter FCi) by other compression formats is less than the fixed number R (30 in this embodiment), the fixed number of data is from the compression start position. Store the data as is in the storage location of the format. However, the continuous number of continuous data for one line may be less than R, and in this case, if the format 3 is used, the decompression unit 5 is inconvenient to process, so the type 1 or type 2 compression format is used. Use as is. Also, in the image data for one line,
If the image data of one line is completed before a certain compression format is fixed, 0 (zero) is temporarily added,
Complete the compressed data. For this compressed data, 0 data of M bits or more is processed as invalid data at the time of decompression processing.

【0035】ステップS3では、圧縮合計数カウンタF
Ciの値から最も大きい値のカウンタFCjを選びカウ
ンタFCjに対応する圧縮フォーマットjの内容を圧縮
データとして補助記憶装置に格納(または圧縮データエ
リアに格納)する。さらに、カウンタFCjの値を圧縮
開始位置カウンタDに加え、次の圧縮開始位置を算出し
てステップS4に移行する。
In step S3, the total compression counter F
The counter FCj having the largest value is selected from the values of Ci and the content of the compression format j corresponding to the counter FCj is stored as compressed data in the auxiliary storage device (or stored in the compressed data area). Further, the value of the counter FCj is added to the compression start position counter D, the next compression start position is calculated, and the process proceeds to step S4.

【0036】ステップS4では1ライン分の圧縮が終了
したか否かを調べ、1ライン分の圧縮が終了した場合に
はステップS5に移行し、終了していない場合にはステ
ップS1に戻って次の圧縮開始位置カウンタDの値に基
づく圧縮開始位置からデータの圧縮動作を繰返す。
In step S4, it is checked whether or not the compression for one line is completed. If the compression for one line is completed, the process proceeds to step S5. If not completed, the process returns to step S1 to proceed to the next step. The data compression operation is repeated from the compression start position based on the value of the compression start position counter D.

【0037】ステップS5では、圧縮データの桁数(=
圧縮フォーマットサイズ×圧縮データ中の圧縮データの
数)と1ライン分のデータ数(=カウンタCの値)を比
較することにより上記ステップS1〜ステップS4によ
り実際にデータが圧縮されているか否かを調べ、実際に
データが圧縮されている場合にはステップS6に移行
し、圧縮されていない場合(圧縮データの桁数≧カウン
タCの値)にはステップS7に移行する。
In step S5, the number of digits of compressed data (=
By comparing the compressed format size × the number of compressed data in the compressed data) with the number of data for one line (= the value of the counter C), it is determined whether or not the data is actually compressed in the above steps S1 to S4. If the data is actually compressed, the process proceeds to step S6, and if it is not compressed (the number of digits of the compressed data ≧ the value of the counter C), the process proceeds to step S7.

【0038】ステップS6では補助記憶装置22(また
は、記憶エリア)に格納されている圧縮データ列の先頭
に圧縮データ列からなることを意味するコードと後に続
く圧縮データの数等を格納した識別データを付加した圧
縮レコードを構成して、補助記憶装置22に格納し、ス
テップS9に移行する。
In step S6, a code indicating that the compressed data string stored in the auxiliary storage device 22 (or the storage area) is composed of the compressed data string, and the identification data storing the number of the compressed data and the like that follow. The compressed record added with is stored in the auxiliary storage device 22, and the process proceeds to step S9.

【0039】ステップS7では補助記憶装置22(また
は、記憶エリア)に格納されている圧縮データ列を1ラ
イン分の元データ列で書換えて、ステップS8でその先
頭に1ライン分の元データからなることを意味するコー
ドと元データ列のサイズ等を格納した識別データを付加
した元データ列を補助記憶装置22に格納し、ステップ
S9に移行する。なお、ステップS6,S8で構成され
る圧縮レコードおよび元データ列は図8に示すように補
助記憶装置22の論理的に(または物理的に)連続した
領域に書込まれる。なお、図8は上記圧縮処理によって
補助記憶装置22に格納される圧縮レコード列または元
データ列の説明図であり、図8でライン1,ラインNの
分のレコードは識別データおよび圧縮データからなる圧
縮レコードであり、ライン2の分のレコードは識別デー
タおよび元データ列であることが示されている。
In step S7, the compressed data string stored in the auxiliary storage device 22 (or storage area) is rewritten with the original data string for one line, and in step S8 the original data for one line is formed at the beginning. The original data string added with the identification code that stores the code and the size of the original data string is stored in the auxiliary storage device 22, and the process proceeds to step S9. The compressed record and the original data string formed in steps S6 and S8 are written in a logically (or physically) continuous area of the auxiliary storage device 22, as shown in FIG. 8 is an explanatory diagram of a compressed record string or an original data string stored in the auxiliary storage device 22 by the above compression processing. In FIG. 8, the records for line 1 and line N consist of identification data and compressed data. It is shown that the records corresponding to line 2 are compressed records and are identification data and original data strings.

【0040】ステップS9では画像データの全ラインに
ついて以上の処理が終了したかを調べ、終了するまで以
上の処理を繰返す。
In step S9, it is checked whether or not the above processing has been completed for all lines of the image data, and the above processing is repeated until it is completed.

【0041】図9は伸張部5における伸張処理の一実施
例を示すフローチャートである。先ず、ステップS11
で転送制御部3の制御によって補助記憶装置22から識
別データを取りだし、ステップS12で続くデータが圧
縮データか元データ列かを判別し、圧縮データの場合に
はステップS13に移行して圧縮データの伸張処理を行
い、元データ列の場合にはステップS15に移行して元
データ列の出力処理を行う。
FIG. 9 is a flow chart showing an embodiment of the expansion processing in the expansion unit 5. First, step S11
At the step S12, the identification data is taken out from the auxiliary storage device 22 under the control of the transfer controller 3, and in step S12, it is determined whether the subsequent data is the compressed data or the original data string. Decompression processing is performed, and in the case of the original data string, the process proceeds to step S15 and output processing of the original data string is performed.

【0042】ステップS13では、識別データに示され
た数の圧縮データを補助記憶装置22から順次取りだ
し、圧縮データの先頭にあるコントロールビットにより
圧縮フォーマットの種類を判別して圧縮フォーマットの
タイプ毎に定まる復元方法でデータを復元し転送制御部
3が出力インターフェイス部6を介して受け取る外部機
器からの同期信号に同期させて、1ビットずつシリアル
(連続的)に出力インターフェイス部6を介して外部機
器(例えば、印刷出力機23)へ出力し、ステップS1
4で1ライン分のビット数Mを越えたか否かを調べ、1
ライン分のビット数を出力した場合にはステップS17
に移行する。
In step S13, the compressed data of the number indicated by the identification data is sequentially fetched from the auxiliary storage device 22, the type of the compressed format is discriminated by the control bit at the head of the compressed data, and is determined for each type of the compressed format. The data is restored by the restoration method, and the transfer control unit 3 synchronizes with the synchronization signal from the external device received via the output interface unit 6 serially (one bit at a time) through the output interface unit 6 to the external device ( For example, output to the print output machine 23), and step S1
In 4, it is checked whether the number of bits M for one line is exceeded, 1
When the number of bits for the line is output, step S17
Move to

【0043】ステップS15では、識別データに示され
た数の元データを補助記憶装置22から取りだし、元デ
ータをそのまま転送制御部3が出力インターフェイス部
6を介して受け取る外部機器からの同期信号に同期させ
て、1ビットずつシリアルに出力インターフェイス部6
を介して外部機器へ出力し、ステップS16で1ライン
分のビット数Mを越えたか否かを調べ、1ライン分のビ
ット数を出力した場合にはステップS17に移行する。
In step S15, the original data of the number shown in the identification data is taken out from the auxiliary storage device 22, and the original data is directly synchronized with the synchronization signal from the external device which the transfer control unit 3 receives via the output interface unit 6. The output interface unit 6 is serially output bit by bit.
Is output to an external device via step S1, and it is checked in step S16 whether the number of bits M for one line has been exceeded. If the number of bits for one line has been output, the process proceeds to step S17.

【0044】ステップS17では、全ライン分の伸張処
理が終了したか否かを調べ全ライン分の伸張処理が終了
するまで以上の処理を繰返す。
In step S17, it is checked whether or not the expansion processing for all lines is completed, and the above processing is repeated until the expansion processing for all lines is completed.

【0045】図10は図2の長尺印刷装置による一実施
例の説明図である。長尺印刷装置では図中の画像データ
101,102,103についてそれぞれ画像メモリ2
1への画像データの展開、データ圧縮を行い、データ圧
縮・伸張処理装置10により圧縮された画像データ10
1の圧縮データ111、画像データ102の圧縮データ
112、画像データ103の圧縮データ113をそれぞ
れ補助記憶装置22に格納し、さらに、これら圧縮デー
タを補助記憶装置22から読み出して画像データ101
の先頭ライン部分から順次伸張し、伸張データを印刷出
力機23へ出力する。このことにより実装されている画
像メモリ21よりも大きな画像データを1度に出力でき
る(図10で、画像データ101,102,103はそ
れぞれ最大画像メモリの大きさを越すことはできない
が、データ圧縮・伸張処理装置10による圧縮・伸張処
理により印刷出力機23には連続する画像111〜11
3が印刷できる)ようになり、画像メモリ21の容量を
増設することなく画像メモリ21の容量を越える画像の
印刷(すなわち、長尺印刷)を行うことができる。この
ように、伸張データを画像メモリに再展開することなく
出力することができるのでプリンタ、プロッタ等の印刷
出力機ばかりでなく大型画面のCRTやFAX出力等に
も適用可能となる。
FIG. 10 is an explanatory view of an embodiment of the long printing device shown in FIG. In the long printing device, the image memory 2 is used for each of the image data 101, 102, 103 in the drawing.
The image data 10 that has been expanded by 1 and then compressed by the data compression / expansion processing device 10.
The compressed data 111 of No. 1, the compressed data 112 of the image data 102, and the compressed data 113 of the image data 103 are respectively stored in the auxiliary storage device 22, and these compressed data are read from the auxiliary storage device 22 to obtain the image data 101.
Then, the expanded data is output to the print output device 23 from the first line portion of the data. As a result, image data larger than the installed image memory 21 can be output at a time (in FIG. 10, the image data 101, 102, and 103 cannot exceed the maximum image memory size, but data compression is performed). The continuous images 111 to 11 are displayed on the print output machine 23 by the compression / expansion processing by the expansion processing device 10.
3 can be printed), and an image exceeding the capacity of the image memory 21 can be printed (that is, long-length printing) without increasing the capacity of the image memory 21. In this way, since the decompressed data can be output without re-expanding it in the image memory, it can be applied not only to printers, plotters, and other printing output machines, but also to large-screen CRTs and FAX outputs.

【0046】以上説明したように、本発明のデータ圧縮
・伸張方式によれば2値データの連続性を利用したデー
タ圧縮に際し、複数のタイプの圧縮フォーマットを用意
することで圧縮対象となる画像データ(ラスタデータ)
の変化点の出現頻度の大小に拘らず安定した圧縮率を得
ることができる(変化点の少ない画像データについては
カウンタ値格納部の桁数の大きい圧縮フォーマットが有
効となり、多い画像データについてはカウンタ値格納部
の桁数の小さい圧縮フォーマットが有効となる)。ま
た、圧縮データの容量が元データ量を上回った場合の例
外処理として元データを出力することで1ラインあたり
の圧縮データの最悪値はN+1ロングワードとなり、こ
れ以上にはならない(Nは元の画像データ1ライン分の
ロングワード数)。さらに、従来のランレングス符号化
方式では圧縮が困難な階調表現された画像データについ
ても良好な圧縮結果を得ることができる。
As described above, according to the data compression / decompression method of the present invention, image data to be compressed is prepared by preparing a plurality of types of compression formats in data compression utilizing the continuity of binary data. (Raster data)
It is possible to obtain a stable compression rate regardless of the frequency of appearance of the change points of (the compression format with a large number of digits in the counter value storage section is effective for image data with few change points, and the counter for the large number of image data. A compression format with a small number of digits in the value storage is effective). Further, by outputting the original data as an exceptional process when the capacity of the compressed data exceeds the original data amount, the worst value of the compressed data per line becomes N + 1 longword, and it cannot be more than this. Number of long words for one line of image data). Further, it is possible to obtain a good compression result even for image data represented by gradation that is difficult to compress by the conventional run-length encoding method.

【0047】また、本実施例では上述したようにビッ
ト”0”と”1”で表わされる画像データ及び階調デー
タを圧縮できるが、これに限られずカラー画像について
も対応できる。すなわち、カラーの場合には色相が赤信
号(R)、青信号(B)、緑信号(G)の組合せで1つ
の色を構成するので、タイプ1の圧縮データのデータビ
ットを2ビットで1つの色を表わすようにすればよく、
また、タイプ2の圧縮フォーマットで繰返しパターンを
R,B,Gの組合せ(6通り)として色を表現するよう
にすることもでき、タイプ3の圧縮データもカラーデー
タに適用できる。したがって、本発明のデータ圧縮・伸
張方式はカラー画像にも適用できる。
Further, in the present embodiment, the image data and gradation data represented by the bits "0" and "1" can be compressed as described above, but the invention is not limited to this, and a color image can also be supported. That is, in the case of color, one hue is composed of a combination of a red signal (R), a blue signal (B), and a green signal (G), so that one data bit of type 1 compressed data is one bit. It should show the color,
In addition, it is possible to express colors by using a combination of R, B, and G (six patterns) as a repeating pattern in the compression format of type 2, and the compression data of type 3 can also be applied to color data. Therefore, the data compression / expansion method of the present invention can also be applied to color images.

【0048】[0048]

【発明の効果】以上説明したように本発明によれば、次
のような効果を有する。 従来のランレングス符号化方式では圧縮が困難な階
調表現された画像データについても良好な圧縮結果を得
ることができ、本発明のデータ圧縮・伸張方式はカラー
画像にも適用できる 本発明のデータ圧縮・伸張方式を用いたデータ圧縮
・伸張処理装置では圧縮処理または伸張処理において複
雑な算術演算を行わないのでハードウエア化が容易であ
る。 圧縮データの容量が元データ量を上回った場合の例
外処理として元データを出力することにより、圧縮デー
タ容量に上限が定められ、1ライン分の伸張データを伸
張する際の処理時間を一定に保つことができる。 圧縮データ列が元の画像データの1ライン毎に対応
しているので、外部出力機器からの同期信号を基準に一
定時間内に安定した伸張処理を繰返し行うことが可能と
なり、外部出力機器とのインターフェイスが容易にな
る。 伸張データを画像メモリに再展開することなく出力
することができるのでプリンタ、プロッタ等の印刷出力
機やCRT画面の大型化に伴う画像メモリのコスト増加
を抑制できる。 伸張データを画像メモリに再展開することなく出力
することができるのでプリンタ、プロッタ等の印刷出力
機による長尺印刷ばかりでなく大型画面のCRTやFA
X出力等にも適用可能となる。
As described above, the present invention has the following effects. It is possible to obtain a good compression result even for image data represented by gradation that is difficult to compress by the conventional run-length encoding method, and the data compression / expansion method of the present invention can also be applied to color images. Since the data compression / expansion processing device using the compression / expansion method does not perform complicated arithmetic operations in the compression processing or the expansion processing, hardware implementation is easy. By outputting the original data as an exceptional process when the amount of compressed data exceeds the amount of original data, an upper limit is set for the amount of compressed data and the processing time for decompressing decompressed data for one line is kept constant. be able to. Since the compressed data string corresponds to each line of the original image data, it is possible to repeat stable decompression processing within a fixed time based on the synchronization signal from the external output device, and Easy interface. Since the decompressed data can be output without re-expanding to the image memory, it is possible to suppress an increase in the cost of the image memory due to an increase in the size of a printout device such as a printer or plotter or a CRT screen. Since the decompressed data can be output without re-expanding to the image memory, not only long printing by a printing output machine such as a printer or plotter but also a large screen CRT or FA
It can also be applied to X output and the like.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明のデータ圧縮・伸張方式を用いたデータ
圧縮・伸張処理装置の一実施例の構成を示すブロック図
である。
FIG. 1 is a block diagram showing the configuration of an embodiment of a data compression / expansion processing apparatus using a data compression / expansion system of the present invention.

【図2】図1のデータ圧縮・伸張処理装置を構成要素と
するコンピュータシステムの一実施例としての長尺印刷
装置の構成例を示すブロック図である。
FIG. 2 is a block diagram showing a configuration example of a long printing device as one embodiment of a computer system having the data compression / decompression processing device of FIG. 1 as a component.

【図3】Mビット×Nラインの画像データの画像メモリ
上の展開図である。
FIG. 3 is a development view of image data of M bits × N lines on an image memory.

【図4】圧縮部で用いる圧縮フォーマットの例を示した
図である。
FIG. 4 is a diagram showing an example of a compression format used in a compression unit.

【図5】タイプ1の圧縮フォーマットによる画像データ
の圧縮例である。
FIG. 5 is an example of compression of image data in a compression format of type 1.

【図6】タイプ2の圧縮フォーマットによる画像データ
の圧縮例である。
FIG. 6 is an example of compression of image data according to a type 2 compression format.

【図7】圧縮部における圧縮処理の一実施例を示すフロ
ーチャートである。
FIG. 7 is a flowchart illustrating an example of compression processing in a compression unit.

【図8】圧縮処理によって補助記憶装置に格納される圧
縮レコード列または元データ列レコードの説明図であ
る。
FIG. 8 is an explanatory diagram of a compressed record string or an original data string record stored in an auxiliary storage device by a compression process.

【図9】伸張部における伸張処理の一実施例を示すフロ
ーチャートである。
FIG. 9 is a flowchart showing an example of decompression processing in a decompression unit.

【図10】図1の長尺印刷装置による一実施例の説明図
である。
10 is an explanatory diagram of an embodiment of the long-size printing apparatus of FIG.

【符号の説明】[Explanation of symbols]

2 制御命令解析部(制御部) 3 転送制御部(制御部) 4 圧縮部 5 伸張部 19 データ圧縮・伸張処理装置 21 画像メモリ 22 補助記憶装置(格納部) 23 印刷出力機 2 control command analysis unit (control unit) 3 transfer control unit (control unit) 4 compression unit 5 decompression unit 19 data compression / decompression processing device 21 image memory 22 auxiliary storage device (storage unit) 23 print output machine

───────────────────────────────────────────────────── フロントページの続き (72)発明者 園田 健一 神奈川県川崎市麻生区南黒川10−1 株式 会社日本デジタル研究所川崎研究開発セン タ−内 (72)発明者 尾上 涼一 神奈川県川崎市麻生区南黒川10−1 株式 会社日本デジタル研究所川崎研究開発セン タ−内 ─────────────────────────────────────────────────── ─── Continuation of front page (72) Kenichi Sonoda 10-1 Minamikurokawa, Aso-ku, Kawasaki-shi, Kanagawa Japan Digital Research Institute Kawasaki R & D Center (72) Inventor Ryoichi Onoue Kawasaki-shi, Kanagawa 10-1 Minamikurokawa, Aso-ku Japan Digital Research Institute, Ltd. Kawasaki R & D Center

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 予め符号化形式を規定した複数種類の固
定長の圧縮フォーマットにより、所定単位L毎に元デー
タを最初の圧縮開始位置から各圧縮フォーマットでそれ
ぞれ符号化したのち、各々の圧縮フォーマットの中から
符号化された元データ数が最大の圧縮フォーマットを選
択して圧縮データとし、前回の圧縮開始位置に上記符号
化された元データ数を加えて新たな圧縮開始位置とし該
圧縮開始位置からの各圧縮フォーマットによる符号化及
び圧縮フォーマットの選択を繰返して所定単位L毎の元
データの圧縮データ列を生成する、ことを特徴とするデ
ータ圧縮方式。
1. A plurality of types of fixed-length compression formats in which encoding formats are defined in advance, the original data is encoded for each predetermined unit L in each compression format from the first compression start position, and then each compression format. The compression format with the maximum number of encoded original data is selected as compressed data, and the number of encoded original data is added to the previous compression start position to make a new compression start position. The data compression method is characterized in that the compression data string of the original data for each predetermined unit L is generated by repeating the encoding in each compression format and the selection of the compression format.
【請求項2】 請求項1に記載のデータ圧縮方式におい
て、選択された圧縮フォーマットにより符号化された元
データ数が所定値より少ないとき、圧縮開始位置から所
定単位分の長さの元データを格納する圧縮フォーマット
を設けていることを特徴とするデータ圧縮方式。
2. The data compression method according to claim 1, wherein when the number of original data encoded by the selected compression format is smaller than a predetermined value, the original data having a length of a predetermined unit from the compression start position is generated. A data compression method characterized in that a compression format for storing is provided.
【請求項3】 請求項2に記載のデータ圧縮方式におい
て、所定単位Lの元データから圧縮データ列を生成した
あと、圧縮データ列の長さと所定単位Lの元データの長
さを比較し、圧縮データ列の長さが所定単位Lの元デー
タの長さより短いとき識別データを該圧縮データ列の先
頭に付加して圧縮データ列と共に出力し、圧縮データ列
の長さが所定単位Lの元データの長さより短くないとき
は識別データを所定単位Lの元データ列の先頭に付加し
て出力する、ことを特徴とするデータ圧縮方式。
3. The data compression method according to claim 2, wherein after generating a compressed data string from the original data of a predetermined unit L, the length of the compressed data string and the length of the original data of the predetermined unit L are compared, When the length of the compressed data string is shorter than the length of the original data of the predetermined unit L, the identification data is added to the head of the compressed data string and output together with the compressed data string. A data compression method characterized in that when the length is not shorter than the length of the data, the identification data is added to the beginning of the original data string of a predetermined unit L and output.
【請求項4】 請求項3に記載のデータ圧縮方式により
出力された識別データにより次に続くデータが圧縮デー
タ列か元データかの別を判定し、圧縮データ列の場合は
圧縮データの種類別に元データを復元して出力同期信号
に同期させて出力し、元データ列の場合はそのまま出力
同期信号に同期させて出力する、ことを特徴とする圧縮
データ伸張方式。
4. The identification data output by the data compression method according to claim 3 is used to determine whether the following data is a compressed data string or original data. A compressed data decompression method characterized in that original data is restored and output in synchronization with an output synchronization signal, and in the case of an original data string, it is output in synchronization with the output synchronization signal.
【請求項5】 少なくともデータの転送制御を行う制御
部と、 順次受け取る所定単位L毎の元データについて、請求項
3のデータ圧縮方式により所定単位L毎の元データの圧
縮及び識別データを先頭とした圧縮データ列または識別
データを先頭とした所定単位L分の元データ列の出力を
行う圧縮部と、 圧縮部により生成された、識別データを先頭とした上記
圧縮データ列または上記元データ列を順次格納する格納
部と、 格納部に格納された識別データを先頭とした圧縮データ
列または識別データを先頭とした元データ列を順次受け
取って、該識別データから次に続くデータが圧縮データ
列か元データ列かを判定し、圧縮データ列の場合は圧縮
データの種類別に元データを復元して外部機器からの出
力同期信号に同期させて出力し、元データ列の場合はそ
のまま外部機器からの出力同期信号に同期させて出力す
る伸張部と、 を有することを特徴とするデータ圧縮・伸張処理装置。
5. A control unit for controlling at least data transfer, and with respect to the original data for each predetermined unit L received sequentially, the compression and identification data of the original data for each predetermined unit L by the data compression method of claim 3 The compressed data string or the original data string for the predetermined unit L having the identification data as the head, and the compressed data string having the identification data as the head or the original data string generated by the compression unit A storage unit that sequentially stores and a compressed data string that starts with the identification data stored in the storage unit or an original data string that starts with the identification data is sequentially received, and whether the data that follows from the identification data is a compressed data string. It is judged whether it is the original data string, and if it is the compressed data string, the original data is restored according to the type of compressed data and output in synchronization with the output synchronization signal from the external device. In the case of, the data compression / decompression processing device is characterized by having a decompression unit that outputs the data in synchronization with the output synchronization signal from the external device.
JP6339927A 1994-12-28 1994-12-28 System and device for compressing/extending data Pending JPH08186503A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6339927A JPH08186503A (en) 1994-12-28 1994-12-28 System and device for compressing/extending data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6339927A JPH08186503A (en) 1994-12-28 1994-12-28 System and device for compressing/extending data

Publications (1)

Publication Number Publication Date
JPH08186503A true JPH08186503A (en) 1996-07-16

Family

ID=18332082

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6339927A Pending JPH08186503A (en) 1994-12-28 1994-12-28 System and device for compressing/extending data

Country Status (1)

Country Link
JP (1) JPH08186503A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6138164A (en) * 1997-11-14 2000-10-24 E-Parcel, Llc System for minimizing screen refresh time using selectable compression speeds
CN102437855A (en) * 2011-11-02 2012-05-02 桂林理工大学 Data compression method of grade merging of octree three-dimensional model

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6138164A (en) * 1997-11-14 2000-10-24 E-Parcel, Llc System for minimizing screen refresh time using selectable compression speeds
US6505239B1 (en) * 1997-11-14 2003-01-07 Atabok Japan, Inc. System for minimizing screen refresh time using selectable compression speeds
CN102437855A (en) * 2011-11-02 2012-05-02 桂林理工大学 Data compression method of grade merging of octree three-dimensional model

Similar Documents

Publication Publication Date Title
EP1318665B1 (en) Image processing apparatus and method, program, and storage medium
EP0588653A2 (en) Image data coding and restoring method and appatatus for coding and restoring the same
US5363138A (en) Image signal reproducing apparatus for partially reproducing image to be displayed
US6563960B1 (en) Method for merging images
EP0754393B1 (en) Video image colour encoding
US5249066A (en) Method and system for writing and reading coded data
JP2000295113A (en) Huffman coded data compressor
JP4189443B2 (en) Graphics image compression and decompression method
US6898310B1 (en) Image signal processing method, image signal processing system, storage medium, and image sensing apparatus
CA2009848C (en) Method and system for writing and reading coded data
JPH07322074A (en) Equipment and method for data processing to process 2 level image file that a dither ring happened
CN112118449A (en) Method and device for compressing and decompressing image
US6947599B2 (en) Apparatus and method for image compression using a specified restart interval
JPH08186503A (en) System and device for compressing/extending data
JP3496220B2 (en) Lossless compression and decompression of data representing images
US7346220B2 (en) Method and apparatus for reducing the bandwidth required to transmit image data
JP3797458B2 (en) Data compression device
JP3249616B2 (en) Image data compression apparatus and method
JP2003348355A (en) Image processing apparatus and control method therefor
JP2791410B2 (en) Compressed image data extraction device
JP3559419B2 (en) Method and apparatus for decompressing compressed image data
JPH0896141A (en) Image processor
US5991446A (en) Image conversion device
JP2002540685A (en) Image compression and decompression
JP2833362B2 (en) Image signal expansion device