JP2000069294A - Data compression method and its device, data expansion method and its device, and printer - Google Patents

Data compression method and its device, data expansion method and its device, and printer

Info

Publication number
JP2000069294A
JP2000069294A JP23760898A JP23760898A JP2000069294A JP 2000069294 A JP2000069294 A JP 2000069294A JP 23760898 A JP23760898 A JP 23760898A JP 23760898 A JP23760898 A JP 23760898A JP 2000069294 A JP2000069294 A JP 2000069294A
Authority
JP
Japan
Prior art keywords
data
matches
bit
match
indicating
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
JP23760898A
Other languages
Japanese (ja)
Inventor
Noriyoshi Chiba
徳良 千葉
Ryuji Omoto
隆二 大本
Michio Maruyama
三千男 丸山
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP23760898A priority Critical patent/JP2000069294A/en
Publication of JP2000069294A publication Critical patent/JP2000069294A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To efficiently compress repetitive data in 2 to 3 bytes appearing in image data expressing a half tone by using data in a prescribed positional relation to discriminate matching or not for directly preceding data or a prescribed-number preceding data with respect to processing object data. SOLUTION: Compression object data latched in a compression object data register 101 are given to a line buffer 102 via a data line. When the processing object data match with one previous data of the image object data, the number of repetition times of matching is obtained, and code data consisting of a data bit denoting the watching and bit data decided depending on the number of time are outputted. Furthermore, when the processing object data do not match with one data before the processing object data but match with two or a prescribed number of preceding data, the data and the number of repetition times of the coincidence are obtained and code data consisting of bit data denoting the matching and bit data decided depending on the number of times are outputted.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、データ圧縮方法お
よび装置並びにデータ伸長方法および装置である。ま
た、本発明は、データ伸長装置を備えたプリンタに関す
る。
The present invention relates to a data compression method and apparatus and a data decompression method and apparatus. The invention also relates to a printer provided with a data decompression device.

【0002】[0002]

【従来技術】従来の代表的なデータ圧縮方法として、ラ
ンレングス法が知られている。このランレングス法の基
本的な考え方は、あるデータ列(ラスタ)を左から順に
みて、同じデータ(数値)が連続した場合、そのデータ
と連続した回数の2つの数値の組で表現することで、デ
ータを圧縮するというものである。従って、このランレ
ングス法によれば、同じデータが連続しているほど圧縮
率は高くなる。
2. Description of the Related Art As a conventional typical data compression method, a run length method is known. The basic idea of the run-length method is to look at a certain data sequence (raster) in order from the left, and if the same data (numerical value) is continuous, express it as a set of two numerical values of the data and the number of consecutive times. , To compress the data. Therefore, according to the run-length method, the compression ratio increases as the same data continues.

【0003】また、複数のデータ列で構成される画像デ
ータのような場合には、あるデータとそのすぐ上に位置
するデータとが比較的高い確率で一致することが知られ
ている。従って、注目しているデータのすぐ上に位置す
るデータとが一致した場合には、これを1ビットで表現
することでデータを圧縮する方法もある。
In the case of image data composed of a plurality of data strings, it is known that certain data coincides with data located immediately above it with a relatively high probability. Therefore, when the data located immediately above the data of interest matches, there is also a method of compressing the data by expressing this in one bit.

【0004】これらのデータ圧縮方法は、プリンタ装置
や複写機等で扱われるデータに対して使用されている。
[0004] These data compression methods are used for data handled by printers, copiers and the like.

【0005】近年のプリンタ装置等は、より高品質の画
像を出力することができるように、階調(ハーフトー
ン)で表現することができるものが多い。ハーフトーン
は、例えば、モノクロの場合には、複数ドットから構成
されるいくつかのハーフトーンセルを組み合わせること
で濃淡として表現される。また、カラー場合には、各色
のスクリーンのハーフトーンセルの組み合わせを重ねる
ことで表現される。このようなハーフトーンを表現した
画像データでは、特定のハーフトーンセルが繰り返され
ることになる。
[0005] In recent years, many printers and the like can express gradations (halftones) so that higher quality images can be output. For example, in the case of monochrome, a halftone is expressed as light and shade by combining some halftone cells composed of a plurality of dots. In the case of color, it is expressed by overlapping the combination of halftone cells of the screen of each color. In the image data expressing such a halftone, a specific halftone cell is repeated.

【0006】[0006]

【発明が解決しようとする課題】従って、上記従来のデ
ータ圧縮方法では、注目している処理対象データに対し
て直前のデータのみと比較するか、すぐ上のデータとの
み比較してデータの圧縮を行っていたので、ハーフトー
ンを表現した画像データに対しては、効率よく圧縮する
ことができなかった。
Therefore, in the above-mentioned conventional data compression method, the data to be processed is compared with only the immediately preceding data or only with the immediately preceding data, and the data is compressed. Therefore, the image data expressing the halftone cannot be efficiently compressed.

【0007】すなわち、ハーフトーンを表現した画像デ
ータでは、注目している処理対象データとこれのすぐ上
のデータとが一致しないことも多く、すぐ上のデータと
比較したのみでは、かえって圧縮率が低くなるという課
題があった。
That is, in the image data expressing the halftone, the data to be processed and the data immediately above it often do not match, and the compression ratio is rather reduced only by comparing with the data immediately above. There was a problem that it became lower.

【0008】また、ハーフトーンを表現した画像データ
は、2バイトまたは3バイトのデータが繰り返されるこ
とも多く、直前のデータとのみ比較する従来のデータ圧
縮方法では効率よく圧縮することができないという課題
があった。
In addition, image data representing halftones often have 2-byte or 3-byte data repeated, and cannot be efficiently compressed by a conventional data compression method that compares only the immediately preceding data. was there.

【0009】そこで、本発明は、ハーフトーンを表現し
た画像データに現れる2,3バイトの繰り返しデータを
効率よく圧縮することのできるデータ圧縮方法を提供す
ることを目的とする。
Accordingly, an object of the present invention is to provide a data compression method capable of efficiently compressing a few bytes of repeated data appearing in image data expressing a halftone.

【0010】[0010]

【課題を解決するための手段】本発明は、画像を構成す
る画像データの中から1ライン方向に1データずつ処理
対象データとして特定し、処理対象データと所定の位置
関係にあるデータとが一致するか否かを判断し、一致す
ると判断した場合には、当該一致が繰り返される回数を
求めて、当該一致したデータの位置関係を示すビットデ
ータおよび当該回数に応じて定められたビットデータか
らなる符号データを出力するデータ圧縮方法であって、
前記所定の位置関係にあるデータが、少なくとも前記処
理対象データに対して1データ前のデータおよび2デー
タ以上の所定数データ前のデータであることを特徴とす
るデータ圧縮方法である。
According to the present invention, data to be processed is specified one by one in the direction of one line from image data constituting an image, and the data to be processed matches data having a predetermined positional relationship. Is determined, and if it is determined that they match, the number of times the matching is repeated is obtained, and the bit data indicating the positional relationship of the matched data and bit data determined according to the number of times are determined. A data compression method for outputting encoded data,
The data compression method is characterized in that the data having the predetermined positional relationship is at least one data before the processing target data and two or more data before a predetermined number of data.

【0011】より具体的には、本発明は、画像を構成す
る画像データ中の処理対象データを1データずつ1ライ
ン方向に走査しながら符号データを出力するデータ圧縮
方法であって、前記処理対象データと前記処理対象デー
タに対して1データ前のデータとが一致する場合に、当
該1データ前のデータと一致が繰り返される回数を求
め、1データ前のデータとの一致を示すビットデータお
よび当該回数に応じて定められたビットデータからなる
符号データを出力し、前記1データ前のデータと一致せ
ず、前記処理対象データと前記処理対象データに対して
2データ以上の所定数データ前のデータとが一致する場
合に、当該所定数データ前のデータと一致が繰り返され
る回数を求め、所定数データ前のデータとの一致を示す
ピットデータおよび当該回数に応じて定められたビット
データからなる符号データを出力することを特徴とする
データ圧縮方法である。
More specifically, the present invention relates to a data compression method for outputting code data while scanning data to be processed in image data constituting an image one by one in a line direction. When the data and the data to be processed coincide with the data one data before, the number of times the coincidence with the data one data before is repeated is obtained, and the bit data indicating the coincidence with the data one data before and Code data consisting of bit data determined according to the number of times is output, and the data to be processed does not match the data before one data, and the data to be processed and the data to be processed are two or more data preceding the predetermined number of data. Is found, the number of times of repetition of the match with the data before the predetermined number of data is obtained, and pit data indicating the match with the data before the predetermined number of data and A data compression method and outputs the code data composed of bit data determined according to 該回 number.

【0012】ここで、前記データ圧縮方法は、前記処理
対象データと前記処理対象データに対して上に位置する
データとが一致する場合に、当該上に位置するデータと
一致が繰り返される回数を求め、上に位置するデータと
の一致を示すピットデータおよび当該回数に応じて定め
られたビットデータからなる符号データを出力するよう
にしてもよい。
In the data compression method, when the data to be processed coincides with data located above the data to be processed, the number of times that the coincidence with the data located above is repeated is determined. Alternatively, code data composed of pit data indicating coincidence with data located above and bit data determined according to the number of times may be output.

【0013】また、本発明は、画像を構成する画像デー
タの中から1ライン方向に1データずつ処理対象データ
を走査して符号データを出力するデータ圧縮装置におい
て、前記処理対象データと前記処理対象データに対して
1データ前のデータとが一致するか否かを判断する第1
の判断手段と、前記処理対象データと前記処理対象デー
タに対して2データ以上の所定数データ前のデータとが
一致するか否かを判断する第2の判断手段と、前記処理
対象データと前記処理対象データに対して所定の位置関
係にあるデータとの一致が連続して繰り返されるごとに
その一致回数を取得する一致回数取得手段と、一致した
データの位置関係を示すビットデータおよび一致回数に
応じて定められたビットデータからなる符号データを出
力する符号出力手段と、を備え、前記第1の判断手段に
より一致すると判断される場合に、前記一致回数取得手
段により当該一致回数を取得し、当該1データ前のデー
タとの一致を示すビットデータおよび当該一致回数に応
じて定められたビットデータからなる符号データを出力
し、前記第1の手段により一致せず、前記第2の判断手
段により一致すると判断される場合に、前記一致回数取
得手段により当該一致回数を取得し、当該所定数データ
前のデータとの一致を示すビットデータおよび当該一致
回数に応じて定められたピットデータからなる符号デー
タを出力するように構成したことを特徴とするデータ圧
縮装置である。
According to the present invention, there is provided a data compression apparatus which scans data to be processed one by one in a line direction from image data constituting an image and outputs coded data. First to determine whether the data matches the data one data before
Determining means for determining whether the data to be processed and the data to be processed are equal to or more than a predetermined number of data preceding the data to be processed by a predetermined number of data; and A number-of-coincidence acquiring means for acquiring the number of coincidences each time the coincidence of data having a predetermined positional relationship with the data to be processed is continuously repeated; Code output means for outputting code data composed of bit data determined in accordance therewith, and when the first determination means determines that there is a match, the match number acquisition means acquires the number of matches, Outputting bit data indicating the coincidence with the data preceding by one data and code data including bit data determined according to the number of coincidences; And the second determination means determines that the number of matches is equal, the number of matches is obtained by the number-of-matches obtaining means, and the bit data indicating the match with the data preceding the predetermined number of data and the matching A data compression device configured to output code data composed of pit data determined according to the number of times.

【0014】さらに、本発明は、上記データ圧縮方法ま
たはデータ圧縮装置により圧縮された復号データを伸長
するデータ伸長方法またはデータ伸長装置を含む。
Further, the present invention includes a data decompression method and a data decompression device for decompressing decoded data compressed by the above data compression method or data compression device.

【0015】具体的には、本発明は、入力されるピット
データの中から、1データ前のデータとの一致を示す位
置関係を示すビットデータを取得する第1のコマンド取
得手段と、入力されるビットデータの中から、2データ
以上の所定数前のデータとの一致を示す位置関係を示す
ビットデータを取得する第2のコマンド取得手段と、入
力されるビットデータの中から、前記位置関係を示すビ
ットデータに対応付けられた一致回数に応じて定められ
たビットデータを取得する一致回数取得手段と、前記第
1のコマンド取得手段により位置関係を示すビットデー
タが取得された場合に、最後に復号された復号データを
前記一致回数取得手段により取得された一致回数を示す
ビットデータに応じて定められた一致回数だけ復号デー
タとして出力し、前記第2のコマンド取得手段により位
置関係を示すビットデータが取得された場合に、最後に
復号された復号データに対して1つ前のデータを前記一
致回数取得手段により取得された一致回数を示すピット
データに応じて定められた一致回数だけ復号データとし
て出力する復号出力手段とを備えたことを特徴とするデ
ータ伸長装置である。
Specifically, according to the present invention, first command acquisition means for acquiring bit data indicating a positional relationship indicating coincidence with data one data before from input pit data, A second command acquisition means for acquiring bit data indicating a positional relationship indicating a match with data two or more data before a predetermined number of bits from the input bit data; A number-of-matches acquisition unit for acquiring bit data determined according to the number of coincidences associated with the bit data indicating the bit data indicating the positional relationship, when the first command acquisition unit acquires the bit data indicating the positional relationship, The decoded data is output as decoded data only for the number of matches determined according to the bit data indicating the number of matches obtained by the number of matches obtaining means, When the bit data indicating the positional relationship is acquired by the second command acquiring means, the data immediately before the last decoded data is indicated by the coincidence number acquired by the coincidence number acquiring means. And a decoding output means for outputting as decoded data the number of matches determined in accordance with the pit data.

【0016】さらに、本発明は、圧縮された符号データ
を原データに復号するデータ伸長装置を備えたプリンタ
や複写機、ファクシミリ等の印刷装置としても成立す
る。
Further, the present invention can be realized as a printing device such as a printer, a copying machine, a facsimile, etc., provided with a data decompression device for decoding compressed code data into original data.

【0017】また、本発明は、コンピュータに所定の機
能を有するプログラムを実行させることにより実現する
こともできる。
The present invention can also be realized by causing a computer to execute a program having a predetermined function.

【0018】具体的には、本発明は、画像データを構成
する画像データの中から1ライン方向に1データずつ処
理対象データを走査して符号データを出力する機能を実
現するプログラムを記録した記録媒体であって、前記プ
ログラムは、前記処理対象データと前記処理対象データ
に対して1データ前のデータとが一致するか否かを判断
する第1の判断手段と、前記処理対象データと前記処理
対象データに対して2データ以上の所定数データ前のデ
ータとが一致するか否かを判断する第2の判断手段と、
前記処理対象データと前記処理対象データに対して所定
の位置関係にあるデータとの一致が連続して繰り返され
るごとにその一致回数を取得する一致回数取得手段と、
一致したデータの位置関係を示すビットデータおよび一
致回数に応じて定められたビットデータからなる符号デ
ータを出力する符号出力手段と、前記第1の判断手段に
より一致すると判断される場合に、前記一致回数取得手
段により当該一致回数を取得し、当該1データ前のデー
タとの一致を示すビットデータおよび当該一致回数に応
じて定められたビットデータからなる符号データを出力
し、前記第1の手段により一致せず、前記第2の判断手
段により一致すると判断される場合に、前記一致回数取
得手段により当該一致回数を取得し、当該所定数データ
前のデータとの一致を示すビットデータおよび当該一致
回数に応じて定められたビットデータからなる符号デー
タを出力する符号出力手段とを備えたことを特徴とする
プログラムを記録した記録媒体であってよい。
More specifically, the present invention provides a recording method for recording a program for realizing a function of scanning data to be processed one by one in a line direction from image data constituting image data and outputting code data. Medium, wherein the program comprises: first determination means for determining whether or not the data to be processed matches data one data before the data to be processed; Second determining means for determining whether or not the target data is equal to data two or more data preceding a predetermined number of data;
A coincidence number acquisition unit that acquires the number of coincidences each time the coincidence between the processing target data and the data having a predetermined positional relationship with respect to the processing target data is continuously repeated,
Code output means for outputting bit data indicating the positional relationship between the matched data and bit data determined in accordance with the number of matches, and a code output means for outputting the code data when the first determination means determines that they match; The number of coincidences is acquired by the number-of-times acquisition means, and bit data indicating the coincidence with the preceding data and code data including bit data determined according to the number of coincidences are output. When it is determined that they do not match, and the second determination means determines that they match, the number of matches is obtained by the number-of-matches obtaining means, and bit data indicating the match with the data preceding the predetermined number of data and the number of matches are obtained. And a code output means for outputting code data composed of bit data determined according to the program. It may be a recording medium.

【0019】この場合、前記プログラムは、例えば、い
わゆるプリンタドライバとして実現され、オペレーティ
ングシステムの制御の下、コンピュータに所定の機能を
実現させる。
In this case, the program is realized, for example, as a so-called printer driver, and causes a computer to realize predetermined functions under the control of an operating system.

【0020】また、本発明は、圧縮された復号データを
原データに復号する機能をコンピュータに実現させるプ
ログラムを記録した記録媒体であって、前記プログラム
は、入力されるビットデータの中から、1データ前のデ
ータとの一致を示す位置関係を示すビットデータを取得
する第1のコマンド取得手段と、入力されるビットデー
タの中から、2データ以上の所定数前のデータとの一致
を示す位置関係を示すビットデータを取得する第2のコ
マンド取得手段と、入力されるビットデータの中から、
前記位置関係を示すビットデータに対応付けられた一致
回数に応じて定められたビットデータを取得する一致回
数取得手段と、前記第1のコマンド取得手段により位置
関係を示すビットデータが取得された場合に、最後に復
号された復号データを前記一致回数取得手段により取得
された一致回数を示すビットデータに応じて定められた
一致回数だけ復号データとして出力し、前記第2のコマ
ンド取得手段により位置関係を示すビットデータが取得
された場合に、最後に復号された復号データに対して1
つ前のデータを前記一致回数取得手段により取得された
一致回数を示すビットデータに応じて定められた一致回
数だけ復号データとして出力する復号出力手段とを備え
たことを特徴とするプログラムを記録した記録媒体であ
ってもよい。
Further, the present invention is a recording medium on which a program for causing a computer to perform a function of decoding compressed decoded data into original data is recorded. First command acquisition means for acquiring bit data indicating a positional relationship indicating coincidence with data before data, and a position indicating coincidence with data equal to or more than a predetermined number of data earlier than two data among input bit data A second command acquisition unit for acquiring bit data indicating a relationship; and
A case in which bit data indicating a positional relationship is obtained by the first command obtaining unit and a number-of-matches obtaining unit that obtains bit data determined in accordance with the number of matches associated with the bit data indicating the positional relationship; The decoded data that has been decoded last is output as decoded data for the number of matches determined according to the bit data indicating the number of matches obtained by the number-of-matches obtaining means, and the positional relationship is determined by the second command obtaining means. Is obtained, the bit data indicating the last decoded data is 1
And decoding output means for outputting the previous data as decoded data for the number of matches determined according to the bit data indicating the number of matches obtained by the number of matches obtaining means. It may be a recording medium.

【0021】ここで、前記記録媒体とは、例えば、ハー
ドディスク(HD)、DVD−RAM、フレキシブルデ
ィスク(FD)やCD−ROM等のほかに、RAMやR
OM等のメモリを含む。また、前記コンピュータとは、
例えば、CPUやMPUといったいわゆる中央処理装置
がプログラムを解釈することで所定の処理を行う、いわ
ゆるマイクロコンピュータ等をも含む。
Here, the recording medium is, for example, a hard disk (HD), a DVD-RAM, a flexible disk (FD), a CD-ROM, etc.
Includes memory such as OM. Also, the computer is
For example, a so-called central processing unit such as a CPU or an MPU that performs a predetermined process by interpreting a program includes a so-called microcomputer.

【0022】[0022]

【発明の実施の形態】次に、本発明の実施の形態につい
て、図面を参照しつつ説明する。
Next, embodiments of the present invention will be described with reference to the drawings.

【0023】[第1の実施形態]本実施形態は、データ
圧縮処理を行う装置および方法に関するものである。デ
ータ圧縮処理は、画像データを圧縮(符号化と呼ばれる
こともある。)して符号データに変換する処理である。
[First Embodiment] The present embodiment relates to an apparatus and a method for performing data compression processing. The data compression process is a process of compressing (sometimes called encoding) image data and converting it into encoded data.

【0024】図1は、本実施形態に係るデータ圧縮部の
構成を示す図である。同図において、圧縮対象データレ
ジスタ101は、nビットの圧縮対象データを保持す
る。本実施形態では、8ビット(1バイト)の圧縮対象
データを保持するものとする。圧縮対象データレジスタ
101に保持されている圧縮対象データは、図示しない
制御部により、データ線を介してラインバッファ102
に送出される。ラインバッファ102は、1ライン分の
データを記憶する。圧縮対象データは、ラインバッファ
用アドレスポインタ103に保持されたポインタ値に従
って、所定のタイミングでラインバッファ101に送出
され、保持される。
FIG. 1 is a diagram showing a configuration of a data compression unit according to the present embodiment. In the figure, a compression target data register 101 holds n-bit compression target data. In the present embodiment, it is assumed that 8-bit (1 byte) data to be compressed is held. The compression target data held in the compression target data register 101 is transmitted to the line buffer 102 via a data line by a control unit (not shown).
Sent to The line buffer 102 stores data for one line. The data to be compressed is sent to the line buffer 101 at a predetermined timing according to the pointer value held in the line buffer address pointer 103 and is held therein.

【0025】上データレジスタ104aは、圧縮対象レ
ジスタ101に保持された圧縮対象データのすぐ上に位
置するデータ(以下「上データ」ということもある。)
を保持する。なお、圧縮対象データが1ライン目にある
場合には、前ラスターの全てのデータは“0”とする。
すなわち、上データは“0”になる。
The upper data register 104a is data located immediately above the compression target data held in the compression target register 101 (hereinafter, also referred to as "upper data").
Hold. When the data to be compressed is on the first line, all data of the previous raster is set to “0”.
That is, the upper data becomes "0".

【0026】第1左データレジスタ104bは圧縮対象
データの1つ前のデータを、第2左データレジスタ10
4cは圧縮対象データの2つ前のデータを、第3左デー
タレジスタ104dは圧縮対象データの3つ前のデータ
を、それぞれ保持する。これらのデータの関係は、図2
に示すようになる。すなわち、同図において、斜線で示
された圧縮対象データ(バイト)に対してすぐ上のデー
タ、左1バイト前のデータ、左2バイト前のデータおよ
び左3バイト前データが、それぞれのレジスタに保持さ
れることになる。
The first left data register 104b stores the data immediately before the data to be compressed in the second left data register 10b.
4c holds data two data before the data to be compressed, and the third left data register 104d holds data three data before the data to be compressed. The relationship between these data is shown in FIG.
It becomes as shown in. That is, in the figure, the data immediately above the data to be compressed (byte) indicated by diagonal lines, the data one byte before the left, the data two bytes before the left, and the data three bytes before the left are stored in the respective registers. Will be retained.

【0027】図1に戻り、第1比較部105aは、圧縮
対象データレジスタ101に保持されている圧縮対象デ
ータと上データレジスタ104aに保持されている上デ
ータとを比較し、一致していると判断した場合には、一
致カウンタ106に保持されているカウンタ値を変化さ
せる。第2比較部105b〜第4比較部105dも同様
に、圧縮対象データレジスタ101に保持されている圧
縮対象データと第1左レジスタ104b〜第3左レジス
タ104dが保持しているデータとをそれぞれ比較し、
一致していると判断した場合には、一致カウンタ106
に保持されているカウンタ値を変化させる。第1比較部
105a〜第4比較部105dは、所定の条件の下、圧
縮対象データを符号出力部109に送出する。一致カウ
ンタ106は、第1比較部105a〜第4比較部105
dのいずれが一致していると判断した回数をカウンタ値
として保持するものである。
Returning to FIG. 1, the first comparing unit 105a compares the data to be compressed held in the data register to be compressed 101 with the upper data held in the upper data register 104a, and determines that they match. If it is determined, the counter value held in the coincidence counter 106 is changed. Similarly, the second comparison unit 105b to the fourth comparison unit 105d respectively compare the compression target data held in the compression target data register 101 with the data held in the first left register 104b to the third left register 104d. And
If it is determined that they match, the match counter 106
To change the counter value held in. The first comparing section 105a to the fourth comparing section 105d send the data to be compressed to the code output section 109 under predetermined conditions. The match counter 106 includes a first comparison unit 105 a to a fourth comparison unit 105.
The number of times that any one of d is determined to be the same is held as a counter value.

【0028】第5比較部105eは、圧縮対象データレ
ジスタ101に保持されている圧縮対象データと、不一
致バッファ107に保持された、不一致バッファ用アド
レスポインタ108で示されるデータとを比較する。第
5比較部105eは、この比較により一致していると判
断した場合には、一致しているとされた当該データを符
号出力部109に出力する。一方、一致していないと判
断した場合には、一致していないとされた当該データ
を、不一致バッファ107に送出する。
The fifth comparing section 105e compares the compression target data held in the compression target data register 101 with the data indicated by the mismatch buffer address pointer 108 held in the mismatch buffer 107. If the fifth comparing unit 105e determines that the data match, the fifth comparing unit 105e outputs the matched data to the code output unit 109. On the other hand, if it is determined that they do not match, the data that is determined not to match is sent to the mismatch buffer 107.

【0029】不一致バッファ107は、不一致バッファ
用アドレスポインタ108に保持されたポインタ値で示
されるアドレスに従って不一致データを保持する。この
不一致バッファ107は、例えば、16バイト分のデー
タを保持することができるシリンダバッファである。ハ
ーフトーンを表現する画像データは、通常、16種類程
度のデータ(バイト)によって表現できる。従って、不
一致バッファ107は、16バイト程度のバッファ量で
十分であるが、特にこれに限定するものではない。不一
致バッファ用アドレスポインタ108は、不一致バッフ
ァ107内の最新のアドレスを指示するポインタ値を保
持する。
The mismatch buffer 107 holds the mismatch data according to the address indicated by the pointer value held in the mismatch buffer address pointer 108. The mismatch buffer 107 is a cylinder buffer that can hold, for example, 16 bytes of data. Image data expressing a halftone can usually be expressed by about 16 types of data (bytes). Therefore, a buffer amount of about 16 bytes is sufficient for the mismatch buffer 107, but the present invention is not particularly limited to this. The mismatch buffer address pointer 108 holds a pointer value indicating the latest address in the mismatch buffer 107.

【0030】符号出力部109は、第1比較部105a
〜第4比較部105dのいずれかから送出されるデータ
と一致カウンタ106に保持されているカウンタ値に基
づいて、または第5比較部105eから送出されるデー
タに基づいて、符号データを生成し、出力する。
The code output section 109 is provided with a first comparing section 105a.
To generate code data based on the data transmitted from any one of the fourth to fifth comparison units 105d and the counter value held in the coincidence counter 106, or based on the data transmitted from the fifth comparison unit 105e, Output.

【0031】符号データは、図3(a)に示すように、
コマンドと一致繰り返し数NUMとの組み合わせ、また
はコマンドと不一致バッファ用ポインタ108のポイン
タ値との組み合わせあるいはコマンドと実データとの組
み合わせで表現される。コマンドおよび一致繰り返し数
は可変長のビットデータで表現され、ポインタ値は4ビ
ットの固定長のピットデータ、実データは8ビットの固
定長のピットデータで表現される。
The code data is, as shown in FIG.
It is expressed by a combination of a command and a matching repetition number NUM, a combination of a command and a pointer value of the mismatch buffer pointer 108, or a combination of a command and actual data. The command and the number of matching repetitions are represented by variable-length bit data, the pointer value is represented by 4-bit fixed-length pit data, and the actual data is represented by 8-bit fixed-length pit data.

【0032】なお、符号データはLSBから順番に出力
される。本実施形態では、符号データをLSBからMS
Bの方向に読むことにする。
The code data is output in order from the LSB. In the present embodiment, the code data is converted from LSB to MS
I will read in the direction of B.

【0033】図3(b)は、一致繰り返し数NUMの値
を示す図である。繰り返し数8回以上の場合のNUM値
は、0111(2進)の後に7ビットの数を続ける。た
だし、127(10進)以外の値で終了する。一致がそ
めラスターの最後まで続いた場合には、同図(c)に示
すように、 0000000+0111 とする。
FIG. 3B is a diagram showing the value of the number of coincidence repetitions NUM. When the number of repetitions is 8 or more, the NUM value is 0111 (binary) followed by a 7-bit number. However, it ends with a value other than 127 (decimal). If the coincidence continues to the end of the same raster, it is set to 000000 + 0111 as shown in FIG.

【0034】次に、上記のように構成された各ブロック
の動作によるデータ圧縮処理を説明する。
Next, the data compression processing by the operation of each block configured as described above will be described.

【0035】図4〜図6は、本実施形態に係るデータ圧
縮装置の動作処理を説明するための図である。図4に示
すように、まず最初に、圧縮対象データレジスタ101
およびその他のレジスタ104a〜104d、ラインバ
ッファ102、不一致バッファ107並びに各アドレス
ポインタ103,108に対して初期化が行われる(S
TEP401)。次に、圧縮対象データレジスタ101
に圧縮対象データがセットされ(STEP402)、第
1比較部105aによって圧縮対象データと上データと
が一致するか否かが判断される(STEP403)。S
TEP403において、一致していると判断される場合
には、端子A1〜端子A2の処理に移行する。この端子
A1〜端子A2の処理については後述する。
FIGS. 4 to 6 are diagrams for explaining the operation processing of the data compression device according to the present embodiment. As shown in FIG. 4, first, the compression target data register 101
And the other registers 104a to 104d, the line buffer 102, the mismatch buffer 107, and the address pointers 103 and 108 are initialized (S
TEP401). Next, the compression target data register 101
Is set in STEP 402 (STEP 402), and the first comparing unit 105a determines whether the data to be compressed matches the upper data (STEP 403). S
In TEP403, when it is determined that they match, the processing shifts to the processing of the terminals A1 and A2. The processing of the terminals A1 and A2 will be described later.

【0036】STEP403において、一致していない
と判断される場合には、第2比較部105bによって圧
縮対象データと1バイト前データとが一致するか否かが
判断され(STEP404)、一致していると判断され
る場合には、端子A1〜端子A2の処理に移行する。以
後同様に、一致していないと判断される場合には、第3
比較部105cによって圧縮対象データと2バイト前デ
ータとが一致するか否かが判断され(STEP40
5)、次に、第4比較部105dによって圧縮対象デー
タと3バイト前データとが一致するか否かが判断される
(STEP406)。
If it is determined in STEP 403 that they do not match, the second comparing unit 105b determines whether or not the data to be compressed matches the data one byte before (STEP 404). When it is determined that the terminal A1 and the terminal A2 have been determined, Similarly, if it is determined that they do not match, the third
The comparing unit 105c determines whether the data to be compressed matches the data two bytes before (STEP 40).
5) Next, the fourth comparing unit 105d determines whether the data to be compressed matches the data three bytes before (STEP 406).

【0037】STEP406において、一致していない
と判断される場合には、第5比較部105eによって圧
縮対象データと不一致バッファ107内のデータとが一
致するか否かが判断される(図5のSTEP407)。
If it is determined in STEP 406 that they do not match, the fifth comparing unit 105e determines whether or not the data to be compressed matches the data in the mismatch buffer 107 (STEP 407 in FIG. 5). ).

【0038】ここで、図6に示される端子A1〜端子A
2の処理について説明する。同図において、まず、一致
カウンタ106のカウンタ値をカウントアップし(ST
EP601)、ラインバッファ102および各レジスタ
104a〜104dを更新する(STEP602)。次
に、圧縮対象データが1ライン(ラスタ)の最後のデー
タであるか否かが判断され(STEP603)、1ライ
ンの最後のデータでないと判断される場合には、次の圧
縮対象データをセットする(STEP604)。次に、
圧縮対象データと一致すると判断したレジスタに保持さ
れたデータ(図中「X」と表示)とがさらに一致するか
否かが判断され(STEP605)、一致していると判
断される場合には、STEP601の処理に戻る。つま
り、図4のSTEP403において上データと一致して
いるとしてSTEP601に移行してきた場合には、圧
縮対象データと上データとが一致しているか否かが判断
され、STEP404において1バイト前のデータと一
致しているとしてSTEP601に移行してきた場合に
は、圧縮対象データと1バイト前のデータとが一致して
いるか否かが判断される。STEP405、STEP4
06から移行してきた場合も同様である。
Here, terminals A1 to A shown in FIG.
The process 2 will be described. In the figure, first, the counter value of the coincidence counter 106 is counted up (ST
(EP601), the line buffer 102 and the registers 104a to 104d are updated (STEP602). Next, it is determined whether the data to be compressed is the last data of one line (raster) (STEP 603). If it is determined that the data is not the last data of one line, the next data to be compressed is set. (Step 604). next,
It is determined whether or not the data (shown as “X” in the figure) held in the register that has been determined to match the data to be compressed further matches (STEP 605). It returns to the process of STEP601. That is, if the process proceeds to STEP 601 assuming that the data matches the upper data in STEP 403 of FIG. 4, it is determined whether or not the data to be compressed matches the upper data. If the process proceeds to STEP 601 assuming that they match, it is determined whether or not the data to be compressed matches the data one byte before. STEP405, STEP4
The same applies to the case where the process has shifted from 06.

【0039】一方、STEP605において、一致して
いないと判断される場合には、符号出力部109は、そ
の時点の一致カウンタ106で示される繰り返し回数に
従ったNUM値とコマンドとからなる符号データを出力
する。
On the other hand, if it is determined in STEP 605 that they do not match, the code output unit 109 outputs the code data consisting of the NUM value and the command according to the number of repetitions indicated by the match counter 106 at that time. Output.

【0040】また、STEP603において1ラインの
最後のデータであると判断された場合には、符号出力部
109は、1ラインの最後まで一致を示すビットデー
タ、 0000000+0111 を出力する(STEP607)。
If it is determined in STEP 603 that the data is the last data of one line, the code output unit 109 outputs 00000000 + 0111 bit data indicating a match up to the end of one line (STEP 607).

【0041】図5に戻り、STEP407において不一
致バッファ107と一致していると判断される場合に
は、ラインバッファ102および各レジスタ104a〜
104dを更新し、(STEP408)、符号出力部1
09は不一致バッファ用アドレスポインタ108に保持
されたポインタ値とコマンド“00”とからなる符号デ
ータを出力する(STEP409)。一方、STEP4
07において一致していないと判断される場合には、符
号出力部10.9は一致しないとされたそのときの圧縮
対象データとコマンド“10”とからなる符号データを
出力し(STEP410)、ラインバッファ102、各
左データレジスタ104b〜104dおよび不一致バッ
ファ107を更新する(STEP411)。
Returning to FIG. 5, when it is determined in STEP 407 that the data matches the mismatch buffer 107, the line buffer 102 and the registers 104a to 104a are output.
104d is updated (STEP 408), and the code output unit 1
09 outputs code data consisting of the pointer value held in the mismatch buffer address pointer 108 and the command “00” (STEP 409). On the other hand, STEP4
If it is determined in step 07 that the codes do not match, the code output unit 10.9 outputs code data including the data to be compressed and the command “10” at the time when the codes do not match (STEP 410). The buffer 102, the left data registers 104b to 104d, and the mismatch buffer 107 are updated (STEP 411).

【0042】次に、圧縮対象データが1ラインの最後の
データであるか否かが判断され(STEP412)、1
ラインの最後のデータであると判断された場合には、各
レジスタ104a〜104dを初期化する(STEP4
13)。
Next, it is determined whether or not the data to be compressed is the last data of one line (STEP 412).
When it is determined that the data is the last data of the line, each of the registers 104a to 104d is initialized (STEP 4).
13).

【0043】最後に、全ての圧縮対象データを圧縮した
か否かが判断され(STEP414)、まだ、圧縮対象
としていないデータがある場合には、STEP402に
戻り、以上の処理を繰り返す。
Finally, it is determined whether or not all the data to be compressed has been compressed (STEP 414). If there is data not yet to be compressed, the process returns to STEP 402 and repeats the above processing.

【0044】なお、上記データ圧縮処理を、シーケンシ
ャルに構成したが、特にこれにこだわるものではない。
すなわち、処理の動作に矛盾が生じない限り、処理の順
番を入れ替えまたは並行的に処理されるように構成して
もよい。
Although the data compression process is configured sequentially, the present invention is not limited to this.
That is, as long as there is no inconsistency in the operation of the processing, the order of the processing may be changed or the processing may be performed in parallel.

【0045】次に、本実施形態に係るデータ圧縮部によ
るデータ圧縮例を説明する。今、図7(a)に示すよう
な、データ群があったとする。すなわち、同図(a)に
おいて、1ライン目の左隅が先頭データとし、圧縮処理
は、そこから右方向に順番に圧縮処理の対象としてみて
いき、そのラインの右端まで到達した場合は、次のライ
ンの先頭に移行する。
Next, an example of data compression by the data compression section according to the present embodiment will be described. Now, it is assumed that there is a data group as shown in FIG. That is, in FIG. 11A, the left corner of the first line is the leading data, and the compression process is sequentially performed in the rightward direction as a target of the compression process. When the compression process reaches the right end of the line, the next process is performed. Move to the beginning of the line.

【0046】:圧縮対象データレジスタ101に左上
隅の“0”がセットされ、上データとの比較が行われ
る。この場合、上データレジスタ104aには、“0”
が保持されているため、上データとの一致繰り返し数が
カウントされる。圧縮対象データレジスタ101に左か
ら5番目の“A”がセットされ、上データとの比較が行
われることで、不一致であると判断され、それまでの繰
り返し回数“4”に対応するNUM値“1011”と上
データとの一致を示すコマンド“01”とからなる符号
データが出力される。
"0" at the upper left corner is set in the compression target data register 101, and comparison with the upper data is performed. In this case, “0” is stored in the upper data register 104a.
Is held, the number of times of repetition that matches the upper data is counted. The fifth "A" from the left is set in the compression target data register 101 and compared with the upper data, it is determined that they do not match, and the NUM value "" corresponding to the number of repetitions "4" up to that time is determined. Code data consisting of a command "011" indicating the match between the data 1011 "and the upper data is output.

【0047】:上記の処理が終了した時点で圧縮対
象データレジスタ101にセットされている“A”は、
いずれのレジスタ104a〜104dに対しても一致せ
ず、不一致バッファ107内のデータとも一致しないた
め、“A”および不一致であることを示すコマンド“1
0”を符号データとして出力する。また、この場合、不
一致バッファ107に“A”が保持されることになる
(同図(c))。
When the above processing is completed, “A” set in the compression target data register 101 is
Since there is no match for any of the registers 104a to 104d and no match for the data in the mismatch buffer 107, "A" and the command "1" indicating the mismatch
"0" is output as the code data, and in this case, "A" is held in the non-coincidence buffer 107 (FIG. 3 (c)).

【0048】:圧縮対象データレジスタ101が更新
され、6番目の“A”がセットされると、この“A”は
1つ前のデータと一致していると判断され、1つ前のデ
ータとの一致繰り返し回数がカウントされる。従って、
一致繰り返し回数“4”に対応するNUM値“101
1”と1つ前のデータとの一致を示すコマンド“01
1”からなる符号データが出力される。
When the compression target data register 101 is updated and the sixth “A” is set, it is determined that the “A” matches the immediately preceding data, and Are counted. Therefore,
NUM value “101” corresponding to the number of matching repetitions “4”
Command “01” indicating the match between “1” and the immediately preceding data
1 "is output.

【0049】および:圧縮対象データレジスタ10
1が更新され、“B”,“C”がセットされた場合も、
上記のときと同様に、符号化処理が行われる。
And: compression target data register 10
When 1 is updated and “B” and “C” are set,
An encoding process is performed as in the above case.

【0050】:圧縮対象データレジスタ101がさら
に更新され、“C”の右に位置する“A”がセットさ
れたとする。この“A”は3つ前のデータと一致してい
ると判断されるため、3つ前のデータとの一致繰り返し
回数がカウントされる。従って、3つ前のデータとの一
致繰り返し回数は“5”であり、それに対応するNUM
値“01111”とコマンド“1111”とからなる符
号データが出力される。
Assume that the compression target data register 101 is further updated and "A" located to the right of "C" is set. Since this “A” is determined to be coincident with the data three before, the number of times of repetition of the coincidence with the data three before is counted. Therefore, the number of times of repetition of matching with the data three data before is “5”, and the corresponding NUM
Code data including the value “01111” and the command “1111” is output.

【0051】:右端の“D”がセットされた場合も、
上記,およびのときと同様に、符号化処理が行わ
れる。
When the rightmost “D” is set,
An encoding process is performed in the same manner as described above.

【0052】:圧縮対象データレジスタ101が更新
され、“B”がセットされたとする。この“B”は不一
致バッファ107のポインタ値“1:”で指示されるデ
ータとのみ一致する。従って、そのポインタ値“1:”
とコマンド“00”とからなる符号化データが出力され
る。
Assume that the compression target data register 101 is updated and "B" is set. This “B” matches only with the data indicated by the pointer value “1:” of the mismatch buffer 107. Therefore, the pointer value "1:"
And encoded data including the command “00”.

【0053】:上記の場合と同様である。: Same as above.

【0054】(10):上記の場合と同様である。(10): Same as above.

【0055】(11):上記の場合と同様である。(11): Same as above.

【0056】(12):上記(11)の符号化処理が終了した時
点で、圧縮対象データレジスタ101に“A”がセット
されている。“A”は1つ前のデータと一致していると
判断されるため、1つ前のデータとの一致繰り返し回数
がカウントされる。この場合、この繰り返しがラインの
最後まで続くため、ラインの最後まで一致することを示
す符号データ“0000000+0111”が出力され
る。
(12): At the time when the encoding process of (11) is completed, “A” is set in the compression target data register 101. Since “A” is determined to match the immediately preceding data, the number of repetitions of matching with the immediately preceding data is counted. In this case, since this repetition continues to the end of the line, code data “00000000 + 0111” indicating that the data matches the end of the line is output.

【0057】なお、本発明に係るデータ圧縮処理は、コ
ンピュータに所定の機能を実現させるプログラムにより
構成することができる。また、汎用のゲート、フリップ
フロップ回路、RAM等を組み合わせることで実現する
こともできる。
Note that the data compression processing according to the present invention can be constituted by a program that causes a computer to realize a predetermined function. Further, it can be realized by combining a general-purpose gate, a flip-flop circuit, a RAM, and the like.

【0058】以上のように、本実施形態によれば、2バ
イトまたはそれ以上のバイトごとにデータが繰り返され
るハーフトーンを表現したデータについて、効率よく圧
縮することができるようになる。
As described above, according to the present embodiment, it is possible to efficiently compress data expressing a halftone in which data is repeated every two bytes or more.

【0059】特に、本実施形態では、上データとの一致
をも判断し、これに応じた符号データを出力するので、
さまざまな種類のデータに対しても効率よく圧縮するこ
とができる。
In particular, in the present embodiment, it is determined whether the data matches the upper data, and code data is output in accordance with the determination.
Various types of data can be efficiently compressed.

【0060】また、本実施形態では、圧縮対象データと
これと所定の位置関係にあるデータとが一致しなかった
場合の不一致データを保持した不一致バッファとの一致
をも判断し、これに応じた符号データを出力するので、
限られた種類のデータが繰り返される傾向のあるハーフ
トーンに対してさらに効率的に圧縮することができるよ
うになる。
Further, in the present embodiment, when the data to be compressed does not match the data having a predetermined positional relationship with the data to be compressed, it is determined whether or not the data matches the mismatch buffer holding the mismatched data. Since it outputs sign data,
It becomes possible to more efficiently compress halftones in which limited types of data tend to be repeated.

【0061】[第2の実施形態]本実施形態は、データ
伸長処理を行う装置および方法に関するものである。本
実施形態に係るデータ伸長処理は、上述したデータ圧縮
処理によってすでに圧縮されている符号データを伸長
(復号、解凍と呼ばれることもある。)して復号データ
(元の画像データ)に変換する処理である。データ伸長
処理は、可変長のビットデータを、その先頭ビットから
順に処理する。
[Second Embodiment] The present embodiment relates to an apparatus and a method for performing data decompression processing. The data decompression process according to the present embodiment is a process of decompressing (sometimes called decoding and decompression) code data that has already been compressed by the above-described data compression process and converting it into decoded data (original image data). It is. The data decompression process processes variable-length bit data in order from the first bit.

【0062】図8は、本実施形態に係るデータ伸長装置
の構成を示す図である。同図において、伸長対象データ
レジスタ801は、外部から送出されるnビットの伸長
対象データを保持するシフトレジスタである。本実施形
態では、16ビットの伸長対象データを保持する。
FIG. 8 is a diagram showing the configuration of the data decompression device according to this embodiment. In the figure, a decompression target data register 801 is a shift register that holds n-bit decompression target data transmitted from the outside. In the present embodiment, 16-bit expansion target data is held.

【0063】コマンド取得部802は、伸長対象データ
レジスタ801に保持されている伸長対象データを解釈
して可変長ピットで表現されるコマンドを取得し、この
コマンドを復号出力部809に送出する。なお、図示し
ない制御部により、コマンド取得部802によって取得
されたコマンドに応じて、次に続くビットデータのビッ
ト長および送出先が決定され、決定された送出先にその
ビットデータが送出される。
The command acquisition unit 802 interprets the data to be decompressed held in the data register for decompression 801 to obtain a command represented by variable-length pits, and sends this command to the decoding output unit 809. The control unit (not shown) determines the bit length and transmission destination of the next bit data in accordance with the command acquired by the command acquisition unit 802, and transmits the bit data to the determined transmission destination.

【0064】一致繰り返し回数取得部803は、送出さ
れたビットデータを解釈して一致繰り返し回数を取得
し、これを復号出力部809に送出する。
The matching repetition number obtaining section 803 interprets the transmitted bit data to obtain the number of matching repetitions, and sends it to the decoding output section 809.

【0065】ラインバッファ804は、復号出力部80
9によって復号された復号データ(元の画像データ)
を、ラインバッファ用アドレスポインタ805に保持さ
れたポインタ値に示されるアドレスに従って、1ライン
分保持する。
The line buffer 804 includes the decoding output unit 80
9 (original image data)
Are held for one line in accordance with the address indicated by the pointer value held in the line buffer address pointer 805.

【0066】上データレジスタ806aは、ラインバッ
ファ804に保持された最新の復号データの次に位置す
る復号しようとするデータに対する上データを保持す
る。なお、復号しようとするデータが1ライン目に属す
る場合は、上データは“0”とする。
The upper data register 806a holds the upper data for the data to be decoded which is located next to the latest decoded data stored in the line buffer 804. If the data to be decoded belongs to the first line, the upper data is set to “0”.

【0067】また、第1左データレジスタ806bは復
号しようとするデータに対して1つ前のデータ、すなわ
ち、最新の復号データを、第2左データレジスタ806
cは復号しようとするデータの2つ前のデータを、第3
左データレジスタ806dは復号しようとするデータの
3つ前のデータを、それぞれ保持する。
The first left data register 806b stores the data immediately before the data to be decoded, that is, the latest decoded data, in the second left data register 806b.
c is the third data before the data to be decoded.
The left data register 806d holds data three data before the data to be decoded.

【0068】不一致バッファ807は、コマンド取得部
802によって不一致であることを示すコマンドが取得
された場合に、不一致バッファ用アドレスポインタ80
8に保持されたポインタ値に示されるアドレスに従っ
て、伸長対象データレジスタ801から送出される8ビ
ットのデータを保持する。
When the command acquisition unit 802 acquires a command indicating a mismatch, the mismatch buffer 807 stores the mismatch buffer address pointer 80.
In accordance with the address indicated by the pointer value held in 8, 8-bit data sent from the decompression target data register 801 is held.

【0069】復号出力部809は、生成した復号データ
を外部に送出するとともに、ラインバッファ804に送
出する。すなわち、復号出力部809は、コマンドが上
データとの一致、1つ前のデータとの一致、2つ前のデ
ータとの一致または3つ前のデータとの一致のうちのい
ずれかである場合には、レジスタ806a〜806dの
うちの対応するレジスタからデータを読み出して、一致
繰り返し回数分だけそのデータを出力する。また、コマ
ンドが1ラインの最後まで一致を示すものである場合に
は、復号出力部809は、直前に読み出したレジスタか
らデータを読み出して、1ラインの最後までの一致繰り
返し回数分だけそのデータを出力する。さらに、コマン
ドが不一致バッファとの一致であることを示すものであ
る場合には、復号出力部809は、コマンドに続く4ビ
ットのポインタ値で示されるアドレスに従って不一致バ
ッファ807から読み出されたデータを出力する。ま
た、コマンドが不一致であることを示すものである場合
には、復号出力部809は、伸長対象データレジスタ8
01からコマンドに続いて読み出された8ビットのデー
タを出力する。
The decoding output unit 809 sends the generated decoded data to the outside and also sends it to the line buffer 804. That is, the decoding output unit 809 determines whether the command is one of a match with the upper data, a match with the previous data, a match with the previous data, and a match with the previous data. , Data is read from the corresponding register among the registers 806a to 806d, and the data is output by the number of times of matching repetition. If the command indicates a match up to the end of one line, the decoding output unit 809 reads the data from the register read out immediately before and decodes the data by the number of matching repetitions up to the end of the line. Output. Further, when the command indicates a match with the mismatch buffer, the decoding output unit 809 outputs the data read from the mismatch buffer 807 in accordance with the address indicated by the 4-bit pointer value following the command. Output. If the command indicates that they do not match, the decryption output unit 809 outputs the data to the decompression target data register 8.
From 01, 8-bit data read following the command is output.

【0070】次に、上記のように構成された各ブロック
の動作によるデータ伸長処理を説明する。
Next, a data decompression process by the operation of each block configured as described above will be described.

【0071】図9〜図11は、本実施形態に係るデータ
伸長装置の動作処理を説明するための図である。同図9
に示すように、まず最初に、伸長対象データレジスタ8
01およびその他のレジスタ806a〜806d、ライ
ンバッファ804、不一致バッファ807並びに各アド
レスポインタ804,808に対して初期化が行われる
(STEP901)。次に、伸長対象データレジスタ8
01に伸長対象データがセットされ(STEP90
2)、コマンド取得部802は可変長ビットのコマンド
を取得するため、LSBから順にビット値を解釈する
(STEP903〜906)。これらSTEP903〜
906においてコマンドを取得した場合には、端子B1
以降の処理(図11のSTEP913〜917)に移行
する。
FIG. 9 to FIG. 11 are diagrams for explaining the operation processing of the data decompression device according to the present embodiment. FIG. 9
First, as shown in FIG.
01 and other registers 806a to 806d, line buffer 804, mismatch buffer 807, and address pointers 804 and 808 are initialized (STEP 901). Next, the decompression target data register 8
01 is set to the data to be decompressed (STEP 90).
2) In order to acquire a variable-length bit command, the command acquisition unit 802 interprets bit values in order from the LSB (STEPs 903 to 906). These STEP903-
When the command is obtained in 906, the terminal B1
The processing shifts to the subsequent processing (STEPs 913 to 917 in FIG. 11).

【0072】すなわち、STEP903〜906におい
ていずれかのコマンドを取得した場合には、一致繰り返
し回数取得部803は、その一致が1ラインの最後まで
続くか否かを判断し(STEP913)、1ラインの最
後までの一致でないと判断される場合には、コマンドに
続くビットデータを順に解釈して一致繰り返し数を取得
する(STEP914)。一方、1ラインの最後までの
一致であると判断した場合には、ラインバッファ用アド
レスポインタ805の現在のポインタ値から1ラインの
最後までの一致繰り返し回数を取得する(STEP91
5)。復号出力部809は、一致繰り返し回数が取得さ
れた後、一致場所に対応するレジスタ806a〜806
dの中の一致場所に対応するレジスタからデータを読み
出し、一致繰り返し回数分だけ出力し(STEP91
6)、その出力結果に応じてラインバッファ804およ
び各レジスタ806a〜806dを更新する〈STEP
917)。
That is, when any of the commands is acquired in STEPs 903 to 906, the matching repetition number acquiring unit 803 determines whether or not the matching continues to the end of one line (STEP 913). If it is determined that the match does not reach the end, the bit data following the command is interpreted in order to obtain the number of matching repetitions (STEP 914). On the other hand, if it is determined that the match has reached the end of one line, the number of matching repetitions until the end of one line is obtained from the current pointer value of the line buffer address pointer 805 (STEP 91).
5). After the number of matching repetitions is obtained, the decoding output unit 809 sets the registers 806a to 806 corresponding to the matching location.
d, the data is read from the register corresponding to the matching location, and output for the number of matching repetitions (STEP 91).
6) Update the line buffer 804 and the registers 806a to 806d according to the output result <STEP>
917).

【0073】一方、STEP903〜906においてい
ずれのコマンドも取得しなかった場合には、コマンド取
得部802は、不一致バッファとの一致を示すコマンド
であるか否かを判断する(STEP907)。不一致バ
ッファとの一致を示すコマンドを取得した場合には、次
に続く4ビットデータで表現されるポインタ値を取得す
る(STEP908)。復号出力部809は、このポイ
ンタ値で示されるアドレスに従って不一致バッファ80
7からデータを読み出して、これを出力し(STEP9
09)、ラインバッファ804およびラインバッファ用
アドレスポインタ805並びに各レジスタ806a〜8
06dを更新する(STEP910)。
On the other hand, if none of the commands is obtained in STEPs 903 to 906, the command obtaining unit 802 determines whether or not the command indicates a match with the mismatch buffer (STEP 907). When a command indicating a match with the mismatch buffer is obtained, a pointer value represented by the following 4-bit data is obtained (STEP 908). The decoding output unit 809 outputs the mismatch buffer 80 according to the address indicated by the pointer value.
7 is read out and outputted (STEP 9).
09), the line buffer 804, the line buffer address pointer 805, and the registers 806a to 806.
06d is updated (STEP 910).

【0074】STEP907において、不一致バッファ
との一致を示すコマンドでないと判断した場合、すなわ
ち、不一致データであることを示すコマンドを取得した
場合には、復号出力部809は、そのコマンドに続く8
ビットのデータを出力する(STEP911)。その
後、ラインバッファ804およびラインバッファ用アド
レスポインタ805、各レジスタ806a〜806dを
更新する。また、このときの8ビットデータは不一致バ
ッファ807に送出され、不一致バッファ807および
不一致バッファ用アドレスポインタ808を更新する
(STEP910)。
If it is determined in STEP 907 that the command is not a command indicating a match with the mismatched buffer, that is, if a command indicating mismatched data is obtained, the decoding output unit 809 sets the following 8
The bit data is output (STEP 911). Thereafter, the line buffer 804, the line buffer address pointer 805, and the registers 806a to 806d are updated. The 8-bit data at this time is sent to the mismatch buffer 807, and the mismatch buffer 807 and the mismatch buffer address pointer 808 are updated (STEP 910).

【0075】以上の処理は、全てのデータが伸長される
まで繰り返される(STEP918)。
The above processing is repeated until all data is decompressed (STEP 918).

【0076】なお、上記データ伸長処理を、シーケンシ
ャルに構成したが、特にこれにこだわるものではない。
すなわち、処理の動作に矛盾が生じない限り、処理の順
番を入れ替えまたは並行的に処理されるように構成して
もよい。
Although the data decompression process is configured sequentially, the present invention is not limited to this.
That is, as long as there is no inconsistency in the operation of the processing, the order of the processing may be changed or the processing may be performed in parallel.

【0077】本発明に係るデータ伸長処理は、コンピュ
ータに所定の機能を実現させるプログラムにより構成す
ることができる。また、汎用のゲート、フリップフロッ
プ回路、RAM等を組み合わせることで実現することも
できる。
The data decompression process according to the present invention can be constituted by a program that causes a computer to realize a predetermined function. Further, it can be realized by combining a general-purpose gate, a flip-flop circuit, a RAM, and the like.

【0078】[第3の実施形態]次に、データ伸長処理
について、他の実施形態を説明する。
[Third Embodiment] Next, another embodiment of the data decompression process will be described.

【0079】図12は、本実施形態に係るデータ伸長装
置のブロック図である。入力FIFO1201は、16
ビット×4Wordのデータを保持する。フェッチユニ
ット1202は、シフト制御部1203のビットシフト
制御に基づき、所定のタイミングで入力FIFO120
1に保持された32ビットの伸長対象データを次段のブ
ロックに送出する。
FIG. 12 is a block diagram of a data decompression device according to this embodiment. The input FIFO 1201 has 16
Bit × 4 Word data is held. The fetch unit 1202 receives the input FIFO 120 at a predetermined timing based on the bit shift control of the shift control unit 1203.
The 32-bit expansion target data held in 1 is transmitted to the next block.

【0080】コマンドデコード1204は、伸長対象デ
ータに含まれる可変長ビットのコマンドをデコード(抽
出)する。コマンドデコード1204は、抽出したコマ
ンドを図示しない制御部に送出するとともに、当該コマ
ンドのビット数をシフト制御部1203に送出する。N
UMデコード1205は、可変長ビットのNUM値を抽
出して図示しない制御部に送出するとともに、そのビッ
ト数をシフト制御部1203に送出する。NUM8デコ
ード1206は、繰り返し回数が8以上の場合のデコー
ドである。
The command decode 1204 decodes (extracts) a command of variable length bits included in the data to be decompressed. The command decode 1204 sends the extracted command to a control unit (not shown), and sends the number of bits of the command to the shift control unit 1203. N
The UM decoder 1205 extracts the NUM value of the variable-length bit and sends it to the control unit (not shown), and sends the number of bits to the shift control unit 1203. NUM8 decoding 1206 is decoding when the number of repetitions is 8 or more.

【0081】不一致バッファポインタ1207は、不一
致バッファ1208のアドレスポインタを保持し、不一
致バッファ1208は、このアドレスポインタに従って
データをデータ復元部1210に送出する。完全不一致
データ1209は、伸長対象データの8ビットで構成さ
れる生データをデータ復元部1210に送出する。
The mismatch buffer pointer 1207 holds the address pointer of the mismatch buffer 1208, and the mismatch buffer 1208 sends data to the data restoration unit 1210 according to the address pointer. The completely mismatched data 1209 sends raw data composed of 8 bits of the data to be decompressed to the data restoration unit 1210.

【0082】出力FIFOは復元されたデータを保持
し、所定のタイミングで8ビットデータごとに読み出さ
れる。出力FIFOに書込まれたデータはラインバッフ
ァ1212にも出力される。
The output FIFO holds the restored data, and is read at a predetermined timing for each 8-bit data. The data written in the output FIFO is also output to the line buffer 1212.

【0083】ラインバッファ1212は、復元(伸長)
されたデータを少なくとも1ライン以上保持する。ライ
ンバッファリード部1213は、図示しない制御部によ
って指定されたラインバッファ1212のアドレスから
データを読み出し、データ復元部1210に送出する。
The line buffer 1212 restores (decompresses)
The obtained data is held at least one line. The line buffer read unit 1213 reads data from the address of the line buffer 1212 specified by the control unit (not shown) and sends the data to the data restoration unit 1210.

【0084】アドレスカウンタ1214は、どのアドレ
スを伸長しているかを示すためのカウンタであり、トー
タルカウンタ1215は伸長したデータ量を示すための
カウンタである。これらは伸長対象データが伸長される
ごとに、図示しない制御部によってカウントアップされ
る。
The address counter 1214 is a counter for indicating which address is expanded, and the total counter 1215 is a counter for indicating the expanded data amount. These are counted up by a control unit (not shown) every time the expansion target data is expanded.

【0085】図13は、図12に示した各ブロックの動
作を説明するための状態遷移図である。上記各ブロック
は、この状態遷移図に従い、図示しない制御部の制御の
下、動作する。以下、各状態について説明する。
FIG. 13 is a state transition diagram for explaining the operation of each block shown in FIG. Each of the above blocks operates under the control of a control unit (not shown) according to the state transition diagram. Hereinafter, each state will be described.

【0086】STATE1(IDLE):待機中。STATE1 (IDLE): Waiting.

【0087】STATE2(コマンドデコード):圧縮
コードの先頭のコマンドの解析中。
STATE 2 (command decode): The command at the head of the compressed code is being analyzed.

【0088】STATE3(NUM17):NUMフィ
ールドの抽出中。
STATE3 (NUM17): NUM field is being extracted.

【0089】STATE4(NUM80):NUMフィ
ールドの抽出中。NUMが8のときの処理で最初のフィ
ールドの処理。
STATE 4 (NUM 80): NUM field is being extracted. Processing of the first field in processing when NUM is 8.

【0090】STATE5(NUM81):NUMフィ
ールドの抽出中。NUMが8のときの処理で2回目以後
のフィールドの処理。最初のフィールドの処理では、ラ
スタ最後まで繰り返しというコードがあるため、状態を
2つに分けている。NUM81ではラスタ最後まで繰り
返しというコードは無視する。
STATE 5 (NUM 81): NUM field is being extracted. Processing of the second and subsequent fields in the processing when NUM is 8. In the processing of the first field, there is a code that repeats until the end of the raster, so the state is divided into two. The NUM 81 ignores a code that repeats until the end of the raster.

【0091】STATE6(不一致バッファポイン
タ):不一致バッファのポインタを抽出中。
STATE 6 (mismatch buffer pointer): The pointer of the mismatch buffer is being extracted.

【0092】STATE7(完全不一致):完全不一致
でのデータの抽出中。
STATE 7 (completely mismatched): Data is being extracted for complete mismatch.

【0093】STATE8(不一致バッファリード):
不一致バッファからデータをリードする。
STATE 8 (unmatched buffer read):
Read data from mismatched buffer.

【0094】STATE9(不一致バッファライト):
不一致バッファへデータをライトする。
STATE 9 (mismatch buffer write):
Write data to the mismatch buffer.

【0095】STATE10(リストア0):データの
復元中。この状態の後はSTATE2に戻る。
STATE10 (Restore 0): Data is being restored. After this state, the process returns to STATE2.

【0096】STATE11(リストア1):データの
復元中。NUMが127以上のときは、この状態にデー
タを復元する。つまり、引き続きデータあるため、この
状態の後はSTATE5で後の繰り返し数を抽出する。
STATE 11 (Restore 1): Data is being restored. When NUM is 127 or more, data is restored to this state. That is, since there is still data, after this state, the subsequent repetition number is extracted in STATE5.

【0097】STATE12(リストア2):データの
復元中。このステートの後はSTATE2に戻る。
STATE12 (Restore 2): Data is being restored. After this state, the process returns to STATE2.

【0098】以上のように、本実施形態によれば、圧縮
されたデータ(伸長対象データ)を所定の制御の下、復
元することができるようになる。
As described above, according to this embodiment, compressed data (data to be decompressed) can be restored under predetermined control.

【0099】[0099]

【発明の効果】以上のように、本発明によれば、2バイ
トまたはそれ以上のバイトごとにデータが繰り返される
ハーフトーンを表現したデータについて、効率よく圧縮
することができるようになる。
As described above, according to the present invention, it is possible to efficiently compress data expressing a halftone in which data is repeated every two bytes or more.

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

【図1】本発明に係るデータ圧縮装置の構成を示す図FIG. 1 is a diagram showing a configuration of a data compression device according to the present invention.

【図2】データの位置関係を説明するための図FIG. 2 is a diagram for explaining a positional relationship of data;

【図3】符号データを構成するビットデータの一例を示
す図
FIG. 3 is a diagram showing an example of bit data constituting code data.

【図4】本発明に係るデータ圧縮装置の動作処理を説明
するための図
FIG. 4 is a diagram for explaining an operation process of the data compression device according to the present invention.

【図5】本発明に係るデータ圧縮装置の動作処理を説明
するための図
FIG. 5 is a diagram for explaining an operation process of the data compression device according to the present invention.

【図6】本発明に係るデータ圧縮装置の動作処理を説明
するための図
FIG. 6 is a diagram for explaining an operation process of the data compression device according to the present invention.

【図7】本発明に係るデータ圧縮装置によるデータ圧縮
例を説明するための図
FIG. 7 is a diagram for explaining an example of data compression by the data compression device according to the present invention.

【図8】本発明に係るデータ伸長装置の構成を示す図FIG. 8 is a diagram showing a configuration of a data decompression device according to the present invention.

【図9】本発明に係るデータ伸長装置の動作処理を説明
するための図
FIG. 9 is a diagram for explaining an operation process of the data decompression device according to the present invention.

【図10】本発明に係るデータ伸長装置の動作処理を説
明するための図
FIG. 10 is a diagram for explaining an operation process of the data decompression device according to the present invention.

【図11】本発明に係るデータ伸長装置の動作処理を説
明するための図
FIG. 11 is a diagram for explaining an operation process of the data decompression device according to the present invention.

【図12】本発明に係るデータ伸長装置の他の構成を示
す図
FIG. 12 is a diagram showing another configuration of the data decompression device according to the present invention.

【図13】図12に示すデータ伸長装置の状態遷移を示
す図
13 is a diagram showing a state transition of the data decompression device shown in FIG.

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

101…圧縮対象データレジスタ 102…ラインバッファ 103,108…アドレスポインタ 104a〜104d…レジスタ 105a〜105e…比較部 106…一致カウンタ 107…不一致バッファ 109…符号出力部 101: Data register to be compressed 102: Line buffers 103, 108: Address pointers 104a to 104d: Registers 105a to 105e: Comparison unit 106: Match counter 107: Non-match buffer 109: Code output unit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 丸山 三千男 長野県諏訪市大和3丁目3番5号 セイコ ーエプソン株式会社内 Fターム(参考) 5C059 KK00 MA00 MA45 ME01 PP01 UA02 UA05 5C078 AA04 BA21 CA01 DA01 DA02 ────────────────────────────────────────────────── ─── Continuing on the front page (72) Inventor Michio Maruyama 3-3-5 Yamato, Suwa-shi, Nagano F-term in Seiko Epson Corporation (reference) 5C059 KK00 MA00 MA45 ME01 PP01 UA02 UA05 5C078 AA04 BA21 CA01 DA01 DA02

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】画像を構成する画像データの中から1ライ
ン方向に1データずつ処理対象データとして特定し、処
理対象データと所定の位置関係にあるデータとが一致す
るか否かを判断し、一致すると判断した場合には、当該
一致が繰り返される回数を求めて、当該一致したデータ
の位置関係を示すビットデータおよび当該回数に応じて
定められたビットデータからなる符号データを出力する
データ圧縮方法であって、前記所定の位置関係にあるデ
ータが、少なくとも前記処理対象データに対して1デー
タ前のデータおよび2データ以上の所定数データ前のデ
ータであることを特徴とするデータ圧縮方法。
An image processing method comprising: identifying data to be processed one by one in a line direction from image data constituting an image; determining whether the data to be processed matches data having a predetermined positional relationship; If it is determined that they match, a data compression method for obtaining the number of times the matching is repeated and outputting code data composed of bit data indicating the positional relationship of the matching data and bit data determined according to the number of times The data compression method, wherein the data having the predetermined positional relationship is at least one data before the processing target data and two or more data before a predetermined number of data.
【請求項2】画像を構成する画像データ中の処理対象デ
ータを1データずつ1ライン方向に走査しながら符号デ
ータを出力するデータ圧縮方法であって、 前記処理対象データと前記処理対象データに対して1デ
ータ前のデータとが一致する場合に、当該1データ前の
データと一致が繰り返される回数を求め、1データ前の
データとの一致を示すビットデータおよび当該回数に応
じて定められたビットデータからなる符号データを出力
し、前記1データ前のデータと一致せず、前記処理対象
データと前記処理対象データに対して2データ以上の所
定数データ前のデータとが一致する場合に、当該所定数
データ前のデータと一致が繰り返される回数を求め、所
定数データ前のデータとの一致を示すビットデータおよ
び当該回数に応じて定められたビットデータからなる符
号データを出力することを特徴とするデータ圧縮方法。
2. A data compression method for outputting code data while scanning data to be processed in image data constituting an image one line at a time in one line direction, wherein the data to be processed and the data to be processed are When the data coincides with the immediately preceding data, the number of times the coincidence with the immediately preceding data is repeated is determined, and bit data indicating the coincidence with the immediately preceding data and a bit determined according to the number of times are determined. If the code data consisting of data is output and the data to be processed does not match the data before one data, and the data to be processed and the data to be processed match the data two or more data before the predetermined number of data, The number of times the match with the data before the predetermined number of data is repeated is obtained, and the bit data indicating the match with the data before the predetermined number of data and the number of times determined according to the number of times are determined. A data compression method characterized by outputting code data composed of bit data.
【請求項3】前記データ圧縮方法は、前記処理対象デー
タと前記処理対象データに対して上に位置するデータと
が一致する場合に、当該上に位置するデータと一致が繰
り返される回数を求め、上に位置するデータとの一致を
示すビットデータおよび当該回数に応じて定められたビ
ットデータからなる符号データを出力することを特徴と
する請求項2記載のデータ圧縮方法。
3. The data compression method according to claim 1, wherein when the data to be processed coincides with data positioned above the data to be processed, a number of times of repetition of matching with the data positioned above is determined. 3. The data compression method according to claim 2, wherein code data including bit data indicating a match with the data located above and bit data determined according to the number of times is output.
【請求項4】画像を構成する画像データの中から1ライ
ン方向に1データずつ処理対象データを走査して符号デ
ータを出力するデータ圧縮装置において、 前記処理対象データと前記処理対象データに対して1デ
ータ前のデータとが一致するか否かを判断する第1の判
断手段と、 前記処理対象データと前記処理対象データに対して2デ
ータ以上の所定数データ前のデータとが一致するか否か
を判断する第2の判断手段と、 前記処理対象データと前記処理対象データに対して所定
の位置関係にあるデータとの一致が連続して繰り返され
るごとにその一致回数を取得する一致回数取得手段と、 一致したデータの位置関係を示すビットデータおよび一
致回数に応じて定められたビットデータからなる符号デ
ータを出力する符号出力手段と、を備え、 前記第1の判断手段により一致すると判断される場合
に、前記一致回数取得手段により当該一致回数を取得
し、当該1データ前のデータとの一致を示すビットデー
タおよび当該一致回数に応じて定められたピットデータ
からなる符号データを出力し、前記第1の手段により一
致しないと判断され、前記第2の判断手段により一致す
ると判断される場合に、前記一致回数取得手段により当
該一致回数を取得し、当該所定数データ前のデータとの
一致を示すビットデータおよび当該一致回数に応じて定
められたビットデータからなる符号データを出力するよ
うに構成したことを特徴とするデータ圧縮装置。
4. A data compression apparatus for scanning data to be processed one by one in a line direction from image data constituting an image and outputting code data, wherein the data to be processed and the data to be processed are First determining means for determining whether or not the data before one data matches, and whether or not the data to be processed and the data to be processed match a predetermined number of data two or more data before the data to be processed Second determining means for determining whether the data to be processed and the data having a predetermined positional relationship with the data to be processed are repeatedly obtained each time the number of matches is obtained. Means, and code output means for outputting code data consisting of bit data indicating the positional relationship of the matched data and bit data determined according to the number of matches, When it is determined by the first determination unit that the number of matches is determined, the number of matches is obtained by the number-of-matches obtaining unit, and the number of matches is determined according to the bit data indicating the match with the preceding data and the number of matches. When the first means determines that they do not match and the second determining means determines that they match, the matching number obtaining means obtains the number of matches. A data compression device configured to output code data including bit data indicating a match with the data preceding the predetermined number of data and bit data determined according to the number of matches.
【請求項5】前記データ圧縮装置は、 前記処理対象データと前記処理対象データに対して上に
位置するデータとが一致するか否かを判断する第3の判
断手段をさらに備え、 前記第3の判断手段により一致すると判断される場合
に、前記一致回数取得手段により当該一致回数を取得
し、当該上に位置するデータとの一致を示すビットデー
タおよび当該一致回数に応じて定められたビットデータ
からなる符号データを出力することを特徴とする請求項
4記載のデータ圧縮装置。
5. The data compression apparatus further comprises: third determination means for determining whether or not the data to be processed matches data located above the data to be processed, and When it is determined that the number of matches is equal, the number of matches is obtained by the number-of-matches obtaining means, and the bit data indicating the match with the data located thereon and the bit data determined according to the number of matches. 5. The data compression apparatus according to claim 4, wherein code data consisting of the following is output.
【請求項6】入力されるビットデータの中から、1デー
タ前のデータとの一致を示す位置関係を示すビットデー
タを取得する第1のコマンド取得手段と、 入力されるビットデータの中から、2データ以上の所定
数前のデータとの一致を示す位置関係を示すビットデー
タを取得する第2のコマンド取得手段と、 入力されるビットデータの中から、前記位置関係を示す
ビットデータに対応付けられた一致回数に応じて定めら
れたビットデータを取得する一致回数取得手段と、 前記第1のコマンド取得手段により位置関係を示すビッ
トデータが取得された場合に、最後に復号された復号デ
ータを前記一致回数取得手段により取得された一致回数
を示すビットデータに応じて定められた一致回数だけ復
号データとして出力し、前記第2のコマンド取得手段に
より位置関係を示すビットデータが取得された場合に、
最後に復号された復号データに対して1つ前のデータを
前記一致回数取得手段により取得された一致回数を示す
ピットデータに応じて定められた一致回数だけ復号デー
タとして出力する復号出力手段とを備えたことを特徴と
するデータ伸長装置。
6. A first command acquisition means for acquiring bit data indicating a positional relationship indicating a match with data one data before from input bit data, and: A second command acquisition unit for acquiring bit data indicating a positional relationship indicating coincidence with two or more predetermined number of data before, and associating the input bit data with the bit data indicating the positional relationship. A number-of-matches acquisition unit for acquiring bit data determined in accordance with the determined number of matches, and when the first command acquisition unit acquires bit data indicating a positional relationship, the decoded data decoded last is The number of matches determined in accordance with the bit data indicating the number of matches acquired by the number of matches acquisition unit is output as decoded data, and the second command acquisition is performed. When the bit data indicating a positional relationship between the means is acquired,
Decoding output means for outputting the data immediately preceding the last decoded data as decoded data by the number of matches determined according to the pit data indicating the number of matches obtained by the number of matches obtaining means. A data decompression device, comprising:
【請求項7】圧縮された符号データを原データに復号す
るデータ伸長装置を備えた印刷装置であって、 前記データ伸長装置は、 入力されるビットデータの中から、1データ前のデータ
との一致を示す位置関係を示すビットデータを取得する
第1のコマンド取得手段と、 入力されるビットデータの中から、2データ以上の所定
数前のデータとの一致を示す位置関係を示すビットデー
タを取得する第2のコマンド取得手段と、 入力されるビットデータの中から、前記位置関係を示す
ビットデータに対応付けられた一致回数に応じて定めら
れたビットデータを取得する一致回数取得手段と、 前記第1のコマンド取得手段により位置関係を示すビッ
トデータが取得された場合に、最後に復号された復号デ
ータを前記一致回数取得手段により取得された一致回数
を示すビットデータに応じて定められた一致回数だけ復
号データとして出力し、前記第2のコマンド取得手段に
より位置関係を示すピットデータが取得された場合に、
最後に復号された復号データに対して1つ前のデータを
前記一致回数取得手段により取得された一致回数を示す
ビットデータに応じて定められた一致回数だけ復号デー
タとして出力する復号出力手段とを備えたことを特徴と
する印刷装置。
7. A printing apparatus provided with a data decompression device for decoding compressed code data into original data, wherein the data decompression device is configured to determine whether the input bit data is one data before. First command acquiring means for acquiring bit data indicating a positional relationship indicating a match; and, among input bit data, bit data indicating a positional relationship indicating a match with data equal to or more than a predetermined number of data earlier than two data. A second command acquisition unit for acquiring, and a coincidence number acquisition unit for acquiring, from input bit data, bit data determined according to the number of coincidences associated with the bit data indicating the positional relationship, When bit data indicating a positional relationship is obtained by the first command obtaining means, the last decoded data is obtained by the matching number obtaining means. When only match count determined in accordance with the bit data indicating the number of matches is output as decoded data, pit data showing the positional relationship by the second command acquisition means is acquired,
Decoding output means for outputting, as decoded data, the data immediately preceding the last decoded data by the number of matches determined according to the bit data indicating the number of matches obtained by the number-of-matches obtaining means. A printing device, comprising:
JP23760898A 1998-08-24 1998-08-24 Data compression method and its device, data expansion method and its device, and printer Pending JP2000069294A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23760898A JP2000069294A (en) 1998-08-24 1998-08-24 Data compression method and its device, data expansion method and its device, and printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23760898A JP2000069294A (en) 1998-08-24 1998-08-24 Data compression method and its device, data expansion method and its device, and printer

Publications (1)

Publication Number Publication Date
JP2000069294A true JP2000069294A (en) 2000-03-03

Family

ID=17017847

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23760898A Pending JP2000069294A (en) 1998-08-24 1998-08-24 Data compression method and its device, data expansion method and its device, and printer

Country Status (1)

Country Link
JP (1) JP2000069294A (en)

Similar Documents

Publication Publication Date Title
JPH0366227A (en) Method and system for compression coding and decoding method
US7433522B2 (en) JBIG coding apparatus and method with low cost, high-performance ping-pong buffer arrangement
US6094151A (en) Apparatus and method for finite state machine coding of information selecting most probable state subintervals
US6912316B2 (en) Data compression and reconstruction methods and apparatuses for hard copy device
US8406538B2 (en) Image processing apparatus and image processing method
JP2000069294A (en) Data compression method and its device, data expansion method and its device, and printer
US20080137974A1 (en) JBIG coding and decoding system
JP3193140B2 (en) Image and code data compression
JP2002091407A (en) Picture display device
JP2842045B2 (en) Data compression device
JP3433276B2 (en) Image signal compression method and apparatus, image signal decompression method and apparatus, image signal compression / decompression method and apparatus, and printer
JPH11317673A (en) Run length encoding and decoding method therefor
JPH0818981A (en) Data compressing/expanding system
JP3128016B2 (en) Image compression device
JP3239664B2 (en) Variable length code decoding method
JP3108243B2 (en) Encoding and decoding device
JP2001217722A (en) Device and method for encoding information, and computer readable storage medium
JP3128014B2 (en) Image compression / decompression device
JP2859507B2 (en) Image data compression / decompression method and apparatus
JP2966437B2 (en) Run length code encoder
JP3212393B2 (en) Encoding device
JP3187696B2 (en) Image coding device
JPH06326878A (en) Data compressor
JPH06178124A (en) Image data compression and elongation device
JP2005141164A (en) Image display device and image display method