JP3242795B2 - Data processing device and data processing method - Google Patents

Data processing device and data processing method

Info

Publication number
JP3242795B2
JP3242795B2 JP25101694A JP25101694A JP3242795B2 JP 3242795 B2 JP3242795 B2 JP 3242795B2 JP 25101694 A JP25101694 A JP 25101694A JP 25101694 A JP25101694 A JP 25101694A JP 3242795 B2 JP3242795 B2 JP 3242795B2
Authority
JP
Japan
Prior art keywords
data
dictionary
buffer
compressed
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.)
Expired - Fee Related
Application number
JP25101694A
Other languages
Japanese (ja)
Other versions
JPH08116269A (en
Inventor
均 大野
優子 安部
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP25101694A priority Critical patent/JP3242795B2/en
Priority to US08/505,760 priority patent/US5635932A/en
Publication of JPH08116269A publication Critical patent/JPH08116269A/en
Priority to US08/813,943 priority patent/US5748122A/en
Application granted granted Critical
Publication of JP3242795B2 publication Critical patent/JP3242795B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、データ処理装置及びデ
ータ処理方法に関するものであり、更に詳しく言えば、
辞書データと入力データとを比較して一致するデータを
符号化し、逆に、符号化された圧縮データを復号化する
装置及び方法の改善に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing apparatus and a data processing method.
The present invention relates to an improvement in an apparatus and a method for comparing dictionary data and input data and encoding matching data, and conversely, decoding encoded compressed data.

【0002】近年、情報処理装置の高機能化及び多様化
に伴い、膨大な量のデータを格納する磁気ディスク装置
等の記憶装置を使用した装置及びそれらデータを通信回
線を使用して伝送する装置が利用される。このような分
野では、高効率化により利用者のコスト削減を図るべ
く、データ格納に際しては、記憶容量を実質的に増やす
ため、及び、データ転送に際しては、送信時間を短縮す
るために、データを圧縮する装置が使用される。
2. Description of the Related Art In recent years, as information processing apparatuses have become more sophisticated and diversified, apparatuses using storage devices such as magnetic disk devices for storing an enormous amount of data, and apparatuses transmitting such data using communication lines. Is used. In such a field, in order to reduce the cost of the user by increasing the efficiency, to substantially increase the storage capacity when storing data, and to shorten the transmission time when transferring data, the data is transferred. A compression device is used.

【0003】現在の辞書ベースによりデータ圧縮をする
方法は、Lempel Abraham氏とZivJacob氏が1977年に
IEEE Transaction on Information Theory に
発表した論文‘A Universal Algorithm for Seq
uential Data Compression’に見られる。これは、通
称Lempel-Ziv符号化のスライド辞書法又はLZ77法
と言われている。
[0003] The current dictionary-based data compression method is described in Lempel Abraham and Ziv Jacob's 1977 IEEE Transactions on Information Theory published a paper 'A Universal Agorithm for Seq.
uential Data Compression '. This is commonly called the slide dictionary method of Lempel-Ziv coding or the LZ77 method.

【0004】また、LZ77法に対して2つの大きな変
更を行ったLZSS法がある。これは、Storer 氏とS
zymanski氏が1982年に発表した‘Data Compression
viaTextual Substitution ’に見られ、通称LZS
S(Lempel-Ziv- Storer-Szymanski)法と呼ばれ、
データ検索時の性能改善を行ったものである。しかし、
LZ77法によれば、ひとつの連続したデータ列の符号
化が終わると、次のステップでは符号化したバイト数の
辞書データを辞書バッファの先頭から追い出す方法が採
られる。
There is also an LZSS method in which two major changes are made to the LZ77 method. This is Mr. Storer and S
zymanski announced 'Data Compression in 1982
viaTextual Substitution ', commonly known as LZS
It is called S (Lempel-Ziv-Storer-Szymanski) method,
This is a performance improvement during data retrieval. But,
According to the LZ77 method, when encoding of one continuous data string is completed, in the next step, a method is employed in which dictionary data of the encoded number of bytes is expelled from the head of the dictionary buffer.

【0005】このため、辞書バッファ内に辞書データが
重複して存在したり、過去に一致した実績がある辞書デ
ータでも辞書バッファから必ず追い出される等を原因と
してデータ圧縮率が低下する。そこで、一致したデータ
又はデータ列等を辞書バッファの先頭から単に追い出す
ことなく、辞書データのスライド方法を工夫し、参照辞
書の数を実質的に増やして、重複した辞書データをスト
ックすることなく、追い出された辞書データを有効に利
用すること、及び、データ圧縮率を高めることができる
装置及び方法が望まれている。
[0005] For this reason, the data compression rate is reduced because dictionary data is duplicated in the dictionary buffer, and even if dictionary data having a matching result in the past is always ejected from the dictionary buffer. Therefore, without simply flushing out matched data or data strings from the beginning of the dictionary buffer, devising a method of sliding dictionary data, substantially increasing the number of reference dictionaries, and stocking duplicate dictionary data, There is a need for an apparatus and method that can effectively use the kicked-out dictionary data and increase the data compression rate.

【0006】[0006]

【従来の技術】図12, 13は、従来例に係るデータ圧縮方
法の説明図である。図12(A)は、データ圧縮装置の構
成図であり、図12(B)はデータ圧縮時の状態図であ
る。図13(A)〜(C)は、その問題点を説明する符号
化処理の状態図をそれぞれ示している。
2. Description of the Related Art FIGS. 12 and 13 are explanatory diagrams of a data compression method according to a conventional example. FIG. 12A is a configuration diagram of the data compression device, and FIG. 12B is a state diagram at the time of data compression. FIGS. 13A to 13C show state diagrams of an encoding process for explaining the problem.

【0007】例えば、LZ77(スライド辞書法)を応
用したデータ圧縮装置は、図12(A)に示すように、原
データファイル1,データ変換装置2及び圧縮データフ
ァイル3から成る。データ変換装置2は入力バッファ2
A,辞書バッファ2B及び中央処理装置(以下CPUと
いう)2Cを有する。LZ77のデータ構造は、図12
(B)に示すように、符号化済みの入力データ列をある
メモリ範囲により構成し、これを辞書バッファ2Bに格
納する。辞書バッファ2Bに格納された辞書データは、
圧縮データ後の辞書として残されることなく、そのまま
圧縮データファイル3に転送される。初期状態の辞書バ
ッファ2Bには、データ構造にあった値が詰められる場
合もある。
For example, a data compression apparatus to which LZ77 (slide dictionary method) is applied includes an original data file 1, a data conversion apparatus 2 and a compressed data file 3, as shown in FIG. The data converter 2 is an input buffer 2
A, a dictionary buffer 2B and a central processing unit (hereinafter referred to as CPU) 2C. The data structure of LZ77 is shown in FIG.
As shown in (B), the coded input data sequence is composed of a certain memory range, and this is stored in the dictionary buffer 2B. The dictionary data stored in the dictionary buffer 2B is
The data is transferred to the compressed data file 3 without being left as a dictionary after the compressed data. The dictionary buffer 2B in the initial state may be filled with a value suitable for the data structure.

【0008】当該装置の機能は、原データファイル1か
ら読み出された原データが入力データDinとして、デー
タ変換装置2の入力バッファ2Aに書き込まれる。次
に、データ検索をするべくCPU2Cにより、バッファ
2Aに書き込まれたデータと、辞書バッファ2Bに格納
された辞書データとが比較される。この辞書データは、
入力データが利用される。一般にデータ検索は、先に格
納されたデータの先頭位置から行い、辞書バッファ2B
内で、最長一致データ列が探索される。
The function of the device is that the original data read from the original data file 1 is written as input data Din to the input buffer 2A of the data converter 2. Next, the CPU 2C compares the data written in the buffer 2A with the dictionary data stored in the dictionary buffer 2B in order to perform a data search. This dictionary data is
Input data is used. In general, data search is performed from the head position of previously stored data, and the dictionary buffer 2B
Is searched for the longest matching data string.

【0009】また、CPU2Cによりデータ比較された
結果、辞書データと入力データとに一致する部分が検索
されると、この最長一致データは符号化されて圧縮さ
れ、この圧縮データDout が、圧縮データファイル3に
格納される。これにより、以前に符号化した入力データ
列を辞書データとして利用し、該辞書データ列と入力デ
ータ列の中の連続データ部分との最長一致を検索し、そ
の一致情報を符号化することができる(LZ77法)。
As a result of the data comparison by the CPU 2C, when a portion matching the dictionary data and the input data is searched, the longest matching data is encoded and compressed, and the compressed data Dout is stored in a compressed data file. 3 is stored. This makes it possible to use the previously encoded input data sequence as dictionary data, search for the longest match between the dictionary data sequence and the continuous data portion in the input data sequence, and encode the match information. (LZ77 method).

【0010】つまり、LZ77法は、あるメモリ範囲に
よって画定される入力バッファ2Aと辞書バッファ2B
内のデータ列で同じデータ部分を探し、この同じデータ
部分を圧縮する方法である。このときの最長一致データ
は、図12(B)に示すように、辞書バッファ2Bと入力
バッファ2A内で、両データが一致し始める一致開始位
置(アドレス又はオフセット)から、連続して両データ
が一致しなくなるまでのデータの最大の長さ(通常はバ
イト数で表す)を以て定義される。辞書データは、入力
バッファ2A内で一致した直後のデータが辞書バッファ
2Bに転送される。
That is, the LZ77 method uses an input buffer 2A and a dictionary buffer 2B defined by a certain memory range.
In this method, the same data portion is searched for in the data string in the, and the same data portion is compressed. At this time, as shown in FIG. 12B, the longest match data is obtained from the match start position (address or offset) where both data start to match in the dictionary buffer 2B and the input buffer 2A. It is defined by the maximum length (usually expressed in bytes) of the data before it no longer matches. As for the dictionary data, the data immediately after matching in the input buffer 2A is transferred to the dictionary buffer 2B.

【0011】具体的には、図12(B)において、一致開
始位置が「2」であり、最長一致データ=u,i,m,
a,dが「5」バイトである。入力バッファ2A内に
は、当該一致データ=u,i,m,a,dに連続する次
のデータ=fが存在する。ひとつの連続したデータ列=
u,i,m,a,dの符号化が終わると、図12(C)に
示すように、次のステップとして、一致したデータ列=
5バイトと、次のデータ=1バイト分に相当する6バイ
トの辞書データ=a,n,u,i,m,aが辞書バッフ
ァ2Bの先頭から追い出され、その後、この追い出され
た6バイト分のデータを補充するべく、入力バッファ2
Aから辞書バッファ2Bに辞書データとして、6バイト
のデータ=u,i,m,a,d,fが補充される。この
ように見かけ上、辞書バッファ2Bの窓が移動したよう
に見えることから、スライド辞書法と呼ばれる。
Specifically, in FIG. 12B, the matching start position is "2", and the longest matching data = u, i, m,
a and d are "5" bytes. In the input buffer 2A, there is the next data = f that follows the matching data = u, i, m, a, d. One continuous data string =
After the encoding of u, i, m, a, and d is completed, as shown in FIG.
5 bytes and 6-byte dictionary data = a, n, u, i, m, a corresponding to the next data = 1 byte are evicted from the head of the dictionary buffer 2B, and then the evicted 6 bytes Input buffer 2 to replenish
From A, 6-byte data = u, i, m, a, d, and f are supplemented as dictionary data to the dictionary buffer 2B. Since the window of the dictionary buffer 2B looks as if it has moved in this way, it is called a slide dictionary method.

【0012】[0012]

【発明が解決しようとする課題】ところで、従来例によ
れば、図12(B)に示すように、ひとつの連続したデー
タ列=u,i,m,a,dの符号化が終わると、次のス
テップとして、一致したデータ列=5バイトと、次のデ
ータ=1バイト分に相当する6バイトの辞書データ=
a,n,u,i,m,aが辞書バッファ2Bの先頭から
追い出される(LZ77法のスライド辞書法)。このた
め、次のような問題がある。
By the way, according to the conventional example, as shown in FIG. 12B, when one continuous data string = u, i, m, a, d is encoded, As the next step, the matched data string = 5 bytes and the next data = 1-byte dictionary data corresponding to 1 byte =
a, n, u, i, m, a are evicted from the head of the dictionary buffer 2B (the slide dictionary method of the LZ77 method). Therefore, there are the following problems.

【0013】 辞書バッファ2B内で同じ辞書データ
が重複して存在する可能性があり、データ圧縮率が低下
する。例えば、図13(A)に示すような符号化前のデー
タ検索状態で、データ列「a,b,c」が一致したとす
ると、LZ77法の変形型では、図13(B)に示すよう
に、無条件に辞書バッファ2Bの先頭から一致したデー
タ列のバイト数,例えば、3バイトだけ、辞書データ=
「x,y,z」が追い出される。このため、図13(C)
に示すような符号化後の状態では、辞書バッファ2Bに
データ列「a,b,c」が重複して残ることになる。
There is a possibility that the same dictionary data is duplicated in the dictionary buffer 2B, and the data compression rate is reduced. For example, assuming that the data strings “a, b, c” match in the data search state before encoding as shown in FIG. 13A, a modified version of the LZ77 method is as shown in FIG. The number of bytes of the data string that unconditionally matches from the beginning of the dictionary buffer 2B, for example, only 3 bytes, the dictionary data =
"X, y, z" is kicked out. For this reason, FIG.
In the state after the encoding as shown in (1), the data string “a, b, c” remains redundantly in the dictionary buffer 2B.

【0014】 また、データ圧縮率を上げるために
は、辞書バッファ2Bのメモリ領域を拡張し、検索範囲
を拡張することが考えられる。しかし、一般に、辞書バ
ッファ2Bのサイズを大きくした場合には、多くの検索
時間を要する。また、サイズを広げると、符号化するデ
ータに関し、位置情報のデータ長を拡張する必要があ
る。更に、この方式では、過去に一致した実績がある辞
書データでも辞書バッファ2Bから必ず追い出される。
In order to increase the data compression rate, it is conceivable to extend the memory area of the dictionary buffer 2B and extend the search range. However, generally, when the size of the dictionary buffer 2B is increased, much search time is required. Further, when the size is increased, it is necessary to extend the data length of the position information with respect to the data to be encoded. Further, in this method, even dictionary data having a matching result in the past is always flushed from the dictionary buffer 2B.

【0015】本発明は、かかる従来例の問題点に鑑み創
作されたものであり、一致したデータ又はデータ列等を
辞書バッファの先頭から単に追い出すことなく、辞書デ
ータのスライド方法を工夫し、参照辞書の数を実質的に
増やして、重複した辞書データをストックすることな
く、追い出された辞書データを有効に利用すること、及
び、データ圧縮率を高めることが可能となるデータ処理
装置及びデータ処理方法の提供を目的とする。
The present invention has been made in view of the above-mentioned problems of the prior art, and a method of sliding dictionary data has been devised by simply devising a method of sliding dictionary data without simply flushing out matched data or data strings from the head of the dictionary buffer. A data processing apparatus and data processing capable of effectively using the ejected dictionary data without increasing the number of dictionaries and stocking the duplicated dictionary data, and increasing the data compression ratio The purpose is to provide a method.

【0016】[0016]

【課題を解決するための手段】図1〜11は、本発明に係
るデータ処理装置及びデータ処理方法の一実施例を示し
ている。第1のデータ処理装置は、図1に示すように、
被圧縮データを利用した辞書データ又は辞書データ列を
格納する辞書バッファを備え、順次、入力される被圧縮
データとを比較して一致する辞書データ又は辞書データ
列を符号化し、逆に、符号化された圧縮データを復号化
するときに、前記辞書データ又は辞書データ列と、入力
された前記被圧縮データ又は被圧縮データ列とを比較し
て前記辞書データ又は辞書データ列と前記被圧縮データ
又は被圧縮データ列とが一致した場合に、前記一致した
部分の辞書データ又は辞書データ列を辞書バッファ12B
から追い出し、前記辞書データ又は辞書データ列が追い
出された辞書バッファ12Bのデータ書込み範囲を一方向
に詰め、前記データ書込み範囲が詰められた辞書バッフ
ァ12Bに前記一致した被圧縮データ又は被圧縮データ列
を新たな辞書データとして書き込む辞書制御手段14が
設けられることを特徴とする。
1 to 11 show an embodiment of a data processing apparatus and a data processing method according to the present invention. The first data processing device, as shown in FIG.
A dictionary buffer for storing dictionary data or a dictionary data string using compressed data, sequentially comparing input compressed data with dictionary data or dictionary data strings that match, and conversely encoding When decoding the compressed data that has been compressed, the dictionary data or dictionary data string, the input compressed data or compressed data string to compare the dictionary data or dictionary data string and the compressed data or When the compressed data string matches, the dictionary data or dictionary data string of the matched part is stored in the dictionary buffer 12B.
From the dictionary buffer or the dictionary data string from which the dictionary data or dictionary data string has been evicted is packed in one direction, and the matched compressed data or compressed data string is stored in the dictionary buffer 12B with the packed data write area. Is written as new dictionary data.

【0017】本発明の第2のデータ処理装置は、図1に
示すように、前記辞書バッファ12Bから追い出されたデ
ータ又は辞書データ列を記憶する補助辞書バッファ12C
が設けられることを特徴とする。本発明の第3のデータ
処理装置は、図1に示すように、前記被圧縮データの中
で予め調査された出現頻度の高い固定データ又は固定デ
ータ列を辞書データとして書き込んだ固定辞書バッファ
12Dが設けられることを特徴とする。
As shown in FIG. 1, the second data processing apparatus according to the present invention comprises an auxiliary dictionary buffer 12C for storing data or dictionary data strings expelled from the dictionary buffer 12B.
Is provided. As shown in FIG. 1, a third data processing device according to the present invention includes a fixed dictionary buffer in which fixed data or a fixed data sequence having a high frequency of appearance, which has been checked in advance in the compressed data, is written as dictionary data.
12D is provided.

【0018】本発明の第4のデータ処理装置は、図10
(A)に示すように、前記辞書バッファ12Bが、被圧縮
データを辞書データとして書き込むメモリ領域を非終端
ループ状に接続した環状構造を有することを特徴とす
る。本発明の第1のデータ処理方法は、被圧縮データを
利用した辞書データ又は辞書データ列と、順次、入力さ
れる被圧縮データとを比較して一致するデータ又はデー
タ列を符号化し、逆に、符号化された圧縮データを復号
化するときに、図3の処理フローチャートのステップP
3で前記辞書データ又は辞書データ列と、入力された前
記被圧縮データ又は被圧縮データ列とを比較して、その
後、ステップP4で前記辞書データ又は辞書データ列と
前記被圧縮データ又は被圧縮データ列とが一致した場合
に、ステップP8で前記一致した部分の辞書データ又は
辞書データ列を辞書のデータ書込み範囲から追い出し、
前記データ又はデータ列が追い出された辞書のデータ書
込み範囲を一方向に詰め、前記データ書込み範囲が詰め
られた辞書に前記一致した被圧縮データ又は被圧縮デー
タ列を新たな辞書データとして書き込むことを特徴とす
る。
A fourth data processing apparatus according to the present invention has a structure shown in FIG.
As shown in (A), the dictionary buffer 12B has a ring structure in which memory areas for writing compressed data as dictionary data are connected in a non-terminal loop shape. The first data processing method of the present invention compares dictionary data or a dictionary data sequence using compressed data with input compressed data in sequence and encodes matching data or data sequences. When decoding the encoded compressed data, step P in the processing flowchart of FIG.
In step 3, the dictionary data or dictionary data string is compared with the input compressed data or compressed data string, and in step P4, the dictionary data or dictionary data string and the compressed data or compressed data string are compared. If the columns match, the dictionary data or dictionary data string of the matched portion is expelled from the data writing range of the dictionary in step P8,
The data writing range of the dictionary from which the data or the data string is expelled is reduced in one direction, and the matched compressed data or compressed data string is written as new dictionary data in the dictionary whose data writing range is reduced. Features.

【0019】本発明の第2のデータ処理方法は、前記辞
書データ又は辞書データ列と、入力された前記被圧縮デ
ータ又は被圧縮データ列とを比較する際に、図7の処理
フローチャートのステップP2で前記辞書バッファ12B
から追い出されたデータ又は辞書データ列を参照するこ
とを特徴とする。本発明の第3のデータ処理方法は、前
記辞書データ又は辞書データ列と、入力された前記被圧
縮データ又は被圧縮データ列とを比較する際に、図9
(B)の処理フローチャートのステップP3で前記被圧
縮データの中で予め調査された出現頻度の高い固定デー
タ又は固定データ列を参照することを特徴とする。
In the second data processing method of the present invention, when comparing the dictionary data or the dictionary data sequence with the input compressed data or the compressed data sequence, a step P2 in the processing flowchart of FIG. And the dictionary buffer 12B
It is characterized by referring to data or dictionary data strings that have been evicted from the. The third data processing method of the present invention, when comparing the dictionary data or dictionary data string with the input compressed data or compressed data string,
In step P3 of the processing flowchart of (B), fixed data or a fixed data string having a high frequency of appearance that has been investigated in advance is referred to in the compressed data.

【0020】本発明の第4のデータ処理方法は、前記辞
書データ又は辞書データ列と、入力された前記被圧縮デ
ータ又は被圧縮データ列とを比較する際に、図11(B)
に示すように、前記辞書データ又は辞書データ列が書き
込まれた辞書用のメモリ領域に連続する入力用のメモリ
領域に書き込まれた被圧縮データ又は被圧縮データ列を
辞書データ又は辞書データ列として見なすことを特徴と
し、上記目的を達成する。
In the fourth data processing method of the present invention, when comparing the dictionary data or the dictionary data sequence with the input compressed data or the compressed data sequence, FIG.
As shown in the figure, the data to be compressed or the data string to be compressed written to the input memory area which is continuous with the dictionary memory area to which the dictionary data or the dictionary data string is written is regarded as the dictionary data or the dictionary data string. The above object is achieved.

【0021】[0021]

【作用】次に、図1を参照しながら本発明の第1のデー
タ処理装置の動作を説明をする。図1において、あるメ
モリ範囲で被圧縮データが入力バッファ12Aに入力さ
れ、辞書データが辞書バッファ12Bに書き込まれると、
この辞書データ又は辞書データ列と、入力された被圧縮
データ又は被圧縮データ列とが辞書制御手段14により
比較され、その結果、辞書データ又は辞書データ列と被
圧縮データ又は被圧縮データ列とが一致した場合には、
一致した部分の辞書データ又は辞書データ列が辞書制御
手段14により、辞書バッファ12Bから追い出される。
Next, the operation of the first data processing apparatus according to the present invention will be described with reference to FIG. In FIG. 1, when data to be compressed is input to an input buffer 12A in a certain memory range and dictionary data is written to a dictionary buffer 12B,
This dictionary data or dictionary data string is compared with the input compressed data or compressed data string by the dictionary control means 14, and as a result, the dictionary data or dictionary data string is compared with the compressed data or compressed data string. If they match,
The dictionary data or dictionary data string of the matched part is expelled from the dictionary buffer 12B by the dictionary control means 14.

【0022】この辞書データ又は辞書データ列が追い出
された辞書バッファ12Bのデータ書込み範囲は、一方向
(先頭方向)に詰められ、このデータ書込み範囲が詰め
られた辞書バッファ12Bに、入力バッファ12Aからの一
致した被圧縮データ又は被圧縮データ列が新たな辞書デ
ータとして書き込まれる(第1のデータ処理方法)。こ
のため、一致したデータ又はデータ列に重複した辞書デ
ータ又は辞書データ列が、辞書バッファ12Bのデータ書
込み範囲から外部等に追い出されるため、従来例のよう
に、当該一致データに関係しないデータを単に辞書バッ
ファ12Bの先頭から追い出すことが無くなる。すなわ
ち、重複した辞書データを辞書バッファ12Bに格納する
ことが無くなる。
The data writing range of the dictionary buffer 12B from which the dictionary data or the dictionary data string has been expelled is reduced in one direction (heading direction). Is written as new dictionary data (first data processing method). For this reason, the dictionary data or the dictionary data string overlapping with the matched data or data string is expelled from the data writing range of the dictionary buffer 12B to the outside or the like. Ejection from the beginning of the dictionary buffer 12B is eliminated. That is, there is no need to store duplicate dictionary data in the dictionary buffer 12B.

【0023】これにより、常に、異なった種類の辞書デ
ータを辞書バッファ12Bに格納することができ、従来例
に比べて辞書バッファ12Bの冗長性が少なくなり、デー
タ圧縮率を高めることが可能となる。本発明の第2のデ
ータ処理装置によれば、図1に示すように補助辞書バッ
ファ12Cが設けられ、辞書バッファ12Bから追い出され
たデータ又は辞書データ列が当該バッファ12Cに記憶さ
れる。
As a result, different types of dictionary data can be always stored in the dictionary buffer 12B, and the redundancy of the dictionary buffer 12B is reduced as compared with the conventional example, and the data compression rate can be increased. . According to the second data processing apparatus of the present invention, as shown in FIG. 1, the auxiliary dictionary buffer 12C is provided, and the data or the dictionary data string expelled from the dictionary buffer 12B is stored in the buffer 12C.

【0024】このため、辞書バッファ12Bのメモリ容量
を変えずに、過去に一致した実績がある辞書データ又は
辞書データ列を補助辞書バッファ12Cに記憶すること
で、参照できる辞書の数を実質的に増やすことができ
る。辞書バッファ12B内に辞書データが無い場合に補助
辞書バッファ12Cを参照できる。すなわち、図7の処理
フローチャートに示すように、ステップP2で辞書バッ
ファ12Bから追い出されたデータ又は辞書データ列を参
照しながら、辞書データ又は辞書データ列と、入力され
た被圧縮データ又は被圧縮データ列とを比較することが
でき、原データのまま不一致として符号化されていたデ
ータを圧縮する確率を向上させることが可能となる(第
2のデータ処理方法)。
For this reason, by storing in the auxiliary dictionary buffer 12C the dictionary data or the dictionary data string having a matched result in the past without changing the memory capacity of the dictionary buffer 12B, the number of dictionaries that can be referred to is substantially reduced. Can be increased. When there is no dictionary data in the dictionary buffer 12B, the auxiliary dictionary buffer 12C can be referred to. That is, as shown in the processing flowchart of FIG. 7, while referring to the data or dictionary data stream expelled from the dictionary buffer 12B in step P2, the dictionary data or dictionary data stream and the input compressed data or compressed data The columns can be compared with each other, and it is possible to improve the probability of compressing data that has been encoded as inconsistent with the original data (second data processing method).

【0025】これにより、辞書バッファ12Bから追い出
された辞書データを有効に利用することができ、辞書バ
ッファ12B及び補助辞書バッファ12Cを併用した移動窓
によるデータ圧縮をすることが可能となる。本発明の第
3のデータ処理装置によれば、図1に示すように、固定
辞書バッファ12Dが設けられ、被圧縮データの中で予め
調査された出現頻度の高い固定データ又は固定データ列
が辞書データとして当該バッファ12Dに書き込まれる。
As a result, the dictionary data expelled from the dictionary buffer 12B can be effectively used, and data can be compressed by a moving window using both the dictionary buffer 12B and the auxiliary dictionary buffer 12C. According to the third data processing apparatus of the present invention, a fixed dictionary buffer 12D is provided as shown in FIG. The data is written to the buffer 12D as data.

【0026】このため、固定辞書バッファ12D内に出現
頻度の高いとして登録された辞書データと、被圧縮デー
タの中の固定データ又は固定データ列とが比較されるこ
とから、データ検索速度の高速化を図ることが可能とな
る。すなわち、図9(B)の処理フローチャートに示す
ように、ステップP3で被圧縮データの中で予め調査さ
れた出現頻度の高い固定データ又は固定データ列を参照
しながら、辞書データ又は辞書データ列と、入力された
被圧縮データ又は被圧縮データ列とを比較することがで
きる(本発明の第3のデータ処理方法)。
For this reason, the dictionary data registered as having a high frequency of appearance in the fixed dictionary buffer 12D is compared with the fixed data or the fixed data string in the data to be compressed. Can be achieved. That is, as shown in the processing flow chart of FIG. 9B, the dictionary data or the dictionary data string is referred to with reference to the fixed data or the fixed data string having a high frequency of appearance previously examined in the data to be compressed in step P3. , Can be compared with the input compressed data or compressed data string (third data processing method of the present invention).

【0027】これにより、データ検索が従来例に比べて
早くなることから、データ圧縮処理の高速化を図ること
が可能となる。本発明の第4のデータ処理装置によれ
ば、図10(A)に示すような環状構造を有する辞書バッ
ファ12Bが設けられる。このため、非終端ループ状に接
続されたメモリ領域に、以前に符号化した入力データ列
を辞書データとして書込むことができ、参照できる辞書
の数を実質的に増やすことができる。
As a result, since the data retrieval is faster than in the conventional example, it is possible to speed up the data compression processing. According to the fourth data processing device of the present invention, a dictionary buffer 12B having a circular structure as shown in FIG. 10A is provided. Therefore, the previously encoded input data string can be written as dictionary data in the memory area connected in a non-terminal loop shape, and the number of dictionaries that can be referred to can be substantially increased.

【0028】これを利用して、入力データ列の中の連続
した部分との最長一致を検索し、その一致情報を符号化
することができ、第1の装置の辞書バッファ12Bを拡張
した移動窓によりデータを圧縮することが可能となる。
本発明の第4のデータ処理方法によれば、図11(B)に
示すように、辞書用のメモリ領域に連続する入力用のメ
モリ領域に書き込まれた被圧縮データ又は被圧縮データ
列が辞書データ又は辞書データ列として見なされる。
By utilizing this, the longest match with a continuous part in the input data sequence can be searched, and the match information can be encoded, and the moving window obtained by expanding the dictionary buffer 12B of the first device can be used. Makes it possible to compress data.
According to the fourth data processing method of the present invention, as shown in FIG. 11B, the compressed data or compressed data sequence written in the input memory It is regarded as data or a dictionary data string.

【0029】このため、参照できる辞書データの数を実
質的に増やすことができ、辞書データ又は辞書データ列
を入力用のメモリ領域に拡張して、一致するデータ又は
データ列を検索することができる。これにより、入力用
のメモリ領域の被圧縮データ又は被圧縮データ列同士を
比較することが可能となり、データ検索が従来例に比べ
て早くなることから、データ圧縮処理の高速化を図るこ
とが可能となる。
Therefore, the number of dictionary data that can be referred to can be substantially increased, and the dictionary data or dictionary data string can be expanded to an input memory area to search for matching data or data string. . This makes it possible to compare the data to be compressed or the data to be compressed in the input memory area, and the data retrieval is faster than in the conventional example, so that the data compression processing can be speeded up. Becomes

【0030】[0030]

【実施例】次に、図を参照しながら本発明の各実施例に
ついて説明をする。図1〜11は本発明の実施例に係るデ
ータ処理装置及びデータ処理方法を説明する図である。 (1)第1の実施例の説明 図1は、本発明の各実施例に係るデータ処理装置の構成
図であり、図2は第1の実施例に係るデータ圧縮時の辞
書バッファの説明図である。図3は、データの圧縮フロ
ーチャートであり、図4は、各実施例に係るデータ圧縮
時の符号化処理の説明図である。図5はデータの復元フ
ローチャートをそれぞれ示している。
Next, each embodiment of the present invention will be described with reference to the drawings. 1 to 11 are diagrams illustrating a data processing device and a data processing method according to an embodiment of the present invention. (1) Description of First Embodiment FIG. 1 is a configuration diagram of a data processing device according to each embodiment of the present invention, and FIG. 2 is an explanatory diagram of a dictionary buffer at the time of data compression according to the first embodiment. It is. FIG. 3 is a flowchart of data compression, and FIG. 4 is an explanatory diagram of an encoding process at the time of data compression according to each embodiment. FIG. 5 shows a data restoration flowchart.

【0031】例えば、本発明の第1〜第3の装置を組み
合わせたデータ圧縮又は復元装置は、図1(A)に示す
ように、原データファイル11,メモリ12,EPRO
M13,辞書制御手段(以下CPUという)14,キー
ボード15,ディスプレイ16及び圧縮データファイル
17から成る。すなわち、原データファイル11は圧縮
時又は復元時の原データを格納するメモリである。当該
ファイル11には磁気ディスク装置や半導体メモリ装置
を用いる。メモリ12は圧縮時に、辞書データ及び被圧
縮データを一時記憶するものである。例えば、メモリ1
2は入力バッファ12A,辞書バッファ12B,補助辞書バ
ッファ12C及び固定辞書バッファ12Dから成る。メモリ
12には随時書込み/読出し可能なメモリを用いる。
For example, as shown in FIG. 1A, a data compression or decompression device which combines the first to third devices of the present invention has an original data file 11, a memory 12, an EPRO.
M13, dictionary control means (hereinafter referred to as CPU) 14, keyboard 15, display 16 and compressed data file 17. That is, the original data file 11 is a memory for storing original data at the time of compression or decompression. For the file 11, a magnetic disk device or a semiconductor memory device is used. The memory 12 temporarily stores dictionary data and data to be compressed during compression. For example, memory 1
Reference numeral 2 denotes an input buffer 12A, a dictionary buffer 12B, an auxiliary dictionary buffer 12C, and a fixed dictionary buffer 12D. A memory that can be written / read at any time is used as the memory 12.

【0032】入力バッファ12Aは被圧縮データを一時記
憶する。辞書バッファ12Bは、被圧縮データを利用した
辞書データを記憶する。補助辞書バッファ(以下一致辞
書バッファともいう)12Cは辞書バッファ12Bから追い
出されたデータ又は辞書データ列を記憶するものであ
る。一致辞書バッファ12Cは、本発明の第2の実施例に
おいて使用する(第2の装置)。
The input buffer 12A temporarily stores the data to be compressed. The dictionary buffer 12B stores dictionary data using compressed data. An auxiliary dictionary buffer (hereinafter, also referred to as a coincidence dictionary buffer) 12C stores data or dictionary data strings expelled from the dictionary buffer 12B. The match dictionary buffer 12C is used in the second embodiment of the present invention (second device).

【0033】固定辞書バッファ12Dは、被圧縮データの
中で予め調査された出現頻度の高い固定データ又は固定
データ列を辞書データとして書き込むものである。固定
辞書バッファ12Dは本発明の第3の実施例で使用する
(第3の装置)。なお、メモリ12はデータ復元時に
は、辞書データ,辞書データ列又は被復元データ,被復
元データ列を一時記憶する。
The fixed dictionary buffer 12D is for writing, as dictionary data, fixed data or a fixed data string having a high appearance frequency which has been checked in advance in the data to be compressed. The fixed dictionary buffer 12D is used in the third embodiment of the present invention (third device). The memory 12 temporarily stores the dictionary data, the dictionary data string or the data to be restored, and the data string to be restored at the time of data restoration.

【0034】EPROM13は、各実施例で使用する制
御アルゴリズムを格納するプログラム可能な読出し専用
メモリである。例えば、第1の実施例では図3に示すよ
うなデータ圧縮アルゴリズムや図5に示すようなデータ
復元アルゴリズムが格納される。第2の実施例では、図
7に示すような一致辞書の作成アルゴリズムや図8に示
すようなデータ復元アルゴリズムが格納される。第3の
実施例では、図9(B)に示すようなデータ圧縮アルゴ
リズムや図9(C)に示すようなデータ復元アルゴリズ
ムが格納される。この制御アルゴリズムの具体的な内容
については各実施例において説明をする。
The EPROM 13 is a programmable read-only memory for storing a control algorithm used in each embodiment. For example, in the first embodiment, a data compression algorithm as shown in FIG. 3 and a data restoration algorithm as shown in FIG. 5 are stored. In the second embodiment, an algorithm for creating a matching dictionary as shown in FIG. 7 and a data restoration algorithm as shown in FIG. 8 are stored. In the third embodiment, a data compression algorithm as shown in FIG. 9B and a data restoration algorithm as shown in FIG. 9C are stored. The specific contents of this control algorithm will be described in each embodiment.

【0035】CPU14は辞書制御手段の一例であり、
入力バッファ12A,辞書バッファ12B,補助辞書バッフ
ァ12C及び固定辞書バッファ12Dの入出力を制御する。
例えば、CPU14は辞書バッファ12B内の辞書データ
又は辞書データ列と、入力バッファ12Aに順次,入力さ
れた被圧縮データ又は被圧縮データ列とを比較する。こ
の結果、CPU14は、辞書データ又は辞書データ列と
被圧縮データ又は被圧縮データ列とが一致した場合に、
一致した部分の辞書データ又は辞書データ列を辞書バッ
ファ12Bから追い出す。
The CPU 14 is an example of dictionary control means.
The input / output of the input buffer 12A, the dictionary buffer 12B, the auxiliary dictionary buffer 12C, and the fixed dictionary buffer 12D is controlled.
For example, the CPU 14 compares the dictionary data or the dictionary data sequence in the dictionary buffer 12B with the compressed data or the compressed data sequence sequentially input to the input buffer 12A. As a result, when the dictionary data or the dictionary data string matches the compressed data or the compressed data string, the CPU 14
The dictionary data or dictionary data string of the matching part is expelled from the dictionary buffer 12B.

【0036】その後、CPU14は、辞書データ又は辞
書データ列が追い出された辞書バッファ12Bのデータ書
込み範囲を一方向に詰め、データ書込み範囲が詰められ
た辞書バッファ12Bに一致した被圧縮データ又は被圧縮
データ列を新たな辞書データとして書き込む。キーボー
ド15は出現頻度の高い固定データ等を制御文にして入
力するツールである。ディスプレイ16はキーボード1
5やCPU14の入出力を補助するツールである。圧縮
データファイル17は、圧縮時又は復元時の圧縮データ
を格納するメモリである。当該ファイル17にはファイ
ル11と同様な磁気ディスク装置や半導体メモリ装置を
用いる。
Thereafter, the CPU 14 compresses the data writing range of the dictionary buffer 12B from which the dictionary data or the dictionary data string has been expelled in one direction, and matches the compressed data or the compressed data corresponding to the dictionary buffer 12B having the reduced data writing range. Write the data string as new dictionary data. The keyboard 15 is a tool for inputting fixed data or the like having a high appearance frequency as a control sentence. The display 16 is the keyboard 1
5 is a tool for assisting input and output of the CPU 14. The compressed data file 17 is a memory for storing compressed data at the time of compression or decompression. For the file 17, a magnetic disk device or a semiconductor memory device similar to the file 11 is used.

【0037】これにより、当該装置が構成され、被圧縮
データを利用した辞書データ又は辞書データ列と、順
次、入力される被圧縮データとを比較して一致するデー
タ又はデータ列を符号化し、逆に、符号化された圧縮デ
ータを復号化することができる。次に、本発明の第1の
実施例に係るデータ圧縮方法について、図3の処理フロ
ーチャートを参照しながら当該装置の動作を説明する。
図3は、本発明の第1の実施例に係るデータの圧縮フロ
ーチャートであり、図1に示したEPROM13に格納
された制御アルゴリズムを成す。
Thus, the apparatus is constructed, and the dictionary data or the dictionary data string using the compressed data is sequentially compared with the input compressed data, and the coincident data or the data string is encoded. In addition, the encoded compressed data can be decoded. Next, the operation of the data compression method according to the first embodiment of the present invention will be described with reference to the processing flowchart of FIG.
FIG. 3 is a flowchart for compressing data according to the first embodiment of the present invention, which constitutes a control algorithm stored in the EPROM 13 shown in FIG.

【0038】例えば、被圧縮データを利用した辞書デー
タ又は辞書データ列と、順次、入力される被圧縮データ
とを比較して一致するデータ又はデータ列を符号化する
場合、図3のフローチャートにおいて、まず、ステップ
P1で辞書バッファ12Bを初期化する。この際に初期化
によって、辞書バッファ12B内部が、データ=「零」の
状態となる。
For example, when dictionary data or a dictionary data string using compressed data and input compressed data are sequentially compared to encode matching data or data strings, the flowchart shown in FIG. First, in step P1, the dictionary buffer 12B is initialized. At this time, by initialization, the data inside the dictionary buffer 12B is set to the state of data = "zero".

【0039】次に、ステップP2で原データ列をファイ
ル11から入力バッファ12Aに読み込む。この際に、符
号化されていないデータを入力バッファ12Aの先頭位置
に移動する。例えば、図2(A)に示すように、数バイ
トの被圧縮データDin=a,b,c,x,y,z,r,
e,w…が入力バッファ12Aに入力される。入力バッフ
ァ12Aからの被圧縮データDinは辞書バッファ12Bにシ
フトされ、その結果、nバイトの辞書データ=x,y,
z,d,g,k,g…a,b,c,uが辞書バッファ12
Bに書き込まれる。
Next, in step P2, the original data string is read from the file 11 into the input buffer 12A. At this time, the uncoded data is moved to the head position of the input buffer 12A. For example, as shown in FIG. 2A, several bytes of compressed data Din = a, b, c, x, y, z, r,
are input to the input buffer 12A. The compressed data Din from the input buffer 12A is shifted to the dictionary buffer 12B, and as a result, n-byte dictionary data = x, y,
z, d, g, k, g... a, b, c, u are stored in the dictionary buffer 12.
B is written.

【0040】次いで、ステップP3で辞書バッファ12B
内に一致するデータ列が有るか否かを検索する。例え
ば、CPU14により辞書バッファ12B内に格納された
辞書データ列=a,b,cと、入力バッファ12Aの被圧
縮データ列=a,b,cとが比較される。その後、ステ
ップP4で辞書データ列と被圧縮データ列とが一致した
か否かを判断する。この際に、一致データ列が有る場合
(YES)には、ステップP5に移行する。また、一致デ
ータ列が無い場合(NO)には、ステップP6に移行し
て原データをそのまま符号化し、ステップP7に移行す
る。
Next, at step P3, the dictionary buffer 12B
Is searched for a matching data string. For example, the CPU 14 compares the dictionary data strings = a, b, c stored in the dictionary buffer 12B with the compressed data strings = a, b, c in the input buffer 12A. Thereafter, in step P4, it is determined whether or not the dictionary data string matches the compressed data string. At this time, if there is a matching data string (YES), the program shifts to Step P5. If there is no matching data string (NO), the flow shifts to step P6 to encode the original data as it is, and shifts to step P7.

【0041】ステップP4では辞書データ列=被圧縮デ
ータ列=a,b,cとなることから、一致データ列が有
ると判断され、ステップP5で一致情報を符号化する。
具体的には、一致データの位置情報,その長さ情報等を
符号化する。この際の符号化については、図4において
説明をする。その後、ステップP7では符号化した圧縮
データをファイル17に格納する。
In step P4, since the dictionary data string = compressed data string = a, b, c, it is determined that there is a matching data string. In step P5, matching information is encoded.
Specifically, the position information of the coincident data, its length information, and the like are encoded. The encoding at this time will be described with reference to FIG. Thereafter, in step P7, the encoded compressed data is stored in the file 17.

【0042】次いで、ステップP8で符号化した入力デ
ータ列を辞書バッファ12Bに移動する。この際に、CP
U14は、図2(B)に示すように、一致した部分(重
複する部分)の辞書データ列=a,b,cを辞書バッフ
ァ12Bのデータ書込み範囲から追い出し、このデータ列
が追い出された辞書バッファ12Bのデータ書込み範囲を
先頭方向に詰める。具体的には、図2(A)において、
辞書バッファ12Bの格納位置0から右にあるデータ列が
左にシフトされる。
Next, the input data sequence encoded in step P8 is moved to the dictionary buffer 12B. At this time, CP
U14, as shown in FIG. 2 (B), expels the dictionary data strings = a, b, c of the coincident part (overlapping part) from the data writing range of the dictionary buffer 12B, The data writing range of the buffer 12B is narrowed in the head direction. Specifically, in FIG.
The data string rightward from the storage position 0 of the dictionary buffer 12B is shifted to the left.

【0043】また、CPU14は、図2(B)に示すよ
うに、入力バッファ12Aからデータ書込み範囲が詰めら
れた辞書バッファ12Bに、一致した被圧縮データ列=
a,b,cを新たな辞書データとして書き込む。このと
き、従来例と異なり、辞書バッファ12Bの先頭位置に格
納されたx,y,zは、図2(C)に示すように、その
まま辞書データとして残留し、入力バッファ12Aからの
新たな辞書データとして被圧縮データ列=a,b,cが
辞書バッファ12Bの最後部に格納される。この結果、先
頭データ列=x,y,zが追い出されずに済むことにな
り、次の段階の辞書データとして使用される。
Further, as shown in FIG. 2B, the CPU 14 stores the matched compressed data string from the input buffer 12A into the dictionary buffer 12B in which the data writing range is narrowed.
Write a, b, and c as new dictionary data. At this time, unlike the conventional example, x, y, and z stored at the head position of the dictionary buffer 12B remain as the dictionary data as shown in FIG. 2C, and a new dictionary from the input buffer 12A is obtained. As data, compressed data strings = a, b, and c are stored in the last part of the dictionary buffer 12B. As a result, the head data string = x, y, z does not need to be evicted, and is used as dictionary data in the next stage.

【0044】その後、ステップP9で原データを全て圧
縮したか否かを判断する。この際に、原データを全て圧
縮した場合(YES)には、第1の実施例に係る制御アル
ゴリズムを終了し、原データを全て圧縮していない場合
(NO)には、ステップP2に戻って、原データ列をフ
ァイル11から入力バッファ12Aに読み込み、以下のス
テップを継続する。
Thereafter, in step P9, it is determined whether or not all the original data has been compressed. At this time, if all the original data has been compressed (YES), the control algorithm according to the first embodiment ends, and if all the original data has not been compressed (NO), the process returns to step P2. , The original data string is read from the file 11 into the input buffer 12A, and the following steps are continued.

【0045】これにより、被圧縮データを利用した辞書
データ列と、順次、入力される被圧縮データとを比較し
て一致するデータ列を符号化することができる。ここ
で、具体的な符号化の方法を説明する。本発明の実施例
では、圧縮率を上げるために、LZSS法を改良する。
なお、データ圧縮率は〔原データ/圧縮データ〕×100
%で表される。
As a result, a dictionary data string using compressed data and sequentially inputted compressed data can be compared to encode a matching data string. Here, a specific encoding method will be described. In the embodiment of the present invention, the LZSS method is improved to increase the compression ratio.
The data compression ratio is [original data / compressed data] × 100
It is expressed in%.

【0046】本発明の第1の実施例で検索された一致デ
ータを図4(A)に示すように圧縮データに変換する際
に、検索したデータの位置情報及び一致したデータの長
さを導入する。一般に、辞書バッファ12Bの最後部と、
入力バッファ12Aの先頭位置近傍でデータが一致する場
合(以下近傍一致という)が多いことを利用して、圧縮
データの先頭部に識別子を設け、データ検索した位置情
報を付加する。この際の位置情報には、短い位置情報値
として「0」が書き込まれ、長い位置情報値として
「1」が書き込まれる。
When the matched data searched in the first embodiment of the present invention is converted into compressed data as shown in FIG. 4A, the position information of the searched data and the length of the matched data are introduced. I do. Generally, the last part of the dictionary buffer 12B,
Taking advantage of the fact that there are many cases where the data matches near the head position of the input buffer 12A (hereinafter referred to as "neighborhood match"), an identifier is provided at the head of the compressed data, and the position information obtained by data search is added. At this time, “0” is written as the short position information value and “1” is written as the long position information value.

【0047】例えば、図4(A)は、辞書バッファ12B
の大きさが2KBの場合の位置情報を圧縮データに付加
したデータフォーマットを示している。図4(A)にお
いて、本発明の実施例では、データ長が7ビット(0〜
63)の場合に、短い位置情報値として「0」が書き込
まれ、データ長が12ビット(0〜2047)の場合
に、長い位置情報値として「1」が書き込まれる。な
お、実際には、近傍一致をどの範囲に設定するか、ある
いは、複数の位置情報の刻みを設けるなど、被圧縮デー
タの種類に最も適した調整を行う必要がある。
For example, FIG. 4A shows the dictionary buffer 12B.
2 shows a data format in which positional information in the case of a size of 2 KB is added to compressed data. In FIG. 4A, in the embodiment of the present invention, the data length is 7 bits (0 to 0).
In the case of (63), “0” is written as a short position information value, and “1” is written as a long position information value when the data length is 12 bits (0 to 2047). In practice, it is necessary to perform an adjustment most suitable for the type of the data to be compressed, for example, in what range the neighborhood match is set, or by providing a plurality of pieces of position information.

【0048】また、一致したバイト数を符号化する場合
に、出現頻度の高い符号を短い長さのビットで表す。こ
れは、一般に短いビット長さでの一致データが多いこと
に着目して、短い一致データ数に対して短い符号を割当
てることにより、データの長さについての符号化を考慮
したものである。このためには、図4(B)に示すよう
な符号木を用いる。図4(B)の符号木において、短い
位置情報値に「0」が書き込まれる場合として、=
「0,0」や=「0,1」が対象となり、これは図4
(C)に示すように、2バイト一致や3バイト一致を意
味する。図4(C)は符号木から構成される圧縮データ
の長さと対応ビット列の関係を示したものである。
When encoding the number of matching bytes, a code having a high appearance frequency is represented by a bit having a short length. This is because the encoding of the data length is considered by assigning a short code to the number of short coincident data, generally paying attention to the fact that there are many coincident data with a short bit length. For this purpose, a code tree as shown in FIG. 4B is used. In the code tree of FIG. 4B, a case where “0” is written in the short position information value is as follows:
"0,0" or = "0,1" is the target, which is shown in FIG.
As shown in (C), this means a 2-byte match or a 3-byte match. FIG. 4C shows the relationship between the length of the compressed data composed of the code tree and the corresponding bit string.

【0049】また、図4(B)において、長い位置情報
値に「1」が書き込まれる場合として、=「1,0,
0」,=「1,0,1」,=1,1,0,0」,
=「1,1,0,1」,=「1,1,1,0,0」及
び=「1,1,1,0,1」が対象となり、これは図
4(C)に示すように、それぞれ4〜9バイト一致をそ
れぞれ意味する。
Also, in FIG. 4B, assuming that “1” is written in the long position information value, “= 1, 0,
0 ", =" 1,0,1 ", = 1,1,0,0",
= “1,1,0,1”, = “1,1,1,0,0” and = “1,1,1,0,1”, as shown in FIG. 4 (C) Means 4 to 9 byte match respectively.

【0050】この手法は、出現確率の高いデータに対し
て、少ないビット数を割当てることにより、出現確率の
低いデータに異なるビット数を割当てた場合でも、一意
に復号化できるShannon- Fano 符号化又はHuffman符
号化として知られた方法である。なお、何バイト一致が
多いか否かは、被圧縮データの種類によって異なるので
調整を行う必要がある。
This method assigns a small number of bits to data with a high appearance probability, so that even if data with a low appearance probability is assigned a different number of bits, it can be uniquely decoded by Shannon-Fano coding or This is a method known as Huffman coding. It should be noted that how many bytes match or not depends on the type of data to be compressed, so it is necessary to make adjustments.

【0051】次に、本発明の第1の実施例に係る圧縮デ
ータの復元処理について説明をする。例えば、圧縮デー
タを利用した辞書データ又は辞書データ列と、順次、入
力される被復号データとを比較して一致するデータ又は
データ列を復号化する場合、図5の復号フローチャート
において、まず、ステップP1で辞書バッファ12Bを初
期化する。次に、ステップP2で圧縮データをファイル
17から入力バッファ12Aに読み込む。この際に、復号
化されていないデータを入力バッファ12Aの先頭位置に
移動する。
Next, the decompression processing of the compressed data according to the first embodiment of the present invention will be described. For example, when dictionary data or a dictionary data string using compressed data is sequentially compared with input data to be decoded to decode matching data or a data string, first, in the decoding flowchart of FIG. At P1, the dictionary buffer 12B is initialized. Next, in step P2, the compressed data is read from the file 17 into the input buffer 12A. At this time, the undecoded data is moved to the head position of the input buffer 12A.

【0052】次いで、ステップP3で復号化情報を解析
し、原データに戻す。例えば、CPU14により辞書バ
ッファ12B内に格納された辞書データ列と、入力バッフ
ァ12Aの被復号データ列とが比較される。その後、ステ
ップP4では復号化した原データをファイル11に格納
する。次に、ステップP5で復号化した入力データ列を
辞書バッファ12Bに移動する。この際に、CPU14
は、一致した部分(重複する部分)の辞書データ列を辞
書バッファ12Bのデータ書込み範囲から追い出し、この
データ列が追い出された辞書バッファ12Bのデータ書込
み範囲を先頭方向に詰める。
Next, in step P3, the decoded information is analyzed and the original data is restored. For example, the CPU 14 compares the dictionary data string stored in the dictionary buffer 12B with the data string to be decoded in the input buffer 12A. Thereafter, in step P4, the decrypted original data is stored in the file 11. Next, the input data sequence decoded in step P5 is moved to the dictionary buffer 12B. At this time, the CPU 14
Removes the dictionary data string of the matched part (overlapping part) from the data writing range of the dictionary buffer 12B, and narrows the data writing range of the dictionary buffer 12B from which this data string has been removed in the head direction.

【0053】また、CPU14は、入力バッファ12Aか
らデータ書込み範囲が詰められた辞書バッファ12Bに、
一致した被復号データ列を新たな辞書データとして書き
込む。その後、ステップP6で圧縮データを全て復元し
たか否かを判断する。この際に、圧縮データを全て圧縮
した場合(YES)には、制御アルゴリズムを終了し、圧
縮データを全て圧縮していない場合(NO)には、ステ
ップP2に戻って、被復号データ列をファイル17から
入力バッファ12Aに読み込み、以下のステップを継続す
る。
Further, the CPU 14 transfers the data from the input buffer 12A to the dictionary buffer 12B in which the data writing range is narrowed.
The matched decoded data string is written as new dictionary data. Thereafter, it is determined in step P6 whether all the compressed data has been restored. At this time, if all of the compressed data has been compressed (YES), the control algorithm is terminated, and if not all of the compressed data has been compressed (NO), the process returns to step P2, where the data string to be decoded is stored in a file. 17 to the input buffer 12A, and the following steps are continued.

【0054】これにより、被復元データを利用した辞書
データ列と、順次、入力される被復元データとを比較し
て一致するデータ列を復号化することができる。このよ
うにして、本発明の第1の実施例に係るデータ処理装置
によれば、図1に示すように、辞書データ列と被圧縮デ
ータ列とを比較して両データ列が一致した場合に、その
一致した部分の辞書データ列を辞書バッファ12Bから追
い出し、データ書込み範囲を一方向に詰めた辞書バッフ
ァ12Bに一致した被圧縮データ列を新たな辞書データと
して書き込むCPU14が設けられる。
Thus, it is possible to compare the dictionary data string using the restored data with the sequentially inputted restored data and decode the matching data string. In this manner, according to the data processing apparatus according to the first embodiment of the present invention, as shown in FIG. 1, when the dictionary data sequence and the compressed data sequence A CPU 14 is provided for flushing out the dictionary data string of the matched part from the dictionary buffer 12B and writing the compressed data string matched to the dictionary buffer 12B in which the data writing range is reduced in one direction as new dictionary data.

【0055】このため、入力データ列に重複した辞書バ
ッファ12B内の辞書データ列が、そのデータ書込み範囲
から外部等に追い出される。すなわち、図2(A)に示
したような符号化前のデータ検索状態で、データ列
「a,b,c」が一致したとすると、本発明の実施例で
は、図2(B)に示すように、辞書バッファ12Bのデー
タ書込み範囲の辞書データ=「a,b,c」=3バイト
が追い出される。
Therefore, the dictionary data string in the dictionary buffer 12B that overlaps with the input data string is expelled from the data writing range to the outside. That is, assuming that the data strings “a, b, c” match in the data search state before encoding as shown in FIG. 2A, in the embodiment of the present invention, as shown in FIG. As described above, the dictionary data = “a, b, c” = 3 bytes in the data writing range of the dictionary buffer 12B is expelled.

【0056】この結果、従来例のように、当該一致デー
タに関係しない辞書バッファ12Bの先頭位置に格納され
たデータ「x,y,z」を単に辞書バッファ12Bから追
い出すことが無くなる。これにより、図2(C)に示す
ような符号化後の状態では、辞書バッファ12Bにデータ
列「a,b,c」が重複して残ることが無くなる。一般
に、辞書データを増加すると、辞書バッファ自体の大き
さが増加し、圧縮率は低下するが、本発明の実施例で
は、辞書データの数は実質増えても、辞書バッファ自体
のメモリ容量、及び、圧縮後の符号ビットを増加しない
ところに大きな特長がある。
As a result, unlike the conventional example, the data "x, y, z" stored at the head position of the dictionary buffer 12B which is not related to the matching data is not simply expelled from the dictionary buffer 12B. As a result, in the state after the encoding as shown in FIG. 2C, the data string “a, b, c” does not remain in the dictionary buffer 12B. In general, when the dictionary data is increased, the size of the dictionary buffer itself is increased and the compression ratio is reduced. However, in the embodiment of the present invention, even if the number of dictionary data is substantially increased, the memory capacity of the dictionary buffer itself, and There is a great feature in that the number of code bits after compression is not increased.

【0057】また、本発明の実施例では、常に、異なっ
た種類の辞書データを辞書バッファ12Bに格納すること
ができ、従来例に比べて辞書バッファ12Bの冗長性が少
なくなり、データ圧縮率を高めることが可能となる。 (2)第2の実施例の説明 図6は、本発明の第2の実施例に係るデータ処理装置の
説明図であり、図6(A)は、その一致辞書バッファの
説明図である。図6(B)は、一致データの符号化の説
明図であり、図6(C)は、一致データの検索範囲の説
明図をそれぞれ示している。
Further, in the embodiment of the present invention, different types of dictionary data can always be stored in the dictionary buffer 12B, the redundancy of the dictionary buffer 12B is reduced as compared with the conventional example, and the data compression rate is reduced. It is possible to increase. (2) Description of Second Embodiment FIG. 6 is an explanatory diagram of a data processing device according to a second embodiment of the present invention, and FIG. 6A is an explanatory diagram of the matching dictionary buffer. FIG. 6B is an explanatory diagram of encoding of coincident data, and FIG. 6C is an explanatory diagram of a search range of coincident data.

【0058】第2の実施例では第1の実施例と異なり、
辞書データ列と被圧縮データ列とを比較する際に、辞書
バッファ12Bから追い出された辞書データ列を参照する
ものである。すなわち、本発明の第2のデータ処理装置
では、図1に示したように、辞書バッファ12Bから追い
出されたデータ又は辞書データ列を記憶する一致辞書バ
ッファ12Cを使用する。一致辞書バッファ12Cは、例え
ば、図6(A)に示すように、あるメモリ容量を有する
環状構造のバッファを用いる。環状構造のバッファにつ
いては、本発明の第4の実施例において詳述する。
In the second embodiment, unlike the first embodiment,
When comparing the dictionary data string with the compressed data string, the dictionary data string removed from the dictionary buffer 12B is referred to. That is, in the second data processing device of the present invention, as shown in FIG. 1, a coincidence dictionary buffer 12C for storing data or dictionary data strings expelled from the dictionary buffer 12B is used. As the match dictionary buffer 12C, for example, as shown in FIG. 6A, a buffer having an annular structure having a certain memory capacity is used. The circular buffer will be described in detail in a fourth embodiment of the present invention.

【0059】この一致辞書バッファ12Cは、先に辞書バ
ッファ12Bから追い出された古いデータ上に、新しく辞
書バッファ12Bから追い出されたデータを,順次、上書
きするものである。このような方式に対して、参照頻度
をカウントし、参照頻度の低いものを上書きしても良
い。これにより、処理速度を犠牲にしても圧縮率を上げ
たい場合等に効果的である。
The coincidence dictionary buffer 12C sequentially overwrites old data which has been previously evicted from the dictionary buffer 12B with data which has been newly evicted from the dictionary buffer 12B. For such a method, the reference frequency may be counted, and a method with a low reference frequency may be overwritten. This is effective when it is desired to increase the compression ratio even if the processing speed is sacrificed.

【0060】一致辞書バッファ12Cには参照ポインタ及
び格納ポインタが設定される。参照ポインタは、一致辞
書バッファ12Cを参照する位置を示す。格納ポインタは
辞書バッファ12Bから追い出された現在の辞書データを
格納する位置を示す。参照ポインタは格納ポインタの前
に設置する。これは、辞書バッファ12Bから追い出され
た最も新しい辞書データを検索するためである。
A reference pointer and a storage pointer are set in the match dictionary buffer 12C. The reference pointer indicates a position for referring to the matching dictionary buffer 12C. The storage pointer indicates a position for storing the current dictionary data evicted from the dictionary buffer 12B. The reference pointer is placed before the storage pointer. This is for searching for the newest dictionary data that has been evicted from the dictionary buffer 12B.

【0061】一致辞書バッファ12Cは辞書バッファ12B
よりもメモリ容量を大きめに採り、一致辞書バッファ12
Cの辞書データと辞書バッファ12Bの辞書データとが、
重複しないようにする。これは、辞書バッファ12Bから
追い出された一致データ列が、入力バッファ12Aから移
動してくるので、一致したデータ列が直ぐには辞書バッ
ファ12Bから無くならないからである。
The matching dictionary buffer 12C is a dictionary buffer 12B
The memory capacity is larger than that of the match dictionary buffer 12
The dictionary data of C and the dictionary data of dictionary buffer 12B are
Avoid duplication. This is because the matched data string that has been evicted from the dictionary buffer 12B moves from the input buffer 12A, and the matched data string does not immediately disappear from the dictionary buffer 12B.

【0062】なお、図6(A)において、網かけ部分
は、一致辞書バッファ12C内で辞書データを検索する範
囲を示している。この検索範囲は被圧縮データの符号化
によって制限されるが、本発明の実施例では、2バイト
一致が最も多い被圧縮データファイルを想定している。
従って、一致辞書バッファ12Cは2バイト一致のデータ
のみを格納する構造を採っている。
In FIG. 6A, a shaded portion indicates a range in which dictionary data is searched in the matched dictionary buffer 12C. Although this search range is limited by the encoding of the compressed data, the embodiment of the present invention assumes a compressed data file having the most 2-byte matches.
Therefore, the match dictionary buffer 12C has a structure that stores only 2-byte match data.

【0063】図6(B)は、一致辞書バッファ12Cの大
きさが2KBの場合の位置情報を圧縮データに付加した
データフォーマットを示している。図6(B)におい
て、本発明の第1の実施例と同様に、データ長が12ビ
ット(0〜2047)の場合に、長い位置情報値として
「1」が書き込まれる。なお、実際には、近傍一致をど
の範囲に設定するか、あるいは、複数の位置情報の刻み
を設けるなど、被圧縮データの種類に最も適した調整を
行う必要がある。この条件の中で、符号ビットを増加さ
せずに、一致辞書バッファ12Cとの対応付けをしたの
が、本発明の特徴である。
FIG. 6B shows a data format in which positional information when the size of the coincidence dictionary buffer 12C is 2 KB is added to the compressed data. In FIG. 6B, as in the first embodiment of the present invention, when the data length is 12 bits (0 to 2047), “1” is written as a long position information value. In practice, it is necessary to perform an adjustment most suitable for the type of the data to be compressed, for example, in what range the neighborhood match is set, or by providing a plurality of pieces of position information. It is a feature of the present invention that, under these conditions, the association with the match dictionary buffer 12C is performed without increasing the sign bit.

【0064】具体的には、図6(B)に示すように長い
位置情報の中で、短い位置情報の値、この場合、0〜1
27と重複している部分を割当てている。つまり、0〜
127の値は、短い位置情報で符号化されるため、長い
位置情報では出現しない。このことに着目したものであ
る。例えば、一致辞書の1番目には、1ビットの識別子
=「1」と、11ビットの符号語「000 0000
0000」とが書き込まれ、一致辞書の2番目には、1
ビットの識別子=「1」と、11ビットの符号語「00
0 0000 0001」とが書き込まれ、同様に、一
致辞書の3番目には、1ビットの識別子=「1」と、1
1ビットの符号語「000 00000010」とが書
き込まれる。
More specifically, as shown in FIG. 6B, among the long position information, the value of the short position information, in this case, 0 to 1
The part overlapping with 27 is assigned. That is, 0
Since the value of 127 is encoded with short position information, it does not appear in long position information. This is the focus on this. For example, in the first match dictionary, a 1-bit identifier = “1” and an 11-bit codeword “000 0000”
0000 "and the second in the match dictionary is 1
Bit identifier = “1” and 11-bit codeword “00”
0 0000 0001 ", and similarly, in the third match dictionary, a 1-bit identifier =“ 1 ”and 1
A one-bit code word “0000000000010” is written.

【0065】具体例としては、先に説明した図12(C)
の符号化後の入力バッファ2Aのデータ「r,e」と図
6(A)の一致辞書バッファ12Cの2番目の「r,e」
とが一致した場合、符号語「1 000 0000 0
001」のビット列が生成されることになる。この場合
に、長さは固定としているため、長さの符号は生成しな
いものとする。つまり、全体の識別ビットも含めて、合
計13ビットとなるため、原データのまま不一致となっ
た場合の2バイト(16ビット)よりも3ビット圧縮さ
れる。
As a specific example, FIG.
The data "r, e" in the input buffer 2A after the encoding of the data "2" and the second "r, e" in the match dictionary buffer 12C in FIG.
Are matched, the codeword "1000 0000 0
001 "is generated. In this case, since the length is fixed, no code for the length is generated. That is, since the total is 13 bits including the entire identification bits, the original data is compressed by 3 bits from 2 bytes (16 bits) when the original data is not matched.

【0066】このように図6(B)の例では、一致辞書
バッファ12Cは128個分の辞書データを持つことがで
きる。なお、可能な限り、辞書バッファ12Bからはみ出
した辞書データを検索可能とするために、一致辞書バッ
ファ12Cの大きさを,例えば、図6(C)に示すよう
に、256ビット分持つ。これを検索する場合、現在の
格納ポイントから常に、128ビットより前で検索す
る。
As described above, in the example of FIG. 6B, the matching dictionary buffer 12C can have 128 dictionary data. In order to make it possible to search for dictionary data that extends beyond the dictionary buffer 12B, the size of the matching dictionary buffer 12C is, for example, 256 bits as shown in FIG. 6C. When searching for it, always search before 128 bits from the current storage point.

【0067】これにより、実質的に辞書データ数が増加
し、一致辞書バッファ12Cを併用した移動窓によるデー
タ圧縮をすることができる。次に、本発明の第2の実施
例に係るデータ処理方法について、図7の処理フローチ
ャートを参照しながら当該装置の動作を説明する。図7
は、本発明の第2の実施例に係る一致辞書の生成フロー
チャートであり、図1に示したEPROM13に格納さ
れた制御アルゴリズムを成す。
As a result, the number of dictionary data is substantially increased, and data can be compressed by the moving window using the matched dictionary buffer 12C. Next, the operation of the data processing method according to the second embodiment of the present invention will be described with reference to the processing flowchart of FIG. FIG.
FIG. 5 is a flowchart of generating a match dictionary according to the second embodiment of the present invention, which forms a control algorithm stored in the EPROM 13 shown in FIG.

【0068】例えば、辞書バッファ12Bから追い出され
た辞書データを利用して、一致辞書を作成する場合、図
7のフローチャートにおいて、まず、ステップP1で辞
書バッファ12B内に一致するデータ部分が有ったか否か
を判断する。この際に、一致部分が有った場合(YES)
には、ステップP3に移行する。また、一致部分が無か
った場合(NO)には、ステップP2に移行して一致辞
書バッファ12C内を検索し、その後、一致辞書の生成を
行わずに終了する。
For example, when a matching dictionary is created using dictionary data that has been evicted from the dictionary buffer 12B, in the flowchart of FIG. 7, first in step P1, is there a matching data portion in the dictionary buffer 12B? Determine whether or not. At this time, if there is a match (YES)
The process proceeds to Step P3. If there is no matching part (NO), the process shifts to step P2 to search the matching dictionary buffer 12C, and thereafter ends without generating a matching dictionary.

【0069】ステップP1で一致部分が有った場合(Y
ES)には、ステップP3で2バイト一致か否か判断す
る。この際に、2バイト一致の場合(YES)には、ステ
ップP4に移行する。また、2バイト一致ではない場合
(NO)には、一致辞書の生成を行わずに終了する。ス
テップP3で2バイト一致の場合(YES)には、ステッ
プP4で一致辞書バッファ12C内に同じ辞書データが有
るか否か判断する。この際に、同じ辞書データが有る場
合(YES)には、一致辞書の生成を行わずに終了する。
If there is a match in step P1 (Y
In ES), it is determined in step P3 whether the two bytes match. At this time, if the two bytes match (YES), the program shifts to Step P4. If not a two-byte match (NO), the process ends without generating a match dictionary. If two bytes match in step P3 (YES), it is determined in step P4 whether the same dictionary data exists in the matching dictionary buffer 12C. At this time, if the same dictionary data exists (YES), the process ends without generating a matching dictionary.

【0070】ステップP4で一致辞書バッファ12C内に
同じ辞書データが無い場合(NO)には、ステップP5
に移行して、辞書バッファ12Bから追い出された辞書デ
ータを一致辞書バッファ12Cに格納する。その後、ステ
ップP6に移行して格納ポインタを次のビットに進め、
終了をする。これにより、辞書バッファ12Bから追い出
された辞書データを利用して、一致辞書を作成すること
ができ、辞書データ列と、入力された被圧縮データ列と
を比較する際に、辞書バッファ12Bから追い出された辞
書データ列を参照することができる。
If the same dictionary data does not exist in the matching dictionary buffer 12C in step P4 (NO), step P5
Then, the dictionary data expelled from the dictionary buffer 12B is stored in the matching dictionary buffer 12C. Thereafter, the flow shifts to step P6 to advance the storage pointer to the next bit,
Finish. As a result, it is possible to create a matching dictionary by using the dictionary data expelled from the dictionary buffer 12B. When comparing the dictionary data sequence with the input compressed data sequence, the matching dictionary is expelled from the dictionary buffer 12B. It can refer to the dictionary data string.

【0071】次に、本発明の第2の実施例に係る圧縮デ
ータの復元処理について説明をする。図8は、本発明の
第2の実施例に係る圧縮データの復元フローチャートで
あり、図1に示したEPROM13に格納された制御ア
ルゴリズムを成す。例えば、一致辞書バッファ12Cの辞
書データを参照しながら、被復号データを復号化する場
合、まず、ステップP1で一致辞書バッファ12C内に参
照符号が有るか否かを判断する。この際に、参照符号が
有った場合(YES)には、ステップP2に移行して一致
辞書バッファ12C内を参照し被復元データを復号化す
る。その後、一致辞書の生成を行わずに終了する。
Next, a description will be given of a process of restoring compressed data according to the second embodiment of the present invention. FIG. 8 is a flowchart for restoring compressed data according to the second embodiment of the present invention, which constitutes a control algorithm stored in the EPROM 13 shown in FIG. For example, when decoding the data to be decoded while referring to the dictionary data in the matching dictionary buffer 12C, first, in step P1, it is determined whether or not there is a reference code in the matching dictionary buffer 12C. At this time, if there is a reference code (YES), the flow shifts to step P2, where the data to be restored is decoded with reference to the match dictionary buffer 12C. After that, the process ends without generating a matching dictionary.

【0072】ステップP1で参照符号が無かった場合
(NO)には、ステップP3で2バイト一致か否か判断
する。この際に、2バイト一致の場合(YES)には、ス
テップP4に移行する。また、2バイト一致ではない場
合(NO)には、ステップP7に移行して一致辞書の生
成を行わずに通常の符号化処理を実行し、その後、終了
する。
If there is no reference code in step P1 (NO), it is determined in step P3 whether two bytes match. At this time, if the two bytes match (YES), the program shifts to Step P4. If it is not a two-byte match (NO), the process shifts to step P7 to execute a normal encoding process without generating a match dictionary, and thereafter ends.

【0073】ステップP3で2バイト一致の場合(YE
S)には、ステップP4で一致辞書バッファ12C内に同
じ辞書データが有るか否か判断する。この際に、同じ辞
書データが有る場合(YES)には、ステップP7に移行
して一致辞書の生成を行わずに通常の符号化処理を実行
し、その後、終了する。ステップP4で一致辞書バッフ
ァ12C内に同じ辞書データが無い場合(NO)には、ス
テップP5に移行して、辞書バッファ12Bから追い出さ
れた辞書データを一致辞書バッファ12Cに格納する。そ
の後、ステップP6に移行して格納ポインタを次のビッ
トに進め、さらに、ステップP7に移行して一致辞書の
生成を行わずに通常の符号化処理を実行し、その後、終
了する。
If two bytes match in step P3 (YE
In S), it is determined in step P4 whether the same dictionary data exists in the matching dictionary buffer 12C. At this time, if the same dictionary data exists (YES), the process shifts to step P7 to execute a normal encoding process without generating a matching dictionary, and thereafter ends. If the same dictionary data does not exist in the matching dictionary buffer 12C in step P4 (NO), the process proceeds to step P5, where the dictionary data expelled from the dictionary buffer 12B is stored in the matching dictionary buffer 12C. Thereafter, the flow shifts to step P6 to advance the storage pointer to the next bit. Further, the flow shifts to step P7 to execute a normal encoding process without generating a coincidence dictionary, and thereafter ends.

【0074】これにより、辞書バッファ12Bから追い出
された辞書データを利用して、一致辞書を作成すること
ができ、一致辞書バッファ12Cの辞書データを参照しな
がら、被復号データを復号化することができる。このよ
うにして、本発明の第2の実施例に係るデータ処理装置
によれば、図1に示したような一致辞書バッファ12Cが
設けられ、辞書バッファ12Bから追い出された辞書デー
タ列が当該バッファ12Cに記憶される。
As a result, it is possible to create a matching dictionary by using the dictionary data expelled from the dictionary buffer 12B, and to decode the data to be decoded while referring to the dictionary data in the matching dictionary buffer 12C. it can. As described above, according to the data processing apparatus according to the second embodiment of the present invention, the coincidence dictionary buffer 12C as shown in FIG. 1 is provided, and the dictionary data string evicted from the dictionary buffer 12B is stored in the buffer. Stored in 12C.

【0075】このため、辞書バッファ12Bのメモリ容量
を変えずに、過去に一致した実績がある辞書データ又は
辞書データ列を一致辞書バッファ12Cに記憶すること
で、参照できる辞書の数を実質的に増やすことができ
る。また、本発明の実施例では、辞書の数は実質増えて
も、符号化して残す辞書自体の大きさ及び、圧縮後の符
号ビットが増えない。
For this reason, by storing the dictionary data or the dictionary data string having the matched results in the past in the matched dictionary buffer 12C without changing the memory capacity of the dictionary buffer 12B, the number of dictionaries that can be referred to is substantially reduced. Can be increased. In the embodiment of the present invention, even if the number of dictionaries substantially increases, the size of the dictionary itself to be encoded and the number of code bits after compression do not increase.

【0076】辞書バッファ12Bからはみ出した一致デー
タ列は、補助辞書として一致辞書バッファ12Cを参照す
ることができる。すなわち、図7の処理フローチャート
に示すように、ステップP2で辞書バッファ12Bから追
い出された辞書データ列を参照しながら、辞書データ列
と、入力された被圧縮データ列とを比較することがで
き、原データのまま不一致として符号化されていたデー
タの圧縮率を向上させることが可能となる。
The matching data string that protrudes from the dictionary buffer 12B can refer to the matching dictionary buffer 12C as an auxiliary dictionary. That is, as shown in the processing flowchart of FIG. 7, the dictionary data string can be compared with the input compressed data string while referring to the dictionary data string expelled from the dictionary buffer 12B in step P2, It is possible to improve the compression ratio of data that has been encoded as inconsistent with the original data.

【0077】これにより、辞書バッファ12Bから追い出
された辞書データを有効に利用することができ、辞書バ
ッファ12B及び補助辞書バッファ12Cを併用した移動窓
によるデータ圧縮をすることが可能となる。また、過去
に一致した実績がある辞書データを利用してデータ圧縮
をすることができ、従来例に比べてデータ圧縮率を高め
ることが可能となる。
As a result, the dictionary data expelled from the dictionary buffer 12B can be effectively used, and data can be compressed by a moving window using both the dictionary buffer 12B and the auxiliary dictionary buffer 12C. In addition, data compression can be performed using dictionary data having a track record matched in the past, and the data compression ratio can be increased as compared with the conventional example.

【0078】(3)第3の実施例の説明 図9は、本発明の第3の実施例に係る固定辞書を利用し
たデータ処理方法の説明図であり、図9(A)は、その
固定辞書バッファの内容図である。図9(B)は、デー
タ圧縮時のフローチャートであり、図9(C)は、デー
タ復元時のフローチャートをそれぞれ示している。
(3) Description of Third Embodiment FIG. 9 is an explanatory diagram of a data processing method using a fixed dictionary according to a third embodiment of the present invention, and FIG. It is a contents figure of a dictionary buffer. FIG. 9B is a flowchart at the time of data compression, and FIG. 9C is a flowchart at the time of data restoration.

【0079】第3の実施例では第1,第2の実施例と異
なり、辞書データ列と被圧縮データ列とを比較する際
に、被圧縮データの中で予め調査された出現頻度の高い
固定データ又は固定データ列を参照するものである。す
なわち、本発明の第3のデータ処理装置では、図1に示
したように、被圧縮データの中で予め調査された出現頻
度の高い固定データ又は固定データ列を記憶する固定辞
書バッファ12Dを使用する。固定辞書バッファ12Dは、
例えば、図9(A)に示すように、出現頻度の高い文字
や記号,例えば、ローマ字の「i,f」、算術記号
「+,=」及び記述記号「),)」等の固定データを固
定辞書として格納するメモリである。
In the third embodiment, unlike the first and second embodiments, when comparing the dictionary data string and the compressed data string, the fixed data having a high frequency of appearance that has been examined in advance in the compressed data is used. It refers to data or a fixed data string. That is, in the third data processing device of the present invention, as shown in FIG. 1, a fixed dictionary buffer 12D for storing fixed data or fixed data strings having a high frequency of appearance that has been examined in advance in the compressed data is used. I do. The fixed dictionary buffer 12D
For example, as shown in FIG. 9A, fixed data such as characters and symbols having a high frequency of appearance, for example, Roman letters “i, f”, arithmetic symbols “+, =”, and descriptive symbols “),)” are used. This is a memory that is stored as a fixed dictionary.

【0080】固定辞書は、EPROM13内の圧縮及び
伸長制御プログラム内に持つ方法と、符号化された圧縮
データに付加する方法と2通りを採る。なお、予め、固
定辞書を持つためには、データの種類及び出現頻度の高
いデータ列を調査する必要がある。この固定データの種
類を判断する場合には、ファイルの拡張子から判断する
方法や使用者がキーボード15を介して指定する方法を
採る。
The fixed dictionary employs two methods: a method included in the compression / decompression control program in the EPROM 13 and a method of adding the data to encoded compressed data. In order to have a fixed dictionary in advance, it is necessary to investigate data types and data strings with a high frequency of appearance. When determining the type of the fixed data, a method of determining from the extension of the file or a method of designating by the user through the keyboard 15 is adopted.

【0081】出現頻度の高いデータ列は、例えば、2バ
イト一致ではどのパターンが多いか否か等を補助ツール
により、事前に、調べて置く。この場合に、出現頻度に
関係なく無条件に格納する方法に比べて、出現頻度が高
い一致バイト数のみを固定する方法が、使用メモリ及び
処理速度の面から現実的である。なお、この固定辞書作
成ツールをデータ圧縮ツールのプリプロセッサとして連
結しても良い。
For a data string having a high appearance frequency, for example, it is checked beforehand by an auxiliary tool whether or not there are many patterns in 2-byte matching. In this case, a method of fixing only the number of matching bytes having a high frequency of occurrence is more realistic than a method of storing unconditionally irrespective of the frequency of occurrence, in terms of memory used and processing speed. The fixed dictionary creation tool may be connected as a preprocessor of the data compression tool.

【0082】次に、本発明の第3の実施例に係るデータ
処理方法について、図9(B)の圧縮時の固定辞書参照
フローチャートを説明する。例えば、固定辞書バッファ
12Dの固定辞書データを利用して、データ圧縮する場
合、図9(B)のフローチャートにおいて、まず、ステ
ップP1で辞書バッファ12B内の辞書データを検索す
る。
Next, the data processing method according to the third embodiment of the present invention will be described with reference to the flowchart of FIG. 9B for referring to a fixed dictionary at the time of compression. For example, fixed dictionary buffer
In the case of compressing data using fixed dictionary data of 12D, in the flowchart of FIG. 9B, first, in step P1, dictionary data in the dictionary buffer 12B is searched.

【0083】次に、ステップP2で、一致するデータ部
分が有るか否かを判断する。この際に、一致部分が有っ
た場合(YES)には、固定辞書バッファ12Dを参照せず
に、辞書バッファ12Bの辞書データを利用してデータ圧
縮をする。ステップP2で、一致するデータ部分が無い
場合(NO)には、ステップP3に移行して、固定辞書
バッファ12D内を検索する。これにより、固定辞書バッ
ファ12Dの固定辞書データを利用して、データ圧縮する
ことができる。
Next, in step P2, it is determined whether or not there is a matching data portion. At this time, if there is a match (YES), the data is compressed using the dictionary data in the dictionary buffer 12B without referring to the fixed dictionary buffer 12D. If there is no matching data portion in step P2 (NO), the process moves to step P3, and the fixed dictionary buffer 12D is searched. Thus, the data can be compressed using the fixed dictionary data in the fixed dictionary buffer 12D.

【0084】次に、本発明の第2の実施例に係る圧縮デ
ータの復元処理について、復元時の固定辞書参照フロー
チャートを説明する。例えば、固定辞書バッファ12Dの
固定データを参照しながら、被復号データを復号化する
場合、図9(C)のフローチャートにおいて、まず、ス
テップP1で固定辞書バッファ12Dの固定符号が入力バ
ッファ12A内に有るか否かを判断する。この際に、入力
バッファ12A内に固定符号が有った場合(YES)には、
ステップP3に移行して固定辞書バッファ12D内を検索
し被復元データを復号化、その後、終了する。
Next, a compressed data decompression process according to the second embodiment of the present invention will be described with reference to a fixed dictionary reference flowchart at the time of decompression. For example, when decoding the data to be decoded while referring to the fixed data in the fixed dictionary buffer 12D, in the flowchart of FIG. 9C, first, in step P1, the fixed code of the fixed dictionary buffer 12D is stored in the input buffer 12A. It is determined whether or not there is. At this time, if there is a fixed code in the input buffer 12A (YES),
In Step P3, the fixed dictionary buffer 12D is searched to decode the data to be restored, and then the process ends.

【0085】ステップP1で固定符号が無かった場合
(NO)には、ステップP2で辞書バッファ12B内で符
号化処理を実行し、その後、終了する。これにより、固
定辞書バッファ12Dの固定データを参照しながら、被復
号データを復号化することができる。このようにして、
本発明の第3の実施例に係るデータ処理装置によれば、
図9(A)に示すような固定辞書バッファ12Dが設けら
れ、被圧縮データの中で予め調査された出現頻度の高い
固定データが辞書データとして当該バッファ12Dに書き
込まれる。
If there is no fixed code in step P1 (NO), an encoding process is executed in the dictionary buffer 12B in step P2, and the process is terminated. This makes it possible to decode the data to be decoded while referring to the fixed data in the fixed dictionary buffer 12D. In this way,
According to the data processing device according to the third embodiment of the present invention,
A fixed dictionary buffer 12D as shown in FIG. 9A is provided, and fixed data having a high appearance frequency, which has been checked in advance, among the data to be compressed is written to the buffer 12D as dictionary data.

【0086】このため、固定辞書バッファ12D内に出現
頻度の高いとして登録された辞書データと、被圧縮デー
タの中の固定データとが比較されることから、データ検
索速度の高速化を図ることが可能となる。この固定辞書
バッファ12Dを辞書バッファ12Bと併用することで、辞
書の数は実質増えるが、符号化して残す辞書自体の大き
さ、及び、圧縮後の符号ビットが増えない。
For this reason, the dictionary data registered as having a high frequency of appearance in the fixed dictionary buffer 12D is compared with the fixed data in the compressed data, so that the data search speed can be increased. It becomes possible. By using the fixed dictionary buffer 12D together with the dictionary buffer 12B, the number of dictionaries substantially increases, but the size of the dictionary itself to be encoded and the number of code bits after compression do not increase.

【0087】すなわち、図9(B)の処理フローチャー
トに示すように、ステップP3で被圧縮データの中で予
め調査された出現頻度の高い固定データを参照しなが
ら、辞書データと被圧縮データとを比較することができ
る。これにより、データ検索が従来例に比べて早くなる
ことから、データ圧縮処理の高速化を図ることが可能と
なる。なお、第2の実施例に比べて、第3の実施例では
一致辞書バッファ12Cの生成過程が不要となるため、デ
ータ処理速度が早くなる。本発明の実施例は被圧縮デー
タの種類が特定される用途に適している。
That is, as shown in the processing flow chart of FIG. 9B, the dictionary data and the compressed data are compared with each other by referring to the fixed data having a high frequency of appearance which has been checked in advance in the compressed data in step P3. Can be compared. As a result, since the data search is faster than in the conventional example, the speed of the data compression process can be increased. It should be noted that, compared to the second embodiment, in the third embodiment, the process of generating the matching dictionary buffer 12C is not required, so that the data processing speed is increased. Embodiments of the present invention are suitable for applications in which the type of compressed data is specified.

【0088】(4)第4の実施例の説明 図10は、本発明の第4の実施例に係るデータ処理装置の
説明図であり、図10(A)は、その環状辞書バッファの
構成図である。図10(B),(C)は、その環状辞書バ
ッファでの検索状態図をそれぞれ示している。第4の実
施例では第1,第3の実施例と異なり、辞書バッファ12
Bが環状構造を有する。
(4) Description of Fourth Embodiment FIG. 10 is an explanatory diagram of a data processing apparatus according to a fourth embodiment of the present invention, and FIG. 10 (A) is a configuration diagram of the circular dictionary buffer. It is. FIGS. 10B and 10C show search state diagrams in the circular dictionary buffer. In the fourth embodiment, unlike the first and third embodiments, the dictionary buffer 12
B has a cyclic structure.

【0089】本発明の第4のデータ処理装置では、図10
(A)に示すような環状辞書バッファ12Eが設けられ
る。第1の実施例の辞書バッファ12Bと異なるのは、第
4の実施例の環状辞書バッファ12Eでは、被圧縮データ
を辞書データとして書き込むメモリ領域を非終端ループ
状に接続する点である。このようにすると、実質的な辞
書データの数を増やすことができ、環状辞書バッファ12
Eを利用して入力バッファ12A内の連続したデータ列の
一致を検索することができる。これにより、第1の実施
例の辞書バッファ12Bを拡張した移動窓によりデータ圧
縮をすることが可能となる。
In the fourth data processing device of the present invention, FIG.
A circular dictionary buffer 12E as shown in FIG. The difference from the dictionary buffer 12B of the first embodiment is that in the circular dictionary buffer 12E of the fourth embodiment, a memory area for writing compressed data as dictionary data is connected in a non-terminal loop. In this way, the number of dictionary data can be substantially increased, and the circular dictionary buffer 12
Using E, it is possible to search for a match between consecutive data strings in the input buffer 12A. As a result, data compression can be performed using the moving window obtained by expanding the dictionary buffer 12B of the first embodiment.

【0090】すなわち、図10(B)に示すような環状辞
書バッファ12E内の辞書データを利用して入力バッファ
12Aに入力される被圧縮データを符号化する場合、ま
ず、原データ列を図1に説明したようなファイル11か
ら入力バッファ12Aに読み込む。この際に、符号化され
ていないデータを入力バッファ12Aの先頭位置に移動す
る。
That is, an input buffer using the dictionary data in the circular dictionary buffer 12E as shown in FIG.
When encoding the compressed data input to the input buffer 12A, first, the original data sequence is read from the file 11 as described in FIG. 1 into the input buffer 12A. At this time, the uncoded data is moved to the head position of the input buffer 12A.

【0091】例えば、図10(C)に示すように、数バイ
トの被圧縮データDin=u,i,m,a,d,f,r,
e,w…が入力バッファ12Aに入力される。入力バッフ
ァ12Aからの被圧縮データDinは環状辞書バッファ12E
にシフトされ、その結果、nバイトの辞書データ=i,
m,a,d,g,k,g…a,b,c,uが環状辞書バ
ッファ12Eに書き込まれる。
For example, as shown in FIG. 10C, several bytes of compressed data Din = u, i, m, a, d, f, r,
are input to the input buffer 12A. The compressed data Din from the input buffer 12A is stored in the circular dictionary buffer 12E.
And as a result, n-byte dictionary data = i,
m, a, d, g, k, g... a, b, c, u are written to the circular dictionary buffer 12E.

【0092】次いで、環状辞書バッファ12E内に一致す
るデータ列が有るか否かを検索する。例えば、環状辞書
バッファ12E内に格納された辞書データ列=u,i,
m,a,dと、入力バッファ12Aの被圧縮データ列=
u,i,m,a,dとが比較される。それが一致するこ
とから、これを符号化する。具体的には、一致データの
位置情報,その長さ情報等を符号化する。例えば、図10
(B)の一致データ列では、長い位置情報を示すことか
ら識別子が「1」であり、検索位置が入力バッファ12A
から見て環状辞書バッファ12Eの先頭位置にあることか
ら位置情報が「0」、最長一致データがu,i,m,
a,dとなることから「5」バイトとなる。
Next, it is searched whether or not there is a matching data string in the circular dictionary buffer 12E. For example, the dictionary data string stored in the circular dictionary buffer 12E = u, i,
m, a, and d, the compressed data string of the input buffer 12A =
u, i, m, a, and d are compared. This is coded because it matches. Specifically, position information of the coincident data, its length information, and the like are encoded. For example, FIG.
In the matching data string of (B), the identifier is "1" because it indicates long position information, and the search position is the input buffer 12A.
, The position information is “0” and the longest matching data is u, i, m,
Since it is a and d, it is "5" bytes.

【0093】また、図10(C)に示すように、数バイト
の被圧縮データDin=u,i,m,a,d,u,i,
m,a,d,u,i,m,a,d,x…が入力バッファ
12Aに入力され、入力バッファ12Aからの被圧縮データ
Dinが環状辞書バッファ12Eにシフトされると、その結
果、5バイトの辞書データ=i,m,a,d,uが環状
辞書バッファ12Eに書き込まれる。
As shown in FIG. 10 (C), several bytes of compressed data Din = u, i, m, a, d, u, i,
m, a, d, u, i, m, a, d, x ... are input buffers
When the compressed data Din input from the input buffer 12A is shifted to the circular dictionary buffer 12E, the 5-byte dictionary data = i, m, a, d, u is written to the circular dictionary buffer 12E. It is.

【0094】次いで、環状辞書バッファ12E内に一致す
るデータ列が有るか否かを検索する。例えば、環状辞書
バッファ12E内に格納された辞書データ列=i,m,
a,d,uと、入力バッファ12Aの被圧縮データ列=
u,i,m,a,d,u,i,m,a,d,u,i,
m,a,dとが比較される。それが3つのデータ列で一
致することから、これを符号化する。つまり、第4の実
施例では、入力バッファ12Aの15番目まで、一度に符
号化でき、符号化された圧縮データはファイル17に格
納される。
Next, it is searched whether or not there is a matching data string in the circular dictionary buffer 12E. For example, the dictionary data string stored in the circular dictionary buffer 12E = i, m,
a, d, u and the compressed data sequence of the input buffer 12A =
u, i, m, a, d, u, i, m, a, d, u, i,
m, a, and d are compared. This is coded because it matches in the three data strings. That is, in the fourth embodiment, up to the fifteenth input buffer 12A can be encoded at one time, and the encoded compressed data is stored in the file 17.

【0095】具体的には、一致データの位置情報,その
長さ情報等を符号化する。図10(C)の一致データ列で
は、長い位置情報を示すことから識別子が「1」であ
り、検索位置が入力バッファ12Aから見て環状辞書バッ
ファ12Eの先頭位置にあることから位置情報が「0」、
最長一致データがu,i,m,a,dとなることから
「5」バイトとなる。この際の符号化については、図4
において説明しているので参照されたい。
More specifically, the position information of the coincident data, its length information and the like are encoded. In the coincidence data string shown in FIG. 10C, the identifier is "1" because it indicates long position information, and the position information is " 0 ",
Since the longest match data is u, i, m, a, d, the length is "5" bytes. The encoding at this time is described in FIG.
Please refer to it because it is explained in.

【0096】なお、圧縮データを復元する場合には、同
じ環状辞書バッファ12Eを用い、第1の実施例と同様な
復元フローチャートに沿って復号することができるた
め、その説明を省略する。このようにして本発明の第4
の実施例に係るデータ処理装置によれば、図10(A)に
示すような環状辞書バッファ12Eが設けられる。
When the compressed data is decompressed, the same circular dictionary buffer 12E can be used for decoding in accordance with a decompression flowchart similar to that of the first embodiment. Thus, the fourth aspect of the present invention
According to the data processing device of this embodiment, a circular dictionary buffer 12E as shown in FIG. 10A is provided.

【0097】このため、非終端ループ状に接続されたメ
モリ領域に、以前に符号化した入力データ列を辞書デー
タとして書込むことができ、参照できる辞書の数を実質
的に増やすことができる。これにより、第1の実施例で
は辞書バッファ12Bを直線上に辞書データを検索する方
法しか採れなかったが、第2の実施例では辞書バッファ
12Eを環状に辞書データを検索することができる。これ
を利用して、入力データ列の中の連続した部分との最長
一致を検索し、その一致情報を符号化することができ
る。
Therefore, a previously encoded input data string can be written as dictionary data in a memory area connected in a non-terminal loop, and the number of dictionaries that can be referred to can be substantially increased. Thus, in the first embodiment, only the dictionary buffer 12B can be used to search the dictionary data on a straight line.
Dictionary data can be searched in a circular manner for 12E. By utilizing this, it is possible to search for the longest match with a continuous portion in the input data sequence and encode the match information.

【0098】このことから、第1の実施例では一致しな
かったデータ列が、第4の実施例では一致する可能性が
増加し、辞書バッファ12Eを拡張した移動窓によるデー
タ圧縮をすることが可能となる。 (5)第5の実施例の説明 図11は、本発明の第5の実施例に係るデータ圧縮方法の
説明図である。図11(A)は、あるメモリ領域を辞書バ
ッファ12B及び入力バッファ12Aとに分割した図であ
る。図11(B)は、その領域を分割する境界線を入力バ
ッファ12A側に移動した図をそれぞれ示している。
Thus, in the fourth embodiment, the possibility that a data string that did not match in the first embodiment matches will increase in the fourth embodiment, and data compression using a moving window obtained by expanding the dictionary buffer 12E can be performed. It becomes possible. (5) Description of Fifth Embodiment FIG. 11 is an explanatory diagram of a data compression method according to a fifth embodiment of the present invention. FIG. 11A is a diagram in which a certain memory area is divided into a dictionary buffer 12B and an input buffer 12A. FIG. 11B is a diagram in which a boundary line dividing the area has been moved to the input buffer 12A side.

【0099】第5の実施例では第1〜第4の実施例と異
なり、辞書用のメモリ領域に連続する入力用のメモリ領
域に書き込まれた被圧縮データ列が辞書データ列として
見なされるものである。すなわち、本発明の第5のデー
タ処理装置では、図11(A)に示すようにあるメモリ領
域を辞書バッファ12B及び入力バッファ12Aに分割した
際の境界(カーソル)線12Fを入力バッファ12A側に移
動する機能が付加される。この機能は、EPROM13
に制御アルゴリズムとして制御データを格納し、このデ
ータを例えばCPU14が読出して辞書制御をする。
In the fifth embodiment, unlike the first to fourth embodiments, the compressed data string written in the input memory area continuous with the dictionary memory area is regarded as a dictionary data string. is there. That is, in the fifth data processing device of the present invention, as shown in FIG. 11A, a boundary (cursor) line 12F when a certain memory area is divided into the dictionary buffer 12B and the input buffer 12A is shifted to the input buffer 12A side. The ability to move is added. This function is available in EPROM 13
, Control data is stored as a control algorithm, and this data is read out by the CPU 14, for example, and dictionary control is performed.

【0100】この際の辞書制御は、辞書データ列と被圧
縮データ列とを比較する際に、図11(A)から同図
(B)に示すように、境界線12Fを入力用のメモリ領域
の方向に移動する。辞書バッファ12Bは入力バッファ12
Aの領域に拡張されて辞書バッファ12B´となる。これ
により、辞書バッファ12B´と入力バッファ12Aとの間
で一致検索をすることができ、辞書データ列が書き込ま
れた辞書用のメモリ領域に連続する入力用のメモリ領域
の被圧縮データ列を辞書データ列として見なし、一致デ
ータを検索することができる。
In the dictionary control at this time, when comparing the dictionary data string with the compressed data string, as shown in FIGS. 11A and 11B, the boundary line 12F is input to the input memory area. Move in the direction of. The dictionary buffer 12B is the input buffer 12.
The area is expanded to the area A and becomes the dictionary buffer 12B '. As a result, a match search can be performed between the dictionary buffer 12B 'and the input buffer 12A, and the compressed data string in the input memory area continuous with the dictionary memory area in which the dictionary data string has been written is stored in the dictionary. It can be regarded as a data string and search for matching data.

【0101】具体的には、図11(A)の一致データ列で
は、長い位置情報を示すことから識別子が「1」であ
り、検索位置が入力バッファ12Aから見て辞書バッファ
12Aの3ビット目にあることから位置情報が「3」、最
長一致データがu,a,b,cとなることから「8」バ
イトとなる。なお、具体的な符号化の段階で圧縮率を上
げるための工夫は、第1の実施例と同様であるため、そ
の説明を省略する。
Specifically, in the coincidence data string shown in FIG. 11A, the identifier is "1" because it indicates long position information, and the search position is the dictionary buffer when viewed from the input buffer 12A.
The position information is "3" because of the third bit of 12A, and "8" bytes because the longest matching data is u, a, b and c. Note that a device for increasing the compression ratio at a specific encoding stage is the same as that in the first embodiment, and thus the description thereof is omitted.

【0102】また、圧縮データを復元する場合には、入
力バッファ12Aと辞書バッファ12Bとが重なる部分を1
つ1つ復元する。このようにして、本発明の第5の実施
例に係るデータ圧縮方法によれば、図11(B)に示すよ
うに、辞書用のメモリ領域に連続する入力用のメモリ領
域に書き込まれた被圧縮データ列が辞書データ列として
見なされる。
When the compressed data is decompressed, the portion where the input buffer 12A and the dictionary buffer 12B overlap is
Restore one by one. Thus, according to the data compression method according to the fifth embodiment of the present invention, as shown in FIG. 11B, the data written in the input memory area continuous with the dictionary memory area is obtained. The compressed data sequence is regarded as a dictionary data sequence.

【0103】このため、参照できる辞書データの数を実
質的に増やすことができ、辞書データ又は辞書データ列
を入力用のメモリ領域に拡張して、一致するデータ又は
データ列を検索することができる。これにより、入力用
のメモリ領域の被圧縮データ列同士を比較することが可
能となり、第1の実施例の検索方法に比べて、一致しな
かったデータが一致する可能性が増える。特に、辞書バ
ッファ12B内のデータ列の中で、境界線12Fの近傍のデ
ータ=u,a,b,cの並びと、同じデータ=u,a,
b,cの並びとが入力バッファ12Aに繰り返し出現する
ような場合に、最も効率良くデータ圧縮をすることが可
能となる。
Therefore, the number of dictionary data that can be referred to can be substantially increased, and the dictionary data or dictionary data string can be expanded to an input memory area to search for matching data or data string. . As a result, it becomes possible to compare the compressed data strings in the input memory area, and it is more likely that unmatched data will match as compared with the search method of the first embodiment. In particular, in the data string in the dictionary buffer 12B, the arrangement of data = u, a, b, c near the boundary line 12F and the same data = u, a,
When the arrangement of b and c repeatedly appears in the input buffer 12A, the data can be compressed most efficiently.

【0104】これにより、実質的に、辞書が増えたにも
かかわらず、辞書の大きさや符号化情報の大きさが増え
ず、第1の実施例に比べてデータ検索時間を短縮するこ
とができ、データ圧縮処理の高速化を図ることが可能と
なる。なお、表1は第1,第4及び第5の実施例に係る
データ圧縮方法を比較した結果を示している。表1はソ
フトウエア上で6339バイトのバイナリデータ及び3
177バイトのテキストデータを圧縮した場合の結果で
あり、原データ数に対する圧縮後のバイト数を示してい
る。
As a result, despite the fact that the number of dictionaries has increased, the size of the dictionaries and the size of the encoded information do not increase, and the data search time can be reduced as compared with the first embodiment. In addition, the speed of the data compression process can be increased. Table 1 shows the result of comparing the data compression methods according to the first, fourth and fifth embodiments. Table 1 shows 6339 bytes of binary data and 3 bytes on software.
This is the result when 177-byte text data is compressed, and shows the number of bytes after compression with respect to the number of original data.

【0105】[0105]

【表1】 [Table 1]

【0106】これによれば、第1の実施例では辞書バッ
ファ12Bを直線的に検索するために、バイナリデータで
は圧縮後のバイト数が4524バイトとなった。また、
テキストデータでは圧縮後のバイト数が1373バイト
となった。これに対して、第4の実施例では辞書バッフ
ァ12Dを環状に検索するために、バイナリデータでは圧
縮後のバイト数が4522バイトとなった。また、テキ
ストデータでは圧縮後のバイト数が1373バイトとな
った。
According to this, in the first embodiment, since the dictionary buffer 12B is searched linearly, the number of bytes of the binary data after compression becomes 4,524 bytes. Also,
In the text data, the number of bytes after compression was 1373 bytes. On the other hand, in the fourth embodiment, in order to search the dictionary buffer 12D in a circular manner, the number of bytes of the binary data after compression becomes 4522 bytes. In the text data, the number of bytes after compression was 1373 bytes.

【0107】第5の実施例では辞書バッファ12Bから入
力バッファ12Aを拡張して検索するために、バイナリデ
ータでは圧縮後のバイト数が4495バイトとなった。
また、テキストデータでは圧縮後のバイト数が1369
バイトとなった。このように第5の実施例では第1,第
4の実施例に比べてデータ圧縮率が向上していることは
明確であり、大容量のデータを取り扱う場合には、大き
な効果が期待できる。
In the fifth embodiment, since the input buffer 12A is expanded from the dictionary buffer 12B and searched, the number of compressed binary data is 4495 bytes.
In the case of text data, the number of bytes after compression is 1369.
It became a byte. As described above, it is clear that the data compression ratio is improved in the fifth embodiment as compared with the first and fourth embodiments, and a large effect can be expected when handling a large amount of data.

【0108】[0108]

【発明の効果】以上説明したように、本発明のデータ処
理装置によれば、辞書データ又は辞書データ列と被圧縮
データ又は被圧縮データ列とを比較し、これらデータ又
はデータ列とが一致した場合に、一致した部分のデータ
又はデータ列を辞書バッファから追い出し、その後、デ
ータ書込み範囲を一方向に詰めて新たな辞書データとし
て一致した被圧縮データ又は被圧縮データ列を書き込む
辞書制御手段が設けられる。
As described above, according to the data processing apparatus of the present invention, the dictionary data or the dictionary data string is compared with the compressed data or the compressed data string, and the data or the data string matches. In this case, dictionary control means is provided for flushing out the data or data string of the matched portion from the dictionary buffer, and then writing the matched compressed data or compressed data string as new dictionary data by narrowing the data writing range in one direction. Can be

【0109】このため、重複した辞書データ又は辞書デ
ータ列が、辞書バッファのデータ書込み範囲から外部等
に追い出されることにより、従来例のように、一致デー
タに関係しないデータを単に辞書バッファの先頭から追
い出すことが無くなり、常に、異なった種類の辞書デー
タを辞書バッファに格納することができ、辞書バッファ
の冗長性が少なくなる。
For this reason, the duplicated dictionary data or dictionary data string is expelled from the data writing range of the dictionary buffer to the outside or the like. Ejection does not occur, and different types of dictionary data can always be stored in the dictionary buffer, thereby reducing the redundancy of the dictionary buffer.

【0110】本発明の他のデータ処理装置によれば、辞
書バッファから追い出されたデータ又は辞書データ列を
記憶する補助辞書バッファが設けられる。このため、参
照できる辞書の数を実質的に増やすことができ、補助辞
書バッファ内の辞書データを参照しながら、データ圧縮
をすることができ、不一致として原データのまま符号化
されていたデータの圧縮率を向上させることが可能とな
る。
According to another data processor of the present invention, an auxiliary dictionary buffer is provided for storing data or dictionary data strings expelled from the dictionary buffer. For this reason, the number of dictionaries that can be referred to can be substantially increased, and data can be compressed while referring to the dictionary data in the auxiliary dictionary buffer. It is possible to improve the compression ratio.

【0111】本発明の他のデータ処理装置によれば、被
圧縮データの中で予め調査された出現頻度の高い固定デ
ータ又は固定データ列を辞書データとして書き込む固定
辞書バッファが設けられる。このため、固定辞書バッフ
ァ内の辞書データを参照しながら、データ圧縮をするこ
とができ、データ検索速度の高速化を図ることが可能と
なる。
According to another data processing apparatus of the present invention, a fixed dictionary buffer for writing fixed data or a fixed data string having a high frequency of appearance, which has been examined in advance in compressed data, as dictionary data is provided. Therefore, data can be compressed while referring to the dictionary data in the fixed dictionary buffer, and the data search speed can be increased.

【0112】本発明の他のデータ処理装置によれば、環
状構造を有する辞書バッファが設けられる。このため、
非終端ループ状のメモリ領域に書込まれた辞書データを
参照しながら、拡張した移動窓を当該辞書バッファ上に
スライドさせながら、データ圧縮をすることが可能とな
る。本発明のデータ処理方法によれば、辞書用のメモリ
領域に連続する入力用のメモリ領域の被圧縮データ又は
被圧縮データ列が辞書データ又は辞書データ列として利
用される。
According to another data processor of the present invention, a dictionary buffer having a circular structure is provided. For this reason,
The data can be compressed while sliding the extended moving window on the dictionary buffer while referring to the dictionary data written in the non-terminal loop-shaped memory area. According to the data processing method of the present invention, the data to be compressed or the data string to be compressed in the memory area for input which is continuous with the memory area for dictionary is used as the dictionary data or the dictionary data string.

【0113】このため、参照できる辞書データの数を実
質的に増やすことができ、辞書データ又は辞書データ列
を入力用のメモリ領域に拡張して、一致するデータ又は
データ列を検索することができる。これにより、辞書デ
ータを有効かつ高速に検索可能なデータ圧縮又は復元装
置を構成することができ、磁気ディスク装置等の許容記
憶容量を実質的に増加させることと、及び、データ伝送
時の送信時間の短縮化に寄与するところが大きい。
Therefore, the number of dictionary data that can be referred to can be substantially increased, and the dictionary data or the dictionary data string can be expanded to the input memory area to search for the matching data or data string. . As a result, a data compression or decompression device capable of searching dictionary data effectively and at high speed can be configured, and the allowable storage capacity of a magnetic disk device or the like can be substantially increased, and transmission time during data transmission can be improved. It greatly contributes to shortening of time.

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

【図1】本発明の各実施例に係るデータ処理装置の構成
図である。
FIG. 1 is a configuration diagram of a data processing device according to each embodiment of the present invention.

【図2】本発明の第1の実施例に係るデータ圧縮時の辞
書バッファの説明図である。
FIG. 2 is an explanatory diagram of a dictionary buffer at the time of data compression according to the first embodiment of the present invention.

【図3】本発明の第1の実施例に係るデータの圧縮フロ
ーチャートである。
FIG. 3 is a data compression flowchart according to the first embodiment of the present invention.

【図4】本発明の各実施例に係るデータ圧縮時の符号化
処理の説明図である。
FIG. 4 is an explanatory diagram of an encoding process at the time of data compression according to each embodiment of the present invention.

【図5】本発明の第1の実施例に係る圧縮データの復号
フローチャートである。
FIG. 5 is a flowchart for decoding compressed data according to the first embodiment of the present invention.

【図6】本発明の第2の実施例に係る一致辞書、データ
の符号化及びその検索範囲の説明図である。
FIG. 6 is an explanatory diagram of a matching dictionary, data encoding, and a search range thereof according to a second embodiment of the present invention.

【図7】本発明の第2の実施例に係る一致辞書の作成フ
ローチャートである。
FIG. 7 is a flowchart for creating a matching dictionary according to the second embodiment of the present invention.

【図8】本発明の第2の実施例に係る圧縮データの復号
フローチャートである。
FIG. 8 is a decoding flowchart of compressed data according to the second embodiment of the present invention.

【図9】本発明の第3の実施例に係る固定辞書を利用し
たデータ処理方法の説明図である。
FIG. 9 is an explanatory diagram of a data processing method using a fixed dictionary according to a third embodiment of the present invention.

【図10】本発明の第4の実施例に係る環状辞書バッファ
の説明図である。
FIG. 10 is an explanatory diagram of a circular dictionary buffer according to a fourth embodiment of the present invention.

【図11】本発明の第5の実施例に係る入力バッファ連続
構造の辞書バッファの説明図である。
FIG. 11 is an explanatory diagram of a dictionary buffer having an input buffer continuous structure according to a fifth embodiment of the present invention.

【図12】従来例に係るデータ圧縮方法の説明図である。FIG. 12 is an explanatory diagram of a data compression method according to a conventional example.

【図13】従来例に係る問題点を説明する符号化処理の状
態図である。
FIG. 13 is a state diagram of an encoding process for explaining a problem according to the conventional example.

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

11…原データファイル、 12…メモリ、 12A…入力バッファ、 12B…辞書バッファ、 12C…補助辞書(一致辞書)バッファ、 12D…固定辞書バッファ、 13…EPROM、 14…辞書制御手段(CPU)、 15…キーボード、 16…ディスプレイ、 17…圧縮データファイル、 18…バス。 11: Original data file, 12: Memory, 12A: Input buffer, 12B: Dictionary buffer, 12C: Auxiliary dictionary (match dictionary) buffer, 12D: Fixed dictionary buffer, 13: EPROM, 14: Dictionary control means (CPU), 15 ... keyboard, 16 ... display, 17 ... compressed data file, 18 ... bus.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平3−78322(JP,A) 特開 平3−204232(JP,A) 特開 平7−95093(JP,A) 特開 平7−297728(JP,A) (58)調査した分野(Int.Cl.7,DB名) H03M 7/40 ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-3-78322 (JP, A) JP-A-3-204232 (JP, A) JP-A-7-95093 (JP, A) JP-A-7- 297728 (JP, A) (58) Field surveyed (Int. Cl. 7 , DB name) H03M 7/40

Claims (8)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 被圧縮データを利用した辞書データ又は
辞書データ列を格納する辞書バッファを備え、順次、入
力される被圧縮データとを比較して一致する辞書データ
又は辞書データ列を符号化し、逆に、符号化された圧縮
データを復号化するときに、 前記辞書データ又は辞書データ列と、入力された前記被
圧縮データ又は被圧縮データ列とを比較して前記辞書デ
ータ又は辞書データ列と前記被圧縮データ又は被圧縮デ
ータ列とが一致した場合に、前記一致した部分の辞書デ
ータ又は辞書データ列を辞書バッファから追い出し、前
記辞書データ又は辞書データ列が追い出された辞書バッ
ファのデータ書込み範囲を一方向に詰め、前記データ書
込み範囲が詰められた辞書バッファに前記一致した被圧
縮データ又は被圧縮データ列を新たな辞書データとして
書き込む辞書制御手段が設けられることを特徴とするデ
ータ処理装置。
1. A dictionary buffer for storing dictionary data or a dictionary data string using compressed data, and sequentially comparing input dictionary data or dictionary data strings to encode matching dictionary data or dictionary data strings, Conversely, when decoding encoded compressed data, the dictionary data or dictionary data string is compared with the input compressed data or compressed data string and the dictionary data or dictionary data string. When the compressed data or the compressed data string matches, the dictionary data or dictionary data string of the matched portion is flushed from the dictionary buffer, and the data write range of the dictionary buffer from which the dictionary data or dictionary data string has been flushed out In one direction, and stores the matched compressed data or compressed data sequence in a new dictionary The data processing apparatus characterized by the dictionary control means for writing the data is provided.
【請求項2】 前記辞書バッファから追い出されたデー
タ又は辞書データ列を記憶する補助辞書バッファが設け
られることを特徴とする請求項1記載のデータ処理装
置。
2. The data processing apparatus according to claim 1, further comprising an auxiliary dictionary buffer for storing data or dictionary data strings evicted from said dictionary buffer.
【請求項3】 前記被圧縮データの中で予め調査された
出現頻度の高い固定データ又は固定データ列を辞書デー
タとして書き込んだ固定辞書バッファが設けられること
を特徴とする請求項1記載のデータ処理装置。
3. The data processing according to claim 1, further comprising a fixed dictionary buffer in which fixed data or a fixed data string having a high frequency of appearance, which has been checked in advance in the compressed data, is written as dictionary data. apparatus.
【請求項4】 前記辞書バッファは、被圧縮データを辞
書データとして書き込むメモリ領域を非終端ループ状に
接続した環状構造を有することを特徴とする請求項1記
載のデータ処理装置。
4. The data processing apparatus according to claim 1, wherein the dictionary buffer has a ring structure in which a memory area in which compressed data is written as dictionary data is connected in a non-terminal loop shape.
【請求項5】 被圧縮データを利用した辞書データ又は
辞書データ列と、順次、入力される被圧縮データとを比
較して一致するデータ又はデータ列を符号化し、逆に、
符号化された圧縮データを復号化するときに、 前記辞書データ又は辞書データ列と、入力された前記被
圧縮データ又は被圧縮データ列とを比較して前記辞書デ
ータ又は辞書データ列と前記被圧縮データ又は被圧縮デ
ータ列とが一致した場合に、前記一致した部分の辞書デ
ータ又は辞書データ列を辞書のデータ書込み範囲から追
い出し、前記データ又はデータ列が追い出された辞書の
データ書込み範囲を一方向に詰め、前記データ書込み範
囲が詰められた辞書に前記一致した被圧縮データ又は被
圧縮データ列を新たな辞書データとして書き込むことを
特徴とするデータ処理方法。
5. A dictionary data or dictionary data sequence using compressed data and input compressed data are sequentially compared to encode matching data or data sequence, and conversely,
When decoding the encoded compressed data, the dictionary data or dictionary data string is compared with the input compressed data or compressed data string, and the dictionary data or dictionary data string is compressed. When the data or the compressed data string matches, the dictionary data or dictionary data string of the matched portion is flushed from the dictionary data writing range, and the data or data string of the dictionary from which the data or data string is flushed is moved in one direction. And writing the matched compressed data or compressed data string as new dictionary data in the dictionary whose data writing range is reduced.
【請求項6】 前記辞書データ又は辞書データ列と、入
力された前記被圧縮データ又は被圧縮データ列とを比較
する際に、 前記辞書バッファから追い出されたデータ又は辞書デー
タ列を参照することを特徴とする請求項5記載のデータ
処理方法。
6. When comparing the dictionary data or dictionary data string with the input compressed data or compressed data string, referencing the data or dictionary data string expelled from the dictionary buffer. The data processing method according to claim 5, wherein:
【請求項7】 前記辞書データ又は辞書データ列と、入
力された前記被圧縮データ又は被圧縮データ列とを比較
する際に、 前記被圧縮データの中で予め調査された出現頻度の高い
固定データ又は固定データ列を参照することを特徴とす
る請求項5記載のデータ処理方法。
7. When the dictionary data or the dictionary data string is compared with the input compressed data or the compressed data string, fixed data having a high frequency of appearance that has been examined in advance in the compressed data. 6. The data processing method according to claim 5, wherein a fixed data sequence is referred to.
【請求項8】 前記辞書データ又は辞書データ列と、入
力された前記被圧縮データ又は被圧縮データ列とを比較
する際に、 前記辞書データ又は辞書データ列が書き込まれた辞書用
のメモリ領域に連続する入力用のメモリ領域に書き込ま
れた被圧縮データ又は被圧縮データ列を辞書データ又は
辞書データ列として見なすことを特徴とする請求項5記
載のデータ処理方法。
8. When comparing the dictionary data or the dictionary data string with the input compressed data or the compressed data string, the dictionary data or the dictionary data string is stored in a dictionary memory area in which the dictionary data or the dictionary data string is written. 6. The data processing method according to claim 5, wherein the compressed data or the compressed data sequence written in the continuous input memory area is regarded as dictionary data or a dictionary data sequence.
JP25101694A 1994-10-17 1994-10-17 Data processing device and data processing method Expired - Fee Related JP3242795B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP25101694A JP3242795B2 (en) 1994-10-17 1994-10-17 Data processing device and data processing method
US08/505,760 US5635932A (en) 1994-10-17 1995-07-21 Lempel-ziv compression with expulsion of dictionary buffer matches
US08/813,943 US5748122A (en) 1994-10-17 1997-03-03 Data processing apparatus and data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25101694A JP3242795B2 (en) 1994-10-17 1994-10-17 Data processing device and data processing method

Publications (2)

Publication Number Publication Date
JPH08116269A JPH08116269A (en) 1996-05-07
JP3242795B2 true JP3242795B2 (en) 2001-12-25

Family

ID=17216383

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25101694A Expired - Fee Related JP3242795B2 (en) 1994-10-17 1994-10-17 Data processing device and data processing method

Country Status (1)

Country Link
JP (1) JP3242795B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4013716B2 (en) 2002-09-19 2007-11-28 富士ゼロックス株式会社 Image processing device
JP4600342B2 (en) * 2006-04-21 2010-12-15 船井電機株式会社 Data compression program
JP5521501B2 (en) * 2009-11-09 2014-06-18 セイコーエプソン株式会社 Image processing apparatus and image processing method
JP6032291B2 (en) 2012-12-19 2016-11-24 富士通株式会社 Compression program, compression apparatus, decompression program, decompression apparatus, and system
WO2014097359A1 (en) * 2012-12-19 2014-06-26 富士通株式会社 Compression program, compression method, compression device and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2940948B2 (en) * 1989-08-22 1999-08-25 富士通株式会社 Data compression method
US5001478A (en) * 1989-12-28 1991-03-19 International Business Machines Corporation Method of encoding compressed data
US5384567A (en) * 1993-07-08 1995-01-24 International Business Machines Corporation Combination parallel/serial execution of sequential algorithm for data compression/decompression
US5525982A (en) * 1994-04-15 1996-06-11 International Business Machines Corporation Method and means for character string pattern matching for compression and the like using minimal cycles per character

Also Published As

Publication number Publication date
JPH08116269A (en) 1996-05-07

Similar Documents

Publication Publication Date Title
JP3541930B2 (en) Encoding device and decoding device
JP3273119B2 (en) Data compression / decompression device
US5870036A (en) Adaptive multiple dictionary data compression
US5229768A (en) Adaptive data compression system
KR100527891B1 (en) Method of performing huffman decoding
JP3141001B2 (en) Encoding method, data compressor, and recording medium recording computer program
JP3141002B2 (en) Encoding method and data compressor
US10476518B1 (en) Hardware friendly data compression
JP3241788B2 (en) Data compression method
JPH06168096A (en) Data encoding system and data decoding system
JP3242795B2 (en) Data processing device and data processing method
JP2536422B2 (en) Data compression device and data decompression device
JP3038223B2 (en) Data compression method
JP3241787B2 (en) Data compression method
JP3105598B2 (en) Data compression method using universal code
US6262675B1 (en) Method of compressing data with an alphabet
JP3350118B2 (en) Data encoding method and data restoration method
JPH05152971A (en) Data compressing/restoring method
US6819272B2 (en) System, method and computer readable medium for compressing a data sequence for partial decompressing
JP3078601B2 (en) Data compression method
JP2825960B2 (en) Data compression method and decompression method
JP2999587B2 (en) Data compression and decompression method
JP2003318739A (en) System and method for compressing data sequence, and computer readable medium
JP3051501B2 (en) Data compression method
JP3012679B2 (en) Data compression method

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20011009

LAPS Cancellation because of no payment of annual fees