JP3132774B2 - Data compression / decompression device - Google Patents

Data compression / decompression device

Info

Publication number
JP3132774B2
JP3132774B2 JP34571191A JP34571191A JP3132774B2 JP 3132774 B2 JP3132774 B2 JP 3132774B2 JP 34571191 A JP34571191 A JP 34571191A JP 34571191 A JP34571191 A JP 34571191A JP 3132774 B2 JP3132774 B2 JP 3132774B2
Authority
JP
Japan
Prior art keywords
dictionary
character string
registered
data
search
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
JP34571191A
Other languages
Japanese (ja)
Other versions
JPH05181641A (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 JP34571191A priority Critical patent/JP3132774B2/en
Publication of JPH05181641A publication Critical patent/JPH05181641A/en
Application granted granted Critical
Publication of JP3132774B2 publication Critical patent/JP3132774B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明はデータ圧縮・復元装置に
関し、特にユニバーサル符号化及び復号化によるデータ
の圧縮及び復元を行うデータ圧縮・復元装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data compression / decompression device, and more particularly to a data compression / decompression device for compressing and decompressing data by universal encoding and decoding.

【0002】近年、著しい技術開発によって、コンピュ
ータの処理速度及び記憶容量等は飛躍的な発展を遂げつ
つある。しかし、コンピュータでベクトル情報及び画像
情報等のデータを扱うようになってからは、従来以上に
取り扱うデータ量が増加しつつある。このようなデータ
量の大幅な増加に対処するため、データの内容を損なわ
ずにデータ量を減らす種々のデータ圧縮方式が提案され
ている。
In recent years, due to remarkable technological development, the processing speed, storage capacity, and the like of computers have been dramatically improved. However, since the computer handles data such as vector information and image information, the amount of data handled is increasing more than ever. In order to cope with such a large increase in the data amount, various data compression methods have been proposed for reducing the data amount without losing the data contents.

【0003】これらのデータ圧縮方式は、データに含ま
れる冗長な部分を省いて符号化することによって、デー
タを圧縮する方式である。データ圧縮方式によって、デ
ータ量を減らすことができ、結果的に記憶容量を減らす
ことができる。また、通信では圧縮したデータを伝送す
ることによって、同一内容の情報を速く伝送することが
できる。
[0003] These data compression schemes are schemes for compressing data by encoding without redundant portions included in the data. With the data compression method, the data amount can be reduced, and as a result, the storage capacity can be reduced. In communication, by transmitting compressed data, the same information can be transmitted at high speed.

【0004】なお、「文字(Character )」及び「文字
列(Character String)」の定義はJIS−C6230
に従うほか、情報理論で用いられている呼称を踏襲し、
1ワード単位で構成されるデータを「文字」と呼び、任
意のワード単位で構成されるデータを「文字列」と呼ぶ
ことにする。
[0004] The definition of "Character" and "Character String" are defined in JIS-C6230.
In addition to following the names used in information theory,
Data composed of one word unit is called a "character", and data composed of an arbitrary word unit is called a "character string".

【0005】[0005]

【従来の技術】従来、上記のようなデータを圧縮する一
例として、ユニバーサル符号化方式が提案されている。
ユニバーサル符号化方式の代表的な例として、LZ(Le
mpel-Ziv)符号化法と算術符号化法とがある。また、L
Z符号化法には、ユニバーサル型と増分分解型(Increm
ental persing )のアルゴリズムが提案されている。さ
らに、これらのアルゴリズムを改良した符号化法とし
て、ユニバーサル型に属するLZSS符号化法と、増分
分解型に属するLZW(Lempel-Ziv-Welch)符号化法と
がある。
2. Description of the Related Art Conventionally, a universal coding method has been proposed as an example of compressing the above data.
As a typical example of the universal encoding method, LZ (Le
mpel-Ziv) coding method and arithmetic coding method. Also, L
Z encoding methods include universal type and incremental decomposition type (Increm
ental persing) algorithm has been proposed. Furthermore, there are LZSS encoding methods belonging to the universal type and LZW (Lempel-Ziv-Welch) encoding methods belonging to the incremental decomposition type as encoding methods in which these algorithms are improved.

【0006】なお、LZ符号化法は、例えば、宗像清治
著「Lempel-Zivデータ圧縮法」、情報処理、pp.2〜6, V
ol.26, No.1, 1985 に詳しく掲載されている。また、L
ZSS符号化法は、T.C. Bell, "Better OPM/L Text Co
mpression", IEEE Trans.onCommu., Vol.COM-34, No.1
2, Dec.1986 に詳しく掲載されている。さらに、LZW
符号化法は、T.A. Welch, "A Technique for High-Perf
ormance Data Compression", Computer, Jun.1984 に詳
しく掲載されている。そして、増分分解型の符号化法及
びLZW符号化法は、特開昭59−231683号、米国特許N
o. 4,558,302号において開示されている。
The LZ encoding method is described in, for example, “Lempel-Ziv Data Compression Method” by Seiji Munakata, Information Processing, pp. 2-6, V
ol.26, No.1, 1985. Also, L
ZSS encoding is described in TC Bell, "Better OPM / L Text Co.
mpression ", IEEE Trans.onCommu., Vol.COM-34, No.1
2, Dec.1986. Furthermore, LZW
The encoding method is described in TA Welch, "A Technique for High-Perf
Ormance Data Compression ", Computer, Jun. 1984. An incremental decomposition type encoding method and an LZW encoding method are described in JP-A-59-231683, U.S. Pat.
o. 4,558,302.

【0007】これらの符号化法のうち、高速処理がで
き、アルゴリズムが簡単であるという利点から、一般的
にLZW符号化法が使用されてきた。LZW符号化法
は、書き換え可能な辞書をもち、以下に示す処理によっ
て符号化を行う方法である。まず、新規の入力文字列を
相異なる部分文字列に分割し、この部分文字列が辞書に
登録されてなければ、出現した順に識別番号を付して全
て辞書に登録する。同時に、現在入力している部分文字
列のうち、最長の部分文字列と一致する部分文字列を辞
書から選択し、選択した部分文字列に付されている識別
番号で符号化する。
[0007] Among these coding methods, the LZW coding method has been generally used because of its advantages of high-speed processing and simple algorithm. The LZW encoding method has a rewritable dictionary and performs encoding by the following processing. First, a new input character string is divided into different partial character strings, and if this partial character string is not registered in the dictionary, it is assigned an identification number in the order of appearance and registered in the dictionary. At the same time, of the currently input partial character strings, a partial character string that matches the longest partial character string is selected from the dictionary, and is encoded with the identification number assigned to the selected partial character string.

【0008】以下、LZW符号化法を使用したデータ圧
縮回路及びデータ復元回路の詳細について説明する。図
15は、従来のデータ圧縮回路を示す図である。図にお
いて、従来のデータ圧縮回路は、辞書検索手段121、
辞書登録手段122、ユニバーサル符号化手段123及
び辞書D12から構成される。
The details of a data compression circuit and a data decompression circuit using the LZW encoding method will be described below. FIG. 15 is a diagram showing a conventional data compression circuit. In the figure, a conventional data compression circuit includes a dictionary search unit 121,
It comprises a dictionary registration unit 122, a universal encoding unit 123, and a dictionary D12.

【0009】辞書検索手段121は、辞書D12に登録
されている登録文字列のうち、入力された入力文字列と
一致する登録文字列を検索する。辞書登録手段122
は、辞書検索手段121によって検索できなかった入力
文字列に識別番号を付して辞書122に登録する。ユニ
バーサル符号化手段123は、辞書検索手段121によ
って検索された登録文字列に付された識別番号、あるい
は辞書登録手段122によって入力文字列に新たに付さ
れた識別番号を出力符号に符号化する。
The dictionary search means 121 searches the registered character strings registered in the dictionary D12 for a registered character string that matches the input character string. Dictionary registration means 122
Adds an identification number to an input character string that could not be searched by the dictionary search means 121 and registers it in the dictionary 122. The universal encoding unit 123 encodes an identification number assigned to the registered character string searched by the dictionary search unit 121 or an identification number newly assigned to the input character string by the dictionary registration unit 122 into an output code.

【0010】辞書検索手段121、辞書登録手段122
及びユニバーサル符号化手段123の符号化処理は、シ
ーケンシャルに行われる。この符号化処理手順の一例を
図16に示す。
[0010] Dictionary search means 121, dictionary registration means 122
The encoding process of the universal encoding unit 123 is performed sequentially. FIG. 16 shows an example of the encoding processing procedure.

【0011】図16は、従来のデータ圧縮回路による処
理手順を示す図である。図には、処理文字数欄125、
辞書検索欄126、辞書登録欄127及び符号化欄12
8からなる表を示す。
FIG. 16 is a diagram showing a processing procedure by a conventional data compression circuit. In the figure, the processing character number column 125,
Dictionary search field 126, dictionary registration field 127, and encoding field 12
8 shows a table.

【0012】処理文字数欄125には、入力文字列が符
号化される際に処理される先頭からの文字順位を示す。
辞書検索欄126は、図15の辞書検索手段121が処
理する内容を示す。辞書登録欄127は、辞書登録手段
122が処理する内容を示す。符号化欄128は、ユニ
バーサル符号化手段123が処理する内容を示す。な
お、円内の数字は処理手順の順番を示す。以下、「円内
の数字X」を「サイクルX」と表記する。
The number-of-characters-to-be-processed column 125 indicates the order of characters from the beginning to be processed when the input character string is encoded.
The dictionary search field 126 shows the contents processed by the dictionary search means 121 in FIG. The dictionary registration column 127 indicates the content processed by the dictionary registration unit 122. The encoding column 128 indicates the content processed by the universal encoding means 123. The number in the circle indicates the order of the processing procedure. Hereinafter, “the number X in a circle” is referred to as “cycle X”.

【0013】まず、サイクル1〜サイクル3では、入力
された入力文字列の最初の1文字について、辞書登録手
段122が辞書D12を検索する過程を示す。具体的に
は、辞書検索の結果、入力文字列と登録文字列がサイク
ル1及びサイクル2では一致せず、サイクル3で一致し
たことを示す。
First, in cycles 1 to 3, a process in which the dictionary registration means 122 searches the dictionary D12 for the first character of the input character string is shown. More specifically, as a result of the dictionary search, the input character string and the registered character string do not match in cycles 1 and 2, but indicate that they match in cycle 3.

【0014】次に、サイクル4〜サイクル6では、入力
された入力文字列の2文字目について、辞書登録手段1
22が辞書D12を検索する過程を示す。具体的には、
入力文字列と登録文字列がサイクル4及びサイクル5で
は一致せず、サイクル6では辞書に登録されている文字
が無いことを示す。
Next, in cycle 4 to cycle 6, the dictionary registration means 1 registers the second character of the input character string.
Reference numeral 22 denotes a process of searching the dictionary D12. In particular,
The input character string and the registered character string do not match in cycles 4 and 5, and cycle 6 indicates that there is no character registered in the dictionary.

【0015】このとき、辞書登録手段122が入力文字
列に識別番号を付して辞書D12に登録する。これがサ
イクル7に示す「登録」である。また、符号化するため
に、ユニバーサル符号化手段123が辞書登録の際に付
した識別番号を符号化する。これがサイクル8に示す
「符号化」である。以下、同様に符号化処理が行われ
る。
At this time, the dictionary registration means 122 adds an identification number to the input character string and registers it in the dictionary D12. This is the “registration” shown in cycle 7. Further, in order to perform encoding, the universal encoding unit 123 encodes an identification number given at the time of dictionary registration. This is the “encoding” shown in cycle 8. Hereinafter, the encoding process is performed similarly.

【0016】また、図17は、従来のデータ復元回路を
示す図である。図において、従来のデータ復元回路は、
ユニバーサル復号化手段131、辞書検索手段132、
スタック蓄積手段133、辞書登録手段134及び辞書
D13から構成される。
FIG. 17 is a diagram showing a conventional data restoration circuit. In the figure, the conventional data restoration circuit
Universal decryption means 131, dictionary search means 132,
It comprises a stack storage unit 133, a dictionary registration unit 134, and a dictionary D13.

【0017】ユニバーサル復号化手段131は、入力さ
れた入力符号を復号化する。辞書検索手段121は、辞
書D13に登録されている登録文字符号のうち、復号化
された文字符号と一致する文字符号を検索する。スタッ
ク蓄積手段133は、辞書検索手段121によって検索
された文字をスタックに蓄積し、検索が終了した時点で
蓄積した文字を全て出力する。辞書登録手段134は、
スタック蓄積手段133によって出力された復元文字列
が辞書D13に登録されていない場合に、この復元文字
列に新たな符号を付して辞書D13に登録する。
The universal decoding means 131 decodes the input code. The dictionary search unit 121 searches the registered character codes registered in the dictionary D13 for a character code that matches the decoded character code. The stack storage unit 133 stores the characters searched by the dictionary search unit 121 in a stack, and outputs all the stored characters when the search is completed. Dictionary registration means 134
If the restored character string output by the stack storage unit 133 is not registered in the dictionary D13, the restored character string is assigned a new code and registered in the dictionary D13.

【0018】これら、ユニバーサル復号化手段131、
辞書検索手段132、スタック蓄積手段133及び辞書
登録手段134の復号化処理は、シーケンシャルに行わ
れる。この復号化処理手順の一例を図18に示す。
These universal decoding means 131,
The decryption processing of the dictionary search unit 132, the stack storage unit 133, and the dictionary registration unit 134 is performed sequentially. FIG. 18 shows an example of this decoding processing procedure.

【0019】図18は、従来のデータ復元回路による処
理手順を示す図である。図には、処理符号数欄136、
復号化欄137、検索・蓄積欄138、文字列出力欄1
39及び辞書登録欄140からなる表を示す。
FIG. 18 is a diagram showing a processing procedure by a conventional data restoration circuit. In the figure, the processing code number column 136,
Decryption field 137, search / accumulation field 138, character string output field 1
39 shows a table composed of 39 and a dictionary registration field 140.

【0020】処理符号数欄136は、入力符号が復号化
される際に処理される符号数を示す。復号化欄137
は、図17のユニバーサル復号化手段131が処理する
内容を示す。検索・蓄積欄138は、辞書検索手段13
2が検索し、スタック蓄積手段133が検索された文字
を蓄積する処理を示す。文字列出力欄139は、スタッ
ク蓄積手段133が蓄積した文字を全て出力する処理を
示す。なお、円内の数字は処理手順の順番を示す。以
下、図16と同様に、「円内の数字X」を「サイクル
X」と表記する。
The processing code number column 136 indicates the number of codes to be processed when the input code is decoded. Decryption field 137
Indicates the contents to be processed by the universal decoding means 131 in FIG. The search / accumulation column 138 stores the dictionary search means 13
2 shows a process in which the stack storage means 133 stores the searched characters. The character string output column 139 shows a process of outputting all the characters accumulated by the stack accumulation means 133. The number in the circle indicates the order of the processing procedure. Hereinafter, similarly to FIG. 16, “the number X in a circle” is described as “cycle X”.

【0021】まず、サイクル1〜サイクル8では、入力
された最初入力符号列について、復号化及び出力文字列
として出力するまでの過程を示す。具体的に、各処理手
順は次のようになっている。サイクル1では、ユニバー
サル復号化手段131が入力符号を復号化する。サイク
ル2〜サイクル4では、辞書検索手段132がサイクル
1で復号化された文字符号を再帰的に検索して、スタッ
ク蓄積手段133が検索された文字をスタックに蓄積す
る。サイクル5〜サイクル7では、スタック蓄積手段1
33が蓄積した文字を全て出力する。サイクル8では、
辞書登録手段134がスタック蓄積手段133によって
出力された出力文字列に新たな符号を付して辞書D13
に登録する。以下、同様に復号化処理が行われる。
First, in a cycle 1 to a cycle 8, a process from decoding of an input first input code string to outputting as an output character string is shown. Specifically, each processing procedure is as follows. In cycle 1, the universal decoding means 131 decodes the input code. In cycles 2 to 4, the dictionary search unit 132 recursively searches for the character code decoded in cycle 1, and the stack storage unit 133 stores the searched character in the stack. In cycle 5 to cycle 7, the stack storage unit 1
33 outputs all the stored characters. In cycle 8,
The dictionary registration unit 134 assigns a new code to the output character string output by the stack
Register with. Hereinafter, the decoding process is performed similarly.

【0022】[0022]

【発明が解決しようとする課題】しかし、従来のデータ
圧縮回路では、ある文字列に対して辞書検索、辞書登録
及び符号化を行なった後に、次の文字列を符号化する、
というようなバッチ・シリアル処理で圧縮処理を行なっ
ていた。また、データ復元回路でも同様に、ある符号に
対して復号化、辞書検索、スタック蓄積、辞書登録を行
なった後に、次の符号を復号化する、というようなバッ
チ・シリアル処理で復元処理を行なっていた。
However, in the conventional data compression circuit, after performing a dictionary search, dictionary registration and encoding for a certain character string, the next character string is encoded.
Such compression processing was performed by batch serial processing. Similarly, the data restoration circuit performs restoration processing by batch serial processing, such as decoding a certain code, searching a dictionary, accumulating stacks, and registering a dictionary, and then decoding the next code. I was

【0023】したがって、このようなバッチ・シリアル
処理では、符号化及び復号化処理の高速化が困難である
という問題点があった。本発明はこのような点に鑑みて
なされたものであり、入力データの圧縮処理を並列処理
により高速化するデータ圧縮回路を提供することを目的
とする。
Therefore, in such batch serial processing, there is a problem that it is difficult to speed up the encoding and decoding processes. The present invention has been made in view of such a point, and an object of the present invention is to provide a data compression circuit that speeds up the compression processing of input data by parallel processing.

【0024】また、本発明の他の目的は、入力符号の復
元処理を並列処理により高速化するデータ復元回路を提
供することである。さらに、本発明の他の目的は、入力
データの圧縮処理及び入力符号の復元処理を、並列処理
により高速化するデータ圧縮・復元装置を提供すること
である。
It is another object of the present invention to provide a data restoration circuit which speeds up restoration processing of an input code by parallel processing. Still another object of the present invention is to provide a data compression / decompression device that speeds up the compression processing of input data and the decompression processing of input codes by parallel processing.

【0025】[0025]

【課題を解決するための手段】本発明では上記目的を達
成するために、図1に示すように、データ圧縮回路は第
1の辞書検索手段1、第1の辞書登録手段2、符号化手
段3、初期辞書アクセス手段4、通常辞書アクセス手段
5、初期辞書D1及び通常辞書D2から構成する。第1
の辞書検索手段1は、初期辞書アクセス手段4を介して
初期辞書D1に登録されている登録文字列のうち、入力
された入力文字列と一致する最長の登録文字列を検索す
る。初期辞書D1で検索できなかった場合は検索を終了
する。また、検索できた場合には通常辞書アクセス手段
5を介して通常辞書D2に登録されている登録文字列か
ら検索する。第1の辞書登録手段2は、第1の辞書検索
手段1によって検索された最長の登録文字列に一文字を
加えた文字列に識別番号を付し、通常辞書アクセス手段
5を介して通常辞書D2に登録する。符号化手段3は、
最長の登録文字列に付された識別番号を、出力符号とし
て符号化する。
According to the present invention, in order to achieve the above object, as shown in FIG. 1, a data compression circuit comprises a first dictionary retrieval unit 1, a first dictionary registration unit 2, an encoding unit. 3. Initial dictionary access means 4, normal dictionary access means 5, initial dictionary D1, and normal dictionary D2. First
The dictionary search means 1 searches the registered character strings registered in the initial dictionary D1 via the initial dictionary access means 4 for the longest registered character string that matches the input character string. If the search cannot be performed using the initial dictionary D1, the search is terminated. If the search is successful, the search is performed from the registered character string registered in the normal dictionary D2 via the normal dictionary access means 5. The first dictionary registration unit 2 attaches an identification number to a character string obtained by adding one character to the longest registered character string searched by the first dictionary search unit 1, and sends the normal dictionary D 2 via the normal dictionary access unit 5. Register with. The encoding means 3
The identification number assigned to the longest registered character string is encoded as an output code.

【0026】また、初期辞書D1及び通常辞書D2は、
外部ハッシュによるデータ検索及びデータ登録を行うよ
うに構成する。さらに、初期辞書D1には第2文字まで
の文字列についてデータ検索及びデータ登録を行い、通
常辞書D2には第3文字以降の文字列についてデータ検
索及びデータ登録を行うように構成する。
The initial dictionary D1 and the normal dictionary D2 are
It is configured to perform data search and data registration using an external hash. Further, the initial dictionary D1 is configured to perform data search and data registration for character strings up to the second character, and the normal dictionary D2 is configured to perform data search and data registration for character strings after the third character.

【0027】そして、初期辞書D1及び通常辞書D2
は、完全ハッシュによるデータ検索及びデータ登録を行
うように構成する。それから、第1の辞書検索手段1、
第1の辞書登録手段2及び符号化手段3は、パイプライ
ンで接続され並列処理される。
Then, the initial dictionary D1 and the normal dictionary D2
Is configured to perform data search and data registration using a complete hash. Then, the first dictionary search means 1,
The first dictionary registration unit 2 and the encoding unit 3 are connected by a pipeline and are processed in parallel.

【0028】そのうえ、図3に示すように、データ復元
回路は、復号化手段11、第2の辞書検索手段12、第
1の蓄積手段13、第2の蓄積手段14、出力選択手段
15、第2の辞書登録手段16、辞書アクセス手段17
及び辞書D3から構成する。復号化手段11は、入力さ
れた入力符号を復号化する。第2の辞書検索手段12
は、辞書アクセス手段17を介して辞書D3に登録され
ている登録文字列のうち、復号化によって復元された文
字列と一致する文字列を検索する。第1の蓄積手段13
及び第2の蓄積手段14は、この検索によって復元され
た文字列を蓄積する。出力選択手段15は、蓄積された
文字列のうち、出力する復元文字列を選択する。第2の
辞書登録手段16は、選択された復元文字列のうち、辞
書D3に登録されていない文字列に、新たな符号を付し
て登録する。
In addition, as shown in FIG. 3, the data restoration circuit includes a decoding unit 11, a second dictionary search unit 12, a first storage unit 13, a second storage unit 14, an output selection unit 15, 2 dictionary registration means 16 and dictionary access means 17
And the dictionary D3. The decoding unit 11 decodes the input code. Second dictionary search means 12
Searches a registered character string registered in the dictionary D3 via the dictionary access unit 17 for a character string that matches the character string restored by decoding. First storage means 13
The second storage unit 14 stores the character string restored by the search. The output selection unit 15 selects a restored character string to be output from the stored character strings. The second dictionary registration unit 16 registers character strings that are not registered in the dictionary D3 among the selected restored character strings with new codes.

【0029】また、復号化手段11、第2の辞書検索手
段12、出力選択手段15及び第2の辞書登録手段16
は、パイプラインで接続され並列処理される。そして、
図5に示すように、データ圧縮・復元装置は、データ圧
縮回路及びデータ復元回路から構成する。データ圧縮回
路は第1の辞書検索手段1、第1の辞書登録手段2、符
号化手段3、初期辞書アクセス手段4、通常辞書アクセ
ス手段5、初期辞書D1及び通常辞書D2から構成す
る。また、データ復元回路は、復号化手段11、第2の
辞書検索手段12、第1の蓄積手段13、第2の蓄積手
段14、出力選択手段15、第2の辞書登録手段16、
辞書アクセス手段17及び辞書D3から構成する。
The decoding means 11, the second dictionary search means 12, the output selection means 15, and the second dictionary registration means 16
Are connected in a pipeline and processed in parallel. And
As shown in FIG. 5, the data compression / decompression device includes a data compression circuit and a data decompression circuit. The data compression circuit includes a first dictionary search unit 1, a first dictionary registration unit 2, an encoding unit 3, an initial dictionary access unit 4, a normal dictionary access unit 5, an initial dictionary D1, and a normal dictionary D2. The data restoration circuit includes a decoding unit 11, a second dictionary search unit 12, a first storage unit 13, a second storage unit 14, an output selection unit 15, a second dictionary registration unit 16,
It comprises a dictionary access means 17 and a dictionary D3.

【0030】[0030]

【作用】データ圧縮回路において、第1の辞書検索手段
1が初期辞書アクセス手段4を介して、入力された入力
文字列を初期辞書D1から検索する。初期辞書D1から
検索されなかった場合は、同様に通常辞書アクセス手段
5を介して通常辞書D2から検索する。そして、第1の
辞書登録手段2が検索された最長の登録文字列に一文字
を加えた文字列に識別番号を付し、通常辞書アクセス手
段5を介して通常辞書D2に登録する。符号化手段3は
検索された最長の登録文字列に付された識別番号を出力
符号に符号化する。
In the data compression circuit, the first dictionary retrieval means 1 retrieves the input character string from the initial dictionary D1 via the initial dictionary access means 4. If the search is not performed from the initial dictionary D1, the search is similarly performed from the normal dictionary D2 via the normal dictionary access means 5. Then, the first dictionary registration unit 2 attaches an identification number to the character string obtained by adding one character to the longest registered character string searched, and registers the character string in the normal dictionary D2 via the normal dictionary access unit 5. The encoding means 3 encodes the identification number given to the longest registered character string searched into an output code.

【0031】また、初期辞書D1及び通常辞書D2は、
外部ハッシュによるデータ検索及びデータ登録を行う。
さらに、初期辞書D1には第2文字までの文字列につい
てデータ検索及びデータ登録を行い、通常辞書D2には
第3文字以降の文字列についてデータ検索及びデータ登
録を行う。
The initial dictionary D1 and the normal dictionary D2 are
Perform data search and data registration by external hash.
Further, data search and data registration are performed for the character string up to the second character in the initial dictionary D1, and data search and data registration are performed for the character string after the third character in the normal dictionary D2.

【0032】そして、初期辞書D1及び通常辞書D2
は、完全ハッシュによるデータ検索及びデータ登録を行
う。それから、第1の辞書検索手段1、第1の辞書登録
手段2及び符号化手段3は、パイプラインで接続して並
列処理する。
Then, the initial dictionary D1 and the normal dictionary D2
Performs data search and data registration using a complete hash. Then, the first dictionary search means 1, the first dictionary registration means 2, and the encoding means 3 are connected by a pipeline to perform parallel processing.

【0033】そのうえ、データ復元回路において、復号
化手段11が入力された入力符号を復号化し、第2の辞
書検索手段12が辞書アクセス手段17を介して辞書D
3のうち、復号化によって復元された文字列と一致する
文字列を検索し、第1の蓄積手段13及び第2の蓄積手
段14に復元された文字列を出力する。出力選択手段1
5は出力する復元文字列を選択し、第2の辞書登録手段
16が未登録の復元文字列に新たな符号を付し、辞書ア
クセス手段17を介して辞書D3に登録する。
Further, in the data restoration circuit, the decoding means 11 decodes the input code, and the second dictionary search means 12 transmits the dictionary D through the dictionary access means 17.
3, a character string that matches the character string restored by decoding is searched, and the restored character string is output to the first storage unit 13 and the second storage unit 14. Output selection means 1
5 selects a restored character string to be output, the second dictionary registration means 16 assigns a new code to the unregistered restored character string, and registers the new character string in the dictionary D3 via the dictionary access means 17.

【0034】また、復号化手段11、第2の辞書検索手
段12、出力選択手段15及び第2の辞書登録手段16
は、パイプラインで接続して並列処理する。そして、デ
ータ圧縮・復元装置において、データ圧縮回路では第1
の辞書検索手段1が初期辞書アクセス手段4を介して、
入力された入力文字列を初期辞書D1から検索する。初
期辞書D1から検索されなかった場合は、同様に通常辞
書アクセス手段5を介して通常辞書D2から検索する。
そして、第1の辞書登録手段2が検索された最長の登録
文字列に一文字を加えた文字列に識別番号を付し、通常
辞書アクセス手段5を介して通常辞書D2に登録する。
符号化手段3は検索された最長の登録文字列に付された
識別番号を出力符号に符号化する。また、データ復元回
路では復号化手段11が入力された入力符号を復号化
し、第2の辞書検索手段12が辞書アクセス手段17を
介して辞書D3のうち、復号化によって復元された文字
列と一致する文字列を検索し、第1の蓄積手段13及び
第2の蓄積手段14に復元された文字列を出力する。出
力選択手段15は出力する復元文字列を選択し、第2の
辞書登録手段16が未登録の復元文字列に新たな符号を
付し、辞書アクセス手段17を介して辞書D3に登録す
る。
The decoding means 11, the second dictionary search means 12, the output selection means 15, and the second dictionary registration means 16
Are connected in a pipeline to perform parallel processing. In the data compression / decompression device, the data compression circuit
Dictionary search means 1 via initial dictionary access means 4
The input character string is searched from the initial dictionary D1. If the search is not performed from the initial dictionary D1, the search is similarly performed from the normal dictionary D2 via the normal dictionary access means 5.
Then, the first dictionary registration unit 2 attaches an identification number to the character string obtained by adding one character to the longest registered character string searched, and registers the character string in the normal dictionary D2 via the normal dictionary access unit 5.
The encoding means 3 encodes the identification number given to the longest registered character string searched into an output code. In the data restoration circuit, the decoding means 11 decodes the input code, and the second dictionary search means 12 matches the character string restored by decoding in the dictionary D3 via the dictionary access means 17. Then, the restored character string is output to the first storage unit 13 and the second storage unit 14. The output selecting unit 15 selects the restored character string to be output, and the second dictionary registration unit 16 assigns a new code to the unregistered restored character string and registers the new character string in the dictionary D3 via the dictionary access unit 17.

【0035】[0035]

【実施例】以下、本発明の一実施例を図面に基づいて説
明する。図1は、本発明のデータ圧縮回路の実施例を示
す図である。図において、データ圧縮回路は第1の辞書
検索手段1、第1の辞書登録手段2、符号化手段3、初
期辞書アクセス手段4、通常辞書アクセス手段5、初期
辞書D1及び通常辞書D2から構成される。
An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a diagram showing an embodiment of the data compression circuit of the present invention. In the figure, the data compression circuit comprises a first dictionary search unit 1, a first dictionary registration unit 2, an encoding unit 3, an initial dictionary access unit 4, a normal dictionary access unit 5, an initial dictionary D1, and a normal dictionary D2. You.

【0036】第1の辞書検索手段1は、初期辞書アクセ
ス手段4を介して初期辞書D1に登録されている登録文
字列のうち、あるいは通常辞書アクセス手段5を介して
通常辞書D2に登録されている登録文字列のうち、情報
源から入力された入力文字列と一致する最長の登録文字
列を検索する。第1の辞書登録手段2は、検索された最
長の登録文字列に一文字を加えた文字列に、識別番号を
付して初期辞書アクセス手段4を介して初期辞書D1
に、あるいは通常辞書アクセス手段5を介して通常辞書
D2に登録する。初期辞書アクセス手段4は、初期辞書
D1とのアクセスを行うための手段であり、例えば第1
の辞書検索手段1及び第1の辞書登録手段2から指令さ
れた論理アドレスを物理アドレスに変換して、初期辞書
D1とのデータの入出力を行う。通常辞書アクセス手段
5は、通常辞書D2とのアクセスを行うための手段であ
り、例えば第1の辞書検索手段1及び第1の辞書登録手
段2から指令された論理アドレスを物理アドレスに変換
して、通常辞書D2とのデータの入出力を行う。符号化
手段3は、例えばLZW符号化手段が使用され、検索さ
れた最長の登録文字列に付された識別番号を出力符号と
して符号化する。
The first dictionary search means 1 is one of the registered character strings registered in the initial dictionary D1 via the initial dictionary access means 4 or registered in the normal dictionary D2 via the normal dictionary access means 5. The longest registered character string that matches the input character string input from the information source is searched for among the registered character strings. The first dictionary registration unit 2 adds an identification number to a character string obtained by adding one character to the searched longest registered character string, and assigns an initial dictionary D1 via the initial dictionary access unit 4.
Or via the normal dictionary access means 5 in the normal dictionary D2. The initial dictionary access unit 4 is a unit for accessing the initial dictionary D1.
The logical address designated by the dictionary search means 1 and the first dictionary registration means 2 is converted into a physical address, and data is input / output to / from the initial dictionary D1. The normal dictionary access unit 5 is a unit for accessing the normal dictionary D2. For example, the normal dictionary access unit 5 converts a logical address specified by the first dictionary search unit 1 and the first dictionary registration unit 2 into a physical address. Performs data input / output with the normal dictionary D2. The encoding unit 3 uses, for example, an LZW encoding unit, and encodes, as an output code, an identification number given to the longest registered character string searched.

【0037】ここで、通常辞書D2に登録される「最長
の登録文字列に一文字を加えた文字列」は、次のような
文字列である。例えば、入力文字列が「abcd」であ
り、既に通常辞書D2に登録されている最長の登録文字
列が「ab」であるならば、入力文字列のうち最長の登
録文字列と一致している「ab」の次の一文字「c」を
加えた文字列「abc」である。
Here, the "character string obtained by adding one character to the longest registered character string" registered in the normal dictionary D2 is the following character string. For example, if the input character string is "abcd" and the longest registered character string already registered in the normal dictionary D2 is "ab", the input character string matches the longest registered character string. This is a character string “abc” to which the one character “c” next to “ab” is added.

【0038】なお、初期辞書アクセス手段4から初期辞
書D1へのアクセス、及び通常辞書アクセス手段5から
通常辞書D2へのアクセスは、後述する完全ハッシュ法
又は外部ハッシュ法によって行われる。
The access from the initial dictionary access means 4 to the initial dictionary D1 and the access from the normal dictionary access means 5 to the normal dictionary D2 are performed by a complete hash method or an external hash method described later.

【0039】また、第1の辞書検索手段1、第1の辞書
登録手段2及び符号化手段3の各手段は、いずれも図示
されていないパイプラインで接続されており、並列に処
理することができる。このパイプライン並列処理によ
り、複数の手段での符号化処理が可能となり、高速に符
号化処理を行うことができる。
Each of the first dictionary search means 1, the first dictionary registration means 2, and the encoding means 3 are connected by a pipeline (not shown), and can be processed in parallel. it can. By this pipeline parallel processing, encoding processing by a plurality of means becomes possible, and encoding processing can be performed at high speed.

【0040】このような並列処理において、例外となる
のは、第1の辞書検索手段1及び第1の辞書登録手段2
が同時に初期辞書D1又は通常辞書D2へのアクセスを
要求する場合である。例えば、第1の辞書検索手段1と
第1の辞書登録手段2とが同時に初期辞書D1にアクセ
スを要求する場合である。このように、二以上の手段か
ら同時にアクセス要求がある状態を「衝突」という。衝
突が起きた場合には、例えば第1の辞書登録手段2が初
期辞書アクセス手段4を介して初期辞書D1とアクセス
した後、第1の辞書検索手段1が同様に初期辞書D1と
アクセスする、というようにシーケンシャルに辞書とア
クセスすることになる。しかしながら、このような衝突
は全体の符号化処理から見れば、極めて稀な現象であ
る。したがって、全体の処理時間から見れば無視できる
程の処理時間に過ぎないので、シーケンシャルに辞書と
アクセス処理を行なっても問題はない。以下、この符号
化処理手順の一例を図2に示す。
An exception in such parallel processing is that the first dictionary search means 1 and the first dictionary registration means 2
Is a request for access to the initial dictionary D1 or the normal dictionary D2 at the same time. For example, there is a case where the first dictionary search unit 1 and the first dictionary registration unit 2 request access to the initial dictionary D1 at the same time. A state in which an access request is made from two or more means at the same time is called "collision". When a collision occurs, for example, after the first dictionary registration unit 2 accesses the initial dictionary D1 via the initial dictionary access unit 4, the first dictionary search unit 1 similarly accesses the initial dictionary D1. Thus, the dictionary is accessed sequentially. However, such a collision is an extremely rare phenomenon in view of the entire encoding process. Therefore, since the processing time is negligible in view of the entire processing time, there is no problem even if the dictionary and the access processing are sequentially performed. Hereinafter, an example of this encoding processing procedure is shown in FIG.

【0041】図2は、本発明のデータ圧縮回路による処
理手順を示す図である。図には、処理文字数欄6、辞書
検索欄7、辞書登録欄8及び符号化欄9からなる表を示
す。処理文字数欄6には、入力文字列が符号化される際
に処理される先頭からの文字順位を示す。辞書検索欄7
は、図1の第1の辞書検索手段1が処理する内容を示
す。辞書登録欄8は、第1の辞書登録手段2が処理する
内容を示す。符号化欄9は、符号化手段3が処理する内
容を示す。
FIG. 2 is a diagram showing a processing procedure by the data compression circuit of the present invention. The figure shows a table including a processing character number column 6, a dictionary search column 7, a dictionary registration column 8, and an encoding column 9. The number-of-processed characters column 6 indicates the character order from the head processed when the input character string is encoded. Dictionary search field 7
Shows the contents processed by the first dictionary search means 1 in FIG. The dictionary registration column 8 shows the contents processed by the first dictionary registration unit 2. The encoding column 9 shows the contents to be processed by the encoding means 3.

【0042】なお、円内の数字は処理手順の順番を示
す。以下、「円内の数字X」を「サイクルX」と表記す
る。また、同じ円内の数字がある場合には、同時に並列
して処理が行われることを示す。そして、初期辞書D1
とのアクセスは初期辞書アクセス手段4を介して行わ
れ、また、通常辞書D2とのアクセスは通常辞書アクセ
ス手段5を介して行われるものとして、この過程の表記
を省略する。
The numbers in the circle indicate the order of the processing procedure. Hereinafter, “the number X in a circle” is referred to as “cycle X”. If there is a number in the same circle, it indicates that the processing is performed in parallel at the same time. Then, the initial dictionary D1
The access to the normal dictionary D2 is performed through the normal dictionary access means 5, and the description of this process is omitted.

【0043】まず、サイクル1では、情報源から入力さ
れた入力文字列の最初の第1文字に続く第2文字につい
て、第1の辞書検索手段1が初期辞書D1を検索する。
サイクル2は、入力文字列の第3文字について、第1の
辞書検索手段1が通常辞書D2を検索する。サイクル3
は、入力文字列の第4文字について、第1の辞書検索手
段1が通常辞書D2を検索する。このとき、サイクル3
では、入力文字列の第4文字が通常辞書D2に登録され
ていない場合を示す。これらのサイクル1〜サイクル3
の過程は、シーケンシャルに各処理が行われる。
First, in cycle 1, the first dictionary search means 1 searches the initial dictionary D1 for the second character following the first character of the input character string input from the information source.
In cycle 2, the first dictionary search means 1 searches the normal dictionary D2 for the third character of the input character string. Cycle 3
The first dictionary search means 1 searches the normal dictionary D2 for the fourth character of the input character string. At this time, cycle 3
Shows a case where the fourth character of the input character string is not registered in the normal dictionary D2. These cycles 1 to 3
In this process, each process is performed sequentially.

【0044】次に、辞書検索欄7のサイクル4では、入
力文字列の第4文字に続く第5文字について、第1の辞
書検索手段1が初期辞書D1を検索する。同時に、辞書
登録欄8のサイクル4では、辞書検索欄7のサイクル3
で通常辞書D2に登録されていなかった入力文字列の第
1文字〜第4文字の文字列に識別番号を付して、第1の
辞書登録手段2が通常辞書D2に登録する。
Next, in cycle 4 of the dictionary search field 7, the first dictionary search means 1 searches the initial dictionary D1 for the fifth character following the fourth character of the input character string. At the same time, in cycle 4 of the dictionary registration section 8, cycle 3 of the dictionary search section 7
Then, an identification number is assigned to the character string of the first to fourth characters of the input character string that has not been registered in the normal dictionary D2, and the first dictionary registration unit 2 registers the character string in the normal dictionary D2.

【0045】そして、辞書検索欄7のサイクル5では、
入力文字列の第5文字に続く第6文字について、第1の
辞書検索手段1が通常辞書D2を検索する。同時に、符
号化欄9のサイクル5では、辞書登録欄8のサイクル4
で行なった登録文字列に付された識別番号を符号化す
る。以下、同様な処理が続けられる。
Then, in cycle 5 of the dictionary search field 7,
For the sixth character following the fifth character of the input character string, the first dictionary search means 1 searches the normal dictionary D2. At the same time, in cycle 5 of the encoding field 9, cycle 4 of the dictionary registration field 8
Encodes the identification number given to the registered character string performed in step. Hereinafter, similar processing is continued.

【0046】このように、辞書検索欄7において初期辞
書D1又は通常辞書D2を検索した結果、入力文字列が
登録されていなかった場合には、辞書登録欄8における
文字列の登録、及び符号化欄9における符号化を、辞書
検索と並列して行う。このため、符号化処理を高速に行
うことができる。
As a result of searching the initial dictionary D1 or the normal dictionary D2 in the dictionary search field 7, if the input character string is not registered, the registration of the character string in the dictionary registration field 8 and the encoding The encoding in column 9 is performed in parallel with the dictionary search. Therefore, the encoding process can be performed at high speed.

【0047】図3は、本発明のデータ復元回路の実施例
を示す図である。図において、データ復元回路は、復号
化手段11、第2の辞書検索手段12、第1の蓄積手段
13、第2の蓄積手段14、出力選択手段15、第2の
辞書登録手段16、辞書アクセス手段17及び辞書D3
から構成される。
FIG. 3 is a diagram showing an embodiment of the data restoration circuit of the present invention. In the figure, the data restoration circuit includes a decoding unit 11, a second dictionary search unit 12, a first storage unit 13, a second storage unit 14, an output selection unit 15, a second dictionary registration unit 16, and a dictionary access unit. Means 17 and dictionary D3
Consists of

【0048】復号化手段11は、例えばLZW復号化手
段が使用され、情報源から入力された入力符号を復号化
する。第2の辞書検索手段12は、辞書アクセス手段1
7を介して辞書D3に登録されている登録文字列のう
ち、復号化によって復元された文字列と一致する文字列
を検索する。第1の蓄積手段13及び第2の蓄積手段1
4は、検索によって復元された文字列を蓄積する。出力
選択手段15は、蓄積された文字列のうち、出力する復
元文字列を選択する。第2の辞書登録手段16は、選択
された復元文字列のうち、辞書D3に登録されていない
文字列に、新たな符号を付して登録する。辞書アクセス
手段17は、辞書D3とのアクセスを行うための手段で
あり、例えば第2の辞書検索手段12及び第2の辞書登
録手段16から指令された論理アドレスを物理アドレス
に変換して、辞書D3とのデータの入出力を行う。
As the decoding means 11, for example, LZW decoding means is used, and decodes an input code inputted from an information source. The second dictionary search means 12 is a dictionary access means 1
7, a character string that matches the character string restored by decoding is searched from the registered character strings registered in the dictionary D3. First storage means 13 and second storage means 1
No. 4 stores the character string restored by the search. The output selection unit 15 selects a restored character string to be output from the stored character strings. The second dictionary registration unit 16 registers character strings that are not registered in the dictionary D3 among the selected restored character strings with new codes. The dictionary access unit 17 is a unit for accessing the dictionary D3. For example, the dictionary access unit 17 converts a logical address instructed from the second dictionary search unit 12 and the second dictionary registration unit 16 into a physical address, and converts the logical address into a physical address. Data is input / output to / from D3.

【0049】なお、辞書アクセス手段17から辞書D3
へのアクセスは、後述する完全ハッシュ法又は外部ハッ
シュ法によって行うこともできる。また、図1のデータ
圧縮回路で説明した「衝突」は、このデータ復元回路で
も発生する。例えば、第2の辞書検索手段12が検索要
求を、第2の辞書登録手段16が登録要求を同時にする
場合である。この場合、例えば第2の辞書登録手段16
の登録処理後に、第2の辞書検索手段12の検索処理を
行うようにシーケンシャルに行われる。データ圧縮回路
の場合と同様に、衝突は全体の復号化処理から見れば極
めて稀な現象であるため、全体の処理時間から見れば無
視できる程の処理時間に過ぎないので、シーケンシャル
に辞書とアクセス処理を行なっても問題はない。
The dictionary access means 17 sends the dictionary D3
Can be accessed by the full hash method or the external hash method described later. The "collision" described in the data compression circuit of FIG. 1 also occurs in this data restoration circuit. For example, this is a case where the second dictionary search means 12 makes a search request and the second dictionary registration means 16 makes a registration request at the same time. In this case, for example, the second dictionary registration unit 16
After the registration processing, the search processing of the second dictionary search unit 12 is sequentially performed. As in the case of the data compression circuit, collision is a very rare phenomenon from the viewpoint of the entire decoding process, and is only negligible in the overall processing time. There is no problem in performing the processing.

【0050】そして、復号化手段11、第2の辞書検索
手段12、第1の蓄積手段13、第2の蓄積手段14、
出力選択手段15及び第2の辞書登録手段16の各手段
は、いずれも図示されていないパイプラインで接続され
ており、並列に処理することができる。このパイプライ
ン並列処理により、複数の手段での符号化処理が可能と
なり、高速に符号化処理を行うことができる。以下、こ
の復号化処理手順の一例を図4に示す。
Then, the decoding means 11, the second dictionary search means 12, the first storage means 13, the second storage means 14,
Each of the output selection means 15 and the second dictionary registration means 16 are connected by a pipeline (not shown), and can be processed in parallel. By this pipeline parallel processing, encoding processing by a plurality of means becomes possible, and encoding processing can be performed at high speed. Hereinafter, an example of this decoding processing procedure is shown in FIG.

【0051】図4は、本発明のデータ復元回路による処
理手順を示す図である。図には、処理符号数欄21、復
号化欄22、検索・蓄積欄23、文字列出力欄24及び
辞書登録欄25からなる表を示す。
FIG. 4 is a diagram showing a processing procedure by the data restoration circuit of the present invention. The figure shows a table including a processing code number field 21, a decoding field 22, a search / accumulation field 23, a character string output field 24, and a dictionary registration field 25.

【0052】処理符号数欄21は、入力符号が復号化さ
れる際に処理される符号数を示す。復号化欄22は、図
3の復号化手段11が処理する内容を示す。検索・蓄積
欄23は、第2の辞書検索手段12が検索し、スタック
蓄積手段13,14が検索された文字を蓄積する処理を
示す。文字列出力欄24は、出力選択手段15がスタッ
ク蓄積手段13,14に蓄積した文字を全て出力する処
理を示す。辞書登録欄25は、第2の辞書登録手段16
が処理する内容を示す。
The number of processed codes column 21 indicates the number of codes to be processed when the input code is decoded. The decryption column 22 indicates the content processed by the decryption means 11 of FIG. The search / accumulation column 23 indicates a process in which the second dictionary search means 12 searches and the stack storage means 13 and 14 accumulate the searched characters. The character string output column 24 shows a process in which the output selection unit 15 outputs all the characters stored in the stack storage units 13 and 14. The dictionary registration section 25 stores the second dictionary registration unit 16
Indicates the content to be processed.

【0053】なお、円内の数字は処理手順の順番を示
す。以下、図2と同様に、「円内の数字X」を「サイク
ルX」と表記する。また、同じ円内の数字がある場合に
は、同時に並列して処理が行われることを示す。そし
て、初期辞書D3とのアクセスは辞書アクセス手段17
を介して行われるものとして、この過程の表記を省略す
る。
The numbers in the circle indicate the order of the processing procedure. Hereinafter, similarly to FIG. 2, “the number X in a circle” is described as “cycle X”. If there is a number in the same circle, it indicates that the processing is performed in parallel at the same time. The access to the initial dictionary D3 is performed by the dictionary access unit 17.
, The description of this process is omitted.

【0054】まず、サイクル1では、情報源から入力さ
れた最初の入力符号について、復号化手段11が復号化
する。復号化欄22のサイクル2は、2番目の入力符号
について、復号化手段11が復号化する。同時に、検索
・蓄積欄23のサイクル2は、第2の辞書検索手段12
が復号化した符号文字を辞書D3から検索する。また、
検索された復元文字は、スタック蓄積手段13によって
スタックに蓄積される。これらのサイクル2は、並列し
て処理が行われる。
First, in cycle 1, the decoding means 11 decodes the first input code input from the information source. In cycle 2 of the decoding field 22, the decoding means 11 decodes the second input code. At the same time, cycle 2 of the search / accumulation column 23
Searches the dictionary D3 for code characters decoded by. Also,
The retrieved restored characters are stored in the stack by the stack storage unit 13. These cycles 2 are performed in parallel.

【0055】次に、サイクル3及びサイクル4では、後
述する再帰的な復号により、第2の辞書検索手段12が
復号化した符号文字を辞書D3から検索し、スタック蓄
積手段13が検索された復元文字をスタックに蓄積す
る。
Next, in cycle 3 and cycle 4, the second dictionary search means 12 searches the dictionary D3 for code characters decoded by recursive decoding, which will be described later, and the stack storage means 13 restores the searched character. Accumulate characters on the stack.

【0056】そして、復号化欄22のサイクル5では、
3番目の入力符号について、復号化手段11が復号化す
る。同時に、検索・蓄積欄23のサイクル5は、第2の
辞書検索手段12が復号化した符号文字を辞書D3から
検索し、スタック蓄積手段14が検索された復元文字を
スタックに蓄積する。さらに同時に、文字列出力欄24
のサイクル5では、サイクル3〜サイクル4で蓄積した
文字列の1文字目を出力する。これらのサイクル5は、
並列して処理が行われる。
Then, in cycle 5 of the decryption column 22,
The decoding means 11 decodes the third input code. At the same time, in cycle 5 of the search / accumulation column 23, the code character decoded by the second dictionary search means 12 is searched from the dictionary D3, and the stack storage means 14 stores the searched restored character in the stack. At the same time, the character string output field 24
In cycle 5, the first character of the character string accumulated in cycle 3 to cycle 4 is output. These cycles 5
Processing is performed in parallel.

【0057】それから、検索・蓄積欄23のサイクル6
は、第2の辞書検索手段12が復号化した符号文字を辞
書D3から検索し、スタック蓄積手段14が検索された
復元文字をスタックに蓄積する。同時に、文字列出力欄
24のサイクル6では、サイクル3〜サイクル4で蓄積
した文字列の2文字目を出力する。これらのサイクル6
も、並列して処理が行われる。以下、同様な処理が続け
られる。
Then, cycle 6 of the search / accumulation column 23
Retrieves the code characters decoded by the second dictionary retrieval unit 12 from the dictionary D3, and the stack storage unit 14 stores the retrieved restored characters in the stack. At the same time, in cycle 6 of the character string output column 24, the second character of the character string accumulated in cycle 3 to cycle 4 is output. These cycles 6
Are also performed in parallel. Hereinafter, similar processing is continued.

【0058】このように、復号化欄22で行う復号化と
並列して、一方のスタック蓄積手段が検索した文字を蓄
積し、他方のスタック蓄積手段が蓄積した文字列を復元
文字列として出力する処理を行うことができる。このた
め、復号化処理を高速に行うことができる。
As described above, in parallel with the decoding performed in the decoding section 22, the character retrieved by one of the stack storage units is stored, and the character string stored by the other stack storage unit is output as a restored character string. Processing can be performed. Therefore, the decoding process can be performed at high speed.

【0059】図5は、本発明のデータ圧縮・復元装置の
実施例を示す図である。図において、データ圧縮・復元
装置はデータ圧縮回路及びデータ復元回路から構成され
る。データ圧縮回路は第1の辞書検索手段1、第1の辞
書登録手段2、符号化手段3、初期辞書アクセス手段
4、通常辞書アクセス手段5、初期辞書D1及び通常辞
書D2から構成される。また、データ復元回路は、デー
タ復元回路は、復号化手段11、第2の辞書検索手段1
2、第1の蓄積手段13、第2の蓄積手段14、出力選
択手段15、第2の辞書登録手段16、辞書アクセス手
段17及び辞書D3から構成される。
FIG. 5 is a diagram showing an embodiment of the data compression / decompression device of the present invention. In the figure, the data compression / decompression device includes a data compression circuit and a data decompression circuit. The data compression circuit includes a first dictionary search unit 1, a first dictionary registration unit 2, an encoding unit 3, an initial dictionary access unit 4, a normal dictionary access unit 5, an initial dictionary D1, and a normal dictionary D2. The data restoration circuit includes a decoding unit 11 and a second dictionary search unit 1.
2, a first storage unit 13, a second storage unit 14, an output selection unit 15, a second dictionary registration unit 16, a dictionary access unit 17, and a dictionary D3.

【0060】なお、図1及び図3と同一の要素には同一
の番号を付し、説明を省略する。また、データ圧縮回路
及びデータ復元回路の作動は、それぞれ図1及び図3と
同じであるので説明を省略する。
The same elements as those in FIGS. 1 and 3 are denoted by the same reference numerals, and description thereof will be omitted. The operations of the data compression circuit and the data decompression circuit are the same as those shown in FIGS.

【0061】この装置により、データの圧縮処理及び復
元処理の処理速度が向上する。なお、図2及び図4で示
した処理手順のように、複数の手段が並列して処理を行
うことができるので、より装置全体の処理速度を向上さ
せることができる。
With this apparatus, the processing speed of the data compression processing and the decompression processing is improved. In addition, as in the processing procedure shown in FIGS. 2 and 4, a plurality of units can perform processing in parallel, so that the processing speed of the entire apparatus can be further improved.

【0062】次に、上記の各実施例における辞書検索手
順及び辞書登録手順について、まずハッシュ法について
説明する。ハッシュ法は、ハッシュ表(hash table)と
呼ばれる表を用いてデータの格納及びデータの検索を行
う方法の一つであり、データを登録するために検索キー
の内部コードωを用いて格納アドレスを決定する方法で
ある。このために、検索キーの内部コードωからアドレ
スを求める関数が必要となり、この関数は「ハッシュ関
数(hash function )」と呼ばれている。また、ハッシ
ュ関数Hによって得られたアドレスH(ω)は「ハッシ
ュアドレス(hash address)」と呼ばれている。なお、
検索も登録の場合と同様に、ハッシュ関数によりハッシ
ュアドレスを求めて目的のアドレスのデータを検索す
る。
Next, the dictionary search procedure and the dictionary registration procedure in each of the above embodiments will be described first with regard to the hash method. The hash method is one of the methods of storing data and retrieving data using a table called a hash table. In order to register data, a storage address is stored using an internal code ω of a search key. How to decide. For this reason, a function for obtaining an address from the internal code ω of the search key is required, and this function is called a “hash function”. The address H (ω) obtained by the hash function H is called “hash address”. In addition,
In the search, similarly to the case of registration, a hash address is obtained by a hash function and data of a target address is searched.

【0063】このようなハッシュ法を使用した辞書検索
及び辞書登録では、ハッシュ関数Hをどのように選んで
も、相異なる検索キーの内部コードω1 ,ω2 に対し
て、ハッシュアドレスが H(ω1 )=H(ω2 ) となる場合が起こり得る。このような状態を「衝突」と
呼び、この衝突を回避するために外部ハッシュ法(「オ
ープンハッシュ法」又は「連鎖法」とも呼ばれている)
が用いられる。また、衝突が起こらないように、予め表
に検索キーの内部コードωにとり得る全ての値を用意す
る方法が完全ハッシュ法である。以下、外部ハッシュ法
による場合と完全ハッシュ法による場合とに分けて説明
する。
In the dictionary search and dictionary registration using the hash method, no matter how the hash function H is selected, the hash address is H (ω) for the internal codes ω 1 and ω 2 of different search keys. 1 ) = H (ω 2 ). Such a state is called "collision", and an external hash method (also called "open hash method" or "chain method") is used to avoid the collision.
Is used. In addition, a method of preparing all possible values for the internal code ω of the search key in a table in advance so as not to cause a collision is a complete hash method. Hereinafter, the case using the external hash method and the case using the complete hash method will be described separately.

【0064】図6は、外部ハッシュ法のデータ構造を示
す図である。外部ハッシュ法では、まずハッシュ関数H
によって得られるアドレスに対応する表、すなわちバケ
ットヘッダ(Bucket Headder)BHと呼ばれる配列が用
意される。図では、このバケットヘッダBHにはハッシ
ュアドレスが0から(b−1)までのb個のリストヘッ
ダ(list headder)が用意されている。そして、リスト
ヘッダの一つと、同一のハッシュアドレスを有する一以
上のデータ要素、すなわちリストL、との間はリスト構
造によって結合される。ここで、一つのリストは、デー
タを格納するデータ格納域と、次のリストへのポインタ
を格納するポインタ格納域とから構成される。
FIG. 6 is a diagram showing a data structure of the external hash method. In the external hash method, first, a hash function H
A table corresponding to the address obtained by the above, that is, an array called a bucket header (Bucket Headder) BH is prepared. In the figure, the bucket header BH is provided with b list headers having hash addresses from 0 to (b-1). Then, one of the list headers and one or more data elements having the same hash address, that is, the list L, are connected by a list structure. Here, one list includes a data storage area for storing data and a pointer storage area for storing a pointer to the next list.

【0065】例えば、図6に示すように、ハッシュアド
レス「0」に示すリストヘッダにはリストL01へのポ
インタの設定によって、リストヘッダとリストL01と
が結合される。この関係を矢印A1で示す。また、リス
トL01にはリストL02へのポインタの設定によっ
て、リストL01とリストL02とが結合される。この
関係を矢印A2で示す。なお、リストL02以降がポイ
ンタによってリスト間が結合されない場合は、終端記号
「0」が設定される。以下、ハッシュアドレスが1から
(b−1)までのリストヘッダも同様に、リストLとは
リスト構造によって結合される。
For example, as shown in FIG. 6, the list header indicated by the hash address “0” is combined with the list L01 by setting a pointer to the list L01. This relationship is indicated by arrow A1. The list L01 is linked to the list L02 by setting a pointer to the list L02. This relationship is indicated by arrow A2. If the list L02 and subsequent lists are not linked by a pointer, the terminal symbol “0” is set. Hereinafter, the list headers having hash addresses 1 to (b-1) are similarly connected to the list L by the list structure.

【0066】なお、データの検索は次の手順で処理が行
われる。なお、ここではハッシュ関数Hにより求められ
るハッシュアドレスが「3」である場合を例に説明す
る。求められたハッシュアドレス「3」に対応するバケ
ットヘッダBHのリストヘッダから、最初のリストL3
1へのポインタを取得する。そして、最初のリストL3
1内のデータと照合する。もし、データが一致しなけれ
ば、次のリストL32へのポインタを取得し、次のリス
トL32のデータと照合する。もし、データが一致しな
ければ、所望のデータが見つからなかったことを示す。
なお、リストL32に次のリストへのポインタが設定さ
れているならば、同様の検索処理を経て、目的のデータ
を検索する。
The data search is performed in the following procedure. Here, the case where the hash address obtained by the hash function H is “3” will be described as an example. From the list header of the bucket header BH corresponding to the obtained hash address “3”, the first list L3
Obtain a pointer to 1. And the first list L3
Check with the data in 1. If the data does not match, a pointer to the next list L32 is obtained and collated with the data of the next list L32. If the data does not match, it indicates that the desired data was not found.
Note that if a pointer to the next list is set in the list L32, the target data is searched through the same search processing.

【0067】また、データの登録は次の手順で処理が行
われる。データの検索と同様に、ハッシュ関数Hにより
求められるハッシュアドレスが「3」である場合を例に
説明する。求められたハッシュアドレス「3」に対応す
るバケットヘッダBHのリストヘッダから最初のリスト
L31へのポインタを取得する。そして、次のリストへ
のポインタが「0」になるまでリストをたどる。図6の
例ではリストL32が最後のリストであるから、ここで
新たなデータのリストを生成し、生成したリストへのポ
インタをリストL32内のポインタ格納域に設定する。
The data registration is performed in the following procedure. Similar to the data search, a case where the hash address obtained by the hash function H is “3” will be described as an example. The pointer to the first list L31 is obtained from the list header of the bucket header BH corresponding to the obtained hash address “3”. The list is followed until the pointer to the next list becomes "0". In the example of FIG. 6, since the list L32 is the last list, a new data list is generated here, and a pointer to the generated list is set in the pointer storage area in the list L32.

【0068】このようなデータ構造を有する辞書におい
て、データの検索及び登録処理は次のように行われる。
図7は、外部ハッシュ法による辞書検索手順及び辞書登
録手順の一例を示す図である。図において、辞書は検索
及び登録処理を速くするために firstメモリFM、next
メモリNM及び extentionメモリEMの3つの物理的な
メモリから構成されている。また、これらの3つのメモ
リは登録するデータの内容に応じて初期辞書と、通常辞
書とに分けられる。
In a dictionary having such a data structure, data search and registration processing is performed as follows.
FIG. 7 is a diagram showing an example of a dictionary search procedure and a dictionary registration procedure using the external hash method. In the figure, the dictionary is first memory FM, next to speed up the search and registration process.
It is composed of three physical memories, a memory NM and an extention memory EM. These three memories are divided into an initial dictionary and a normal dictionary according to the contents of data to be registered.

【0069】まず、この辞書を使用したデータの検索
は、次の手順で処理が行われる。なお、ここでは検索す
る文字列が「K223242」であり、この文字列のハッ
シュ関数Hにより求められるハッシュアドレスが
「ω1 」である場合を例に説明する。
First, data retrieval using this dictionary is performed in the following procedure. Here, a case where the character string to be searched is “K 22 K 32 K 42 ” and the hash address of the character string obtained by the hash function H is “ω 1 ” will be described as an example.

【0070】まず、ハッシュ関数Hによって得られるア
ドレスω1 から、初期辞書の firstメモリFMのアドレ
スω1 に格納されている次のリストへのポインタω21
取得する。そして、次のリストへのポインタω21から、
extentionメモリEMのアドレスω21に格納されている
データK21と照合する。この場合、文字列K2232 42
の最初の文字K22とは一致しないため、nextメモリNM
のアドレスω21から次のリストへのポインタω22を取得
する。
First, the algorithm obtained by the hash function H
Dress ω1From the address of the first memory FM of the initial dictionary
Su ω1Pointer ω to the next list stored intwenty oneTo
get. And a pointer ω to the next listtwenty oneFrom
 address ω of extention memory EMtwenty oneStored in
Data Ktwenty oneTo match. In this case, the character string Ktwenty twoK32K 42
The first letter Ktwenty twoAnd the next memory NM
Address ωtwenty onePointer to the next list ωtwenty twoGet
I do.

【0071】次に、次のリストへのポインタω22から、
通常辞書の firstメモリFMのアドレスω22に格納され
ている次のリストへのポインタω31を取得する。以下、
初期辞書の場合と同様な検索が行われる。そして、最後
は extentionメモリEMのアドレスω41に格納されてい
るデータK21と照合したが、一致する文字列が検索でき
ずに終了した。この過程を図7では矢印で示す。
Next, from the pointer ω 22 to the next list,
To get a pointer ω 31 to the next list that is stored in the first memory FM of the address ω 22 of the normal dictionary. Less than,
A search similar to that of the initial dictionary is performed. Finally has been collated with the data K 21 stored in the address omega 41 of extention memory EM, matching string is terminated can not find. This process is indicated by an arrow in FIG.

【0072】また、この辞書を使用したデータの登録
は、次の手順で処理が行われる。なお、ここでは上記に
おいて検索できなかった文字列「K223242」を登録
する場合を例に説明する。上記のデータの検索と同様の
処理によって、次のリストへのポインタが「0」になる
までリストをたどる。この場合、nextメモリNMのアド
レスがω41になる。ここで、文字K42を extentionメモ
リEMの他のアドレスに生成する。図7では、このアド
レスがω42であり、同じアドレスのnextメモリNMには
「0」が設定される。また、リストを連結するため、ne
xtメモリNMのアドレスω41には、新たに生成したリス
トへのポインタであるω42を登録する。こうして、新た
な文字列の登録が行われる。
The registration of data using this dictionary is performed in the following procedure. Here, a case will be described as an example where a character string “K 22 K 32 K 42 ” that could not be searched above is registered. By the same processing as the above data search, the list is traced until the pointer to the next list becomes "0". In this case, the address of the next memory NM is ω 41. Here, to generate the character K 42 to other addresses extention memory EM. In FIG. 7, this address is ω 42, the next memory NM of the same address is set to "0". Also, to concatenate the lists, ne
The address ω 41 of xt memory NM, to register the ω 42 is a pointer to the list, which was newly created. Thus, a new character string is registered.

【0073】なお、上記のデータ検索及びデータ登録を
行う初期辞書には第2文字までの文字列について行い、
通常辞書には第3文字以降の文字列について行う。こう
することにより、入力文字列が最適に分散されるため、
データ検索及びデータ登録を行う際の処理時間を抑える
ことができる。
In the initial dictionary for performing the data search and data registration, a character string up to the second character is set.
Normally, a dictionary is used for a character string after the third character. This allows the input strings to be optimally distributed,
The processing time when performing data search and data registration can be suppressed.

【0074】また、初期辞書には第2文字までの文字
列、通常辞書は第3文字以降の文字列に限ることなく、
例えば初期辞書には第3文字までの文字列、通常辞書に
は第4文字以降の文字列というように、入力文字列の性
質に応じて変更してもよい。こうすることにより、様々
な入力文字列の性質に対応して最適な辞書を構成するこ
とができる。
The initial dictionary is not limited to the character string up to the second character, and the normal dictionary is not limited to the character string up to the third character.
For example, the character string may be changed according to the properties of the input character string, such as a character string of up to the third character in the initial dictionary and a character string of the fourth and subsequent characters in the normal dictionary. By doing so, it is possible to construct an optimal dictionary corresponding to the properties of various input character strings.

【0075】図8は、完全ハッシュ法による辞書検索手
順及び辞書登録手順の一例を示す図である。完全ハッシ
ュ法は、全く衝突が起こらないようなハッシュ関数によ
るキー検索法である。この完全ハッシュ法で構築される
辞書は、例えば後述する図14に示す木構造であって、
各「ノード」ごとに256本の「枝」を持つような構造
を有する。
FIG. 8 is a diagram showing an example of a dictionary search procedure and a dictionary registration procedure using the complete hash method. The complete hash method is a key search method using a hash function that does not cause any collision. The dictionary constructed by the perfect hash method has, for example, a tree structure shown in FIG.
It has a structure such that each "node" has 256 "branches".

【0076】図において、辞書は完全ハッシュメモリP
Mのみの物理的なメモリから構成され、登録するデータ
の内容に応じて初期辞書と、通常辞書とに分けられる。
また、完全ハッシュメモリPMのアドレスは、各文字列
のデータと一対一に対応させるため、ハッシュアドレス
ωとデータアドレスKとから構成される。
In the figure, the dictionary is a complete hash memory P
It is composed of only M physical memories, and is divided into an initial dictionary and a normal dictionary according to the contents of data to be registered.
The address of the complete hash memory PM is composed of a hash address ω and a data address K in order to correspond one-to-one with data of each character string.

【0077】例えば、ハッシュアドレスωが20ビット
で表現されるアドレスであり、データアドレスKが8ビ
ットで表現されるアドレスならば、これらを合わせた2
8ビットのアドレスが完全ハッシュメモリPMのアドレ
スとして用いられる。すなわち、各ハッシュアドレスω
は、256個のデータアドレスKのブロックごとの先頭
アドレスを示す。なお、図8では完全ハッシュメモリP
Mのアドレスを「ωnn・Kxx」で表す。
For example, if the hash address ω is an address represented by 20 bits and the data address K is an address represented by 8 bits, the sum of these two addresses is obtained.
An 8-bit address is used as an address of the complete hash memory PM. That is, each hash address ω
Indicates the head address of each of the 256 data addresses K. In FIG. 8, the complete hash memory P
The address of M is represented by “ω nn · K xx ”.

【0078】そして、この辞書を使用したデータの検索
は、次の手順で処理が行われる。なお、ここでは検索す
る文字列が「K2 3 4 5 」であり、この文字列の
ハッシュ関数Hにより求められるハッシュアドレスが
「ω1 」である場合を例に説明する。
The data retrieval using this dictionary is performed in the following procedure. Here, the case where the character string to be searched is “K 2 K 3 K 4 K 5 ” and the hash address of the character string obtained by the hash function H is “ω 1 ” will be described as an example.

【0079】まず、ハッシュ関数Hによって得られるア
ドレスω1 と、文字列の第1文字K 2 のデータから、初
期辞書のアドレスω1 ・K2 に格納されているフラグF
Lを取得する。フラグFLは、このアドレスが有効か無
効かを「1」又は「0」で示す。この場合、フラグFL
には「1」が設定されているので、文字K2 は有効であ
る。したがって、検索する文字列の第1文字が辞書と一
致したことを示す。
First, an algorithm obtained by the hash function H
Dress ω1And the first character K of the character string TwoFrom the data of
Period dictionary address ω1・ KTwoF stored in the
Get L. The flag FL indicates whether this address is valid or not.
The effectiveness is indicated by “1” or “0”. In this case, the flag FL
Is set to "1", the character KTwoIs valid
You. Therefore, the first character of the string to be searched matches the dictionary.
Indicates that you have done it.

【0080】次に、文字列の第2文字K3 が有効か否か
を検査するため、アドレスω1 ・K 2 に格納されている
次へのポインタω21を取得する。そして、アドレスω21
と、文字列の第2文字K3 のデータから、初期辞書のア
ドレスω21・K3 に格納されているフラグFLを取得す
る。以下、同様の処理によって検索が行われる。そし
て、最後はアドレスω41・K5 に格納されているフラグ
FLと照合して、一致する文字列が検索できずに終了し
ている。この過程を図8では矢印で示す。
Next, the second character K of the character stringThreeIs valid or not
To check the address ω1・ K TwoStored in
Next pointer ωtwenty oneTo get. And the address ωtwenty one
And the second character K of the character stringThreeFrom the data in
Dress ωtwenty one・ KThreeThe flag FL stored in the
You. Hereinafter, a search is performed by the same processing. Soshi
And finally the address ω41・ KFiveFlag stored in
Compared with FL, it ends without finding a matching character string
ing. This process is indicated by an arrow in FIG.

【0081】また、この辞書を使用したデータの登録
は、次の手順で処理が行われる。なお、ここでは上記に
おいて検索できなかった文字列「K2 3 4 5 」を
登録する場合を例に説明する。上記のデータの検索と同
様の処理によって、次のリストへのポインタが「0」に
なるまでリストをたどる。この場合、完全ハッシュメモ
リPMのアドレスがω41・K5 になる。ここで、フラグ
FLを「1」に設定する。こうして、新たな文字列の登
録が行われる。
The registration of data using this dictionary is performed in the following procedure. Here, an example will be described in which a character string “K 2 K 3 K 4 K 5 ” that cannot be searched is registered. By the same processing as the above data search, the list is traced until the pointer to the next list becomes "0". In this case, the address of a complete hash memory PM is ω 41 · K 5. Here, the flag FL is set to “1”. Thus, a new character string is registered.

【0082】次に、上記の実施例で示したLZW符号化
手段及びLZW復号化手段について説明する。図9は、
入力文字列をLZW符号の符号化アルゴリズムによって
符号化する場合の具体例を示す図である。この入力文字
列は、a,b,cの3文字だけの組み合わせからなる文
字列である。まず、予め辞書に、1文字のa,b,cだ
けをそれぞれ符号1,2,3に対応づけて登録する初期
化を行う。
Next, the LZW encoding means and LZW decoding means shown in the above embodiment will be described. FIG.
FIG. 9 is a diagram illustrating a specific example of a case where an input character string is encoded by an LZW encoding algorithm. This input character string is a character string composed of a combination of only three characters a, b, and c. First, initialization is performed in which only a, b, and c of one character are registered in the dictionary in association with codes 1, 2, and 3, respectively.

【0083】まず、入力文字列71を左から右へ一字ず
つ読み込む。最初の文字aを読み込み、このaを語頭文
字(列)(prefix string) とする。次に、2番目の文字
bを読み込み、先の語頭文字aにこのbを加えたabを
辞書の登録文字列と照合する。このとき、abに一致す
る文字列が辞書にないので、先の語頭文字aの対応符号
1を符号化出力として出力する。この出力される符号
を、出力符号欄72に示す。同時に、文字列abを符号
4に対応させて辞書に登録する。この辞書に登録される
内容を、登録内容欄73に示す。ここで、改めて2番目
の入力文字bを語頭文字とする。
First, the input character string 71 is read one character at a time from left to right. The first character a is read, and this a is set as a prefix string. Next, the second character b is read, and ab obtained by adding the b to the initial letter a is compared with the registered character string in the dictionary. At this time, since there is no character string that matches ab in the dictionary, the corresponding code 1 of the initial character a is output as an encoded output. The output code is shown in the output code column 72. At the same time, the character string ab is registered in the dictionary in correspondence with the code 4. The contents registered in this dictionary are shown in the registered contents column 73. Here, let the second input character b be the initial character again.

【0084】次に、入力文字列71の3番目の文字aを
読み込み、語頭文字bにこのaを加えたbaを辞書の登
録文字列と照合する。このとき、baに一致する文字列
が辞書にはないので、語頭文字bの対応符号2を符号化
出力として出力するとともに、文字列baを符号5に対
応させて辞書に登録する。また、改めて3番目の入力文
字aを語頭文字とする。
Next, the third character a of the input character string 71 is read, and ba obtained by adding the letter a to the initial character b is compared with the registered character string in the dictionary. At this time, since there is no character string matching ba, the corresponding code 2 of the initial character b is output as an encoded output, and the character string ba is registered in the dictionary in correspondence with code 5. Further, the third input character a is set as the initial character again.

【0085】さらに、4番目の文字bを読み込み、語頭
文字aにこのbを加えたabを辞書の登録文字列と照合
する。このとき、辞書にはabに一致する文字列が登録
されているので、このときはabを語頭文字列とする。
さらに、5番目の入力文字cを読み込み、語頭文字列a
bにこのcを加えたabcを辞書の登録文字列と照合す
る。このとき、abcに一致する文字列が辞書にないの
で、語頭文字列abの対応符号4を符号化出力として出
力するとともに、文字列abcを符号6に対応させて辞
書に登録する。そして、改めて5番目の入力文字cを語
頭文字とする。
Further, the fourth character b is read, and ab obtained by adding the b to the initial letter a is collated with the registered character string in the dictionary. At this time, since a character string matching ab is registered in the dictionary, ab is set as the initial character string at this time.
Further, the fifth input character c is read and the initial character string a
The abc obtained by adding c to b is compared with the registered character string in the dictionary. At this time, since there is no character string matching abc in the dictionary, the corresponding code 4 of the initial character string ab is output as an encoded output, and the character string abc is registered in the dictionary in association with the code 6. Then, the fifth input character c is set as the initial character again.

【0086】以下、同様のアルゴリズムにより、符号化
と辞書登録を続ける。このアルゴリズムで入力文字列
a,b,a,b,c,・・・に対して符号化が行われ、
図9の出力符号欄72に示すような符号1,2,4,
3,・・・が符号化出力として出力される。そして、図
11(A)に示すような登録文字列91と対応符号92
との対応関係が辞書に登録される。
Hereinafter, encoding and dictionary registration are continued by the same algorithm. Encoding is performed on the input character strings a, b, a, b, c,.
Codes 1, 2, 4, and 4 as shown in the output code field 72 in FIG.
Are output as encoded outputs. Then, a registered character string 91 and a corresponding code 92 as shown in FIG.
Is registered in the dictionary.

【0087】図10は、以上に例示した符号化の処理手
順を示すフローチャートである。図において、Sに続く
数字はステップ番号を示す。 〔S101〕予め初期化によって、入力される可能性の
ある全一文字に対しそれぞれ符号を対応させて辞書に登
録する。また、辞書において次に登録すべきアドレスn
を、例えば256に設定する。ここで、nは辞書に登録
される文字列に対応して符号を0,1,2,・・・と付
した場合、登録文字列の総数に相当する。さらに、入力
文字列を読み込み、入力した最初の文字を語頭文字列
(prefix string )ωとする。
FIG. 10 is a flowchart showing the procedure of the above-described encoding process. In the figure, numbers following S indicate step numbers. [S101] By initialization, a code is registered in the dictionary in such a manner that a code is associated with all the characters that may be input. The address n to be registered next in the dictionary
Is set to, for example, 256. Here, n is equivalent to the total number of registered character strings when the codes are assigned 0, 1, 2,... Corresponding to the character strings registered in the dictionary. Further, the input character string is read, and the first character input is set as a prefix string ω.

【0088】〔S102〕次の入力文字Kを読み込む。 〔S103〕ステップS102において、入力文字デー
タが存在したか否かを判別する。もし、入力文字データ
が存在すればステップS105へ進み、存在しなければ
ステップS104へ進む。
[S102] The next input character K is read. [S103] In step S102, it is determined whether or not input character data exists. If the input character data exists, the process proceeds to step S105, and if not, the process proceeds to step S104.

【0089】〔S104〕語頭文字列ωを辞書と照合
し、対応する符号code(ω)を読み出し、符号化出力と
して出力する。このとき、符号code(ω)のビット数が
〔log2n〕の2進数符号に変換して出力する。ここで、
記号〔x〕は、数値x以上の整数のうち、最小の整数を
表す。以下、この意味で記号〔x〕を用いることにす
る。なお、このステップでは処理すべき文字列がないた
め、本ステップを実行後、本処理手順を終了する。
[S104] The initial character string ω is collated with the dictionary, the corresponding code code (ω) is read, and output as an encoded output. At this time, the number of bits of the code (ω) is converted to a binary code of [log 2 n] and output. here,
The symbol [x] represents the minimum integer among integers equal to or larger than x. Hereinafter, the symbol [x] will be used in this sense. In this step, since there is no character string to be processed, the present procedure is terminated after executing this step.

【0090】〔S105〕語頭文字列ωに、ステップS
102で読み込んだ文字Kを加えた文字列ωKを辞書と
照合し、文字列ωKが辞書に登録されているか否かを判
別する。もし、登録されていればステップS106に進
み、登録されていなければステップS107に進む。
[S105] Step S is added to the initial character string ω.
The character string ωK to which the character K read in 102 is added is collated with the dictionary, and it is determined whether or not the character string ωK is registered in the dictionary. If registered, the process proceeds to step S106, and if not registered, the process proceeds to step S107.

【0091】〔S106〕文字列ωKを改めて語頭文字
列ωとする。そして、再びステップS102に戻る。こ
のように、ステップS102〜ステップS106を繰り
返すことにより、入力文字列と一致する文字列として、
辞書に登録された文字列のうちの最大長の文字列が検索
される。
[S106] The character string ωK is newly set as the initial character string ω. Then, the process returns to step S102 again. In this way, by repeating steps S102 to S106, a character string that matches the input character string
The longest character string among the character strings registered in the dictionary is searched.

【0092】〔S107〕語頭文字列ωを辞書と照合
し、対応する符号code(ω)を読み出し、符号化出力と
して出力する。このときの符号code(ω)のビット数
は、〔log2n〕となる。また、文字列ωKにnの値を対
応させて辞書に登録する。すなわち、辞書のアドレスn
に文字列ωKを記憶する。さらに、ステップS102で
読み込んだ文字Kを語頭文字列ωとするとともに、辞書
アドレスnをインクリメントして、つぎの新たな入力文
字列に対するステップS102以降の実行に備える。
[S107] The initial character string ω is collated with the dictionary, the corresponding code code (ω) is read, and output as an encoded output. The number of bits of the code code (ω) at this time is [log 2 n]. Further, the value of n is associated with the character string ωK and registered in the dictionary. That is, the dictionary address n
Is stored as a character string ωK. Further, the character K read in step S102 is set as the initial character string ω, and the dictionary address n is incremented to prepare for execution of the next new input character string from step S102.

【0093】図12は、図9に示した符号化出力を復元
する場合の具体例を示す図である。予め復元側の辞書
に、初期化によって、符号1,2,3だけがそれぞれ文
字a,b,cに対応づけられて登録されている。
FIG. 12 is a diagram showing a specific example in the case where the encoded output shown in FIG. 9 is restored. In the dictionary on the restoration side, only codes 1, 2, and 3 are registered in association with characters a, b, and c, respectively, by initialization.

【0094】まず、入力符号81を左から右へ一つずつ
読み込む。最初の符号1を読み、辞書を参照して文字列
aを復元する。このとき復元された文字列を、復元文字
列欄821に示す。最初の符号は、初期化によって必ず
辞書に登録されている。そして、2番目の符号2を読
み、辞書を参照して文字列bを復元する。このとき、前
回の入力符号1と今回復号した文字列の最初の一文字b
とを組み合わせた「1b」に符号4を対応させて辞書に
登録する。このときの登録された内容を、登録内容欄8
3に示す。
First, the input code 81 is read one by one from left to right. The first code 1 is read, and the character string a is restored with reference to the dictionary. The character string restored at this time is shown in a restored character string column 821. The first code is always registered in the dictionary by initialization. Then, the second code 2 is read, and the character string b is restored with reference to the dictionary. At this time, the previous input code 1 and the first character b of the currently decoded character string
The code 4 is associated with “1b” obtained by combining the above and registered in the dictionary. The registered content at this time is stored in the registered content column 8
3 is shown.

【0095】次に、入力文字列81の3番目の符号4を
読み、辞書を参照して対応する「1b」を読み出す。さ
らに、「1b」の符号1を、辞書を参照して対応する文
字aを読み出す。このような一連の読み出し繰り返し動
作を「再帰的な復号」と呼ぶ。これを、再帰的復号欄8
2に示す。これによって、文字列abが復元され、復元
文字列として出力する。出力される文字列を、復元文字
列欄831に示す。同時に、前回の入力符号2と今回復
元した文字列の最初の一文字aとを組み合わせた「2
a」に、符号5を対応させて辞書に登録する。
Next, the third code 4 of the input character string 81 is read, and the corresponding "1b" is read with reference to the dictionary. Further, the code | symbol 1 of "1b" reads the corresponding character a with reference to a dictionary. Such a series of read repetition operations is called “recursive decoding”. This is referred to as a recursive decryption field 8
It is shown in FIG. Thus, the character string ab is restored and output as a restored character string. The output character string is shown in the restored character string column 831. At the same time, “2” is a combination of the previous input code 2 and the first character a of the character string restored this time.
"a" is registered in the dictionary in correspondence with the reference numeral 5.

【0096】以下、同様のアルゴリズムにより文字列の
復元と辞書登録を続ける。このようにして入力符号1,
2,4,3,5,・・・に対して復元が行われ、図12
の復元文字列欄821に示すような文字列a,b,a
b,c,ba,・・・が復元文字列として出力される。
そして、図11(B)に示すような登録符号93と対応
文字列94との対応関係が辞書に登録される。
Thereafter, restoration of a character string and registration of a dictionary are continued by the same algorithm. Thus, the input code 1,
Are restored for 2, 4, 3, 5,...
Character strings a, b, a as shown in the restored character string column 821 of FIG.
are output as restored character strings.
Then, the correspondence between the registration code 93 and the corresponding character string 94 as shown in FIG. 11B is registered in the dictionary.

【0097】図13は、以上に例示した復号化の処理手
順を示すフローチャートである。図において、Sに続く
数字はステップ番号を示す。 〔S111〕予め初期化によって、入力される可能性の
ある符号に対しそれぞれ文字を対応させて辞書に登録す
る。また、辞書において次に登録すべきアドレスnを、
例えば256に設定する。ここで、nは辞書に登録され
る文字列に対応して符号を0,1,2,・・・と付した
場合、登録文字列の総数に相当する。次に、入力符号を
読み込み、最初の入力符号CODE(バイナリコード)を1
0進数の入力符号ωに変換する。この場合、図10の符
号化ではωは入力文字列であったが、この復号化ではω
は入力符号である点に注意されたい。そして、このωを
OLD ωとする。同時に、最初に入力する符号は既に辞書
に登録されているため、入力符号ωに対応する文字D
(ω)を辞書から検索し、復元された文字として出力す
る。なお、出力した文字を後述するステップS116の
例外処理のためにFINchar にセットしておく。
FIG. 13 is a flowchart showing the procedure of the decoding process exemplified above. In the figure, numbers following S indicate step numbers. [S111] Characters are registered in the dictionary in advance by associating characters with codes which may be input by initialization. Also, the address n to be registered next in the dictionary is
For example, it is set to 256. Here, n is equivalent to the total number of registered character strings when the codes are assigned 0, 1, 2,... Corresponding to the character strings registered in the dictionary. Next, the input code is read, and the first input code CODE (binary code) is set to 1
It is converted into the input code ω of the 0-base number. In this case, ω is an input character string in the encoding of FIG.
Is an input code. And this ω
OLD ω. At the same time, since the code to be input first is already registered in the dictionary, the character D corresponding to the input code ω
(Ω) is retrieved from the dictionary and output as restored characters. The output character is set in FINchar for exception processing in step S116 described later.

【0098】〔S112〕次の入力符号CODEを読み込
む。 〔S113〕ステップS112において入力符号データ
が存在したか否かを判別する。もし、存在すればステッ
プS115へ進み、存在しなければ本処理手順を終了す
る。
[S112] The next input code CODE is read. [S113] In step S112, it is determined whether or not the input code data exists. If it exists, the process proceeds to step S115, and if it does not exist, this processing procedure ends.

【0099】〔S114〕読み込んだ入力符号CODEから
入力符号ωに変換するとともに、この入力符号ωをINω
にセットする。 〔S115〕入力符号ωをnと比較する。すなわち、入
力符号が辞書に登録されているか否か(ω≧n)を判別
する。もし、ωがnより小さいときにはステップS11
7へ進み、ωがn以上のときにはステップS116へ進
む。なお、ωがn以上になるのは、例えば図12の入力
符号欄81が「8」のときである。
[S114] The input code CODE is converted into the input code ω, and the input code ω is converted to INω.
Set to. [S115] The input code ω is compared with n. That is, it is determined whether or not the input code is registered in the dictionary (ω ≧ n). If ω is smaller than n, step S11
7 and when ω is equal to or more than n, the process proceeds to step S116. Note that ω is equal to or larger than n when, for example, the input code field 81 in FIG. 12 is “8”.

【0100】〔S116〕ステップS111または前回
にステップS119で設定されたOLD ωおよびFINchar
の組(OLD ω,FINchar )をωKと置き換える。すなわ
ち、OLD ωにセットされた値をωに、FINchar にセット
された値をKにセットする。そして、Kをスタックにプ
ッシュ(PUSH)する。なお、ωはステップS117
で復号化される。
[S116] OLD ω and FINchar set in step S111 or last time in step S119
(OLD ω, FINchar) is replaced with ωK. That is, the value set in OLD ω is set to ω, and the value set in FINchar is set to K. Then, K is pushed (PUSH) onto the stack. Note that ω is set in step S117.
Is decrypted.

【0101】〔S117〕通常、入力符号ωは前回まで
の処理で辞書に登録されているため、入力符号ωに対応
する文字列D(ω)を辞書から読み出す。読み出した文
字列D(ω)をωi Kに分解する。ωi は符号、Kは復
号化文字である。そして、文字列D(ω)が、ωi Kに
分解できない1文字であるか否かを判別する。D(ω)
がωi Kに分解できるならばステップS118に進み、
D(ω)が1文字であるならばステップS119へ進
む。
[S117] Normally, since the input code ω has been registered in the dictionary in the previous processing, the character string D (ω) corresponding to the input code ω is read from the dictionary. The read character string D (ω) is decomposed into ω i K. ω i is a sign and K is a decoded character. Then, it is determined whether or not the character string D (ω) is one character that cannot be decomposed into ω i K. D (ω)
If can be decomposed into ω i K, the process proceeds to step S118,
If D (ω) is one character, the process proceeds to step S119.

【0102】〔S118〕文字Kを一時的にスタックに
プッシュし、また符号ωi を新たなωとし、再度ステッ
プS117に戻る。このステップS117およびステッ
プS118の実行を、D(ω)が1文字に至るまで繰り
返す。
[0102] [S118] to push the character K to temporarily stack, also the sign ω i as a new ω, returns to step S117 again. The execution of steps S117 and S118 is repeated until D (ω) reaches one character.

【0103】〔S119〕ステップS118でスタック
にプッシュした各文字をLIFO(Last In Fast Out)
形式でポップ(POP)して復元文字列を出力する。例
えば、図12の入力符号欄81が「5」の場合ならば、
a,bの順でスタックにプッシュされ、baという復元
文字列が出力される。同時に、今回復元した文字列の最
初の一文字をFINchar とし、前回セットされた OLDωと
FINchar との組( OLDω,FINchar )からなる文字列
を、nの値に対応させて辞書に登録する。すなわち、こ
の文字列を辞書のアドレスnに記憶する。さらに、nを
インクリメントし、ステップS114でセットされたIN
ωをOLD ωにセットして、次のステップS112以降の
実行に備える。
[S119] Each character pushed on the stack in step S118 is transferred to the LIFO (Last In Fast Out).
Pop (POP) in the format and output the restored character string. For example, if the input code field 81 in FIG. 12 is “5”,
The data is pushed onto the stack in the order of a and b, and a restored character string ba is output. At the same time, the first character of the restored string is set to FINchar, and the previously set OLDω and
A character string consisting of a pair with FINchar (OLDω, FINchar) is registered in the dictionary in correspondence with the value of n. That is, this character string is stored at the address n of the dictionary. Further, n is incremented and the IN set in step S114 is incremented.
ω is set to OLD ω to prepare for execution of the next step S112 and subsequent steps.

【0104】上述のように復号化処理では、図13のス
テップS117〜ステップS119を繰り返し行うこと
によって符号化前のデータに復元する。すなわち、入力
符号ωは前回までの処理で辞書に登録されているため、
入力符号ωに対応する文字列D(ω)を辞書から読み出
す。また、読み出した文字列D(ω)をωi Kに分解
し、この文字Kを一時的にスタックに退避させる。そし
て、符号ωi を新たな入力符号ωとして、再度入力符号
ωに対応する文字列D(ω)を辞書から読み出す。これ
らの手順を、新たな入力符号ωが一文字になるまで再帰
的に繰り返す。そして、スタックに退避させた文字をL
IFO形式でポップして出力するという方式である。
As described above, in the decoding process, the data before encoding is restored by repeatedly performing steps S117 to S119 in FIG. That is, since the input code ω has been registered in the dictionary in the previous processing,
The character string D (ω) corresponding to the input code ω is read from the dictionary. Further, the read character string D (ω) is decomposed into ω i K, and the character K is temporarily saved on the stack. Then, the character string D (ω) corresponding to the input code ω is read from the dictionary again, using the code ω i as a new input code ω. These procedures are recursively repeated until the new input code ω becomes one character. Then, the character saved on the stack is L
This is a method of popping and outputting in the IFO format.

【0105】図14は、上記処理手順等に使用した辞書
の木構造の一例を示す図である。この辞書の木構造は、
LZW符号化手段及びLZW復号化手段において実現さ
れるアルゴリズムによる符号化及び復号化の際に用いら
れる辞書の内部構造を図示したものである。図14にお
いて、円内の数字は識別番号を示し、この円内の数字が
付されている箇所を「ノード(node;節)」と呼ぶ。
FIG. 14 is a diagram showing an example of the tree structure of the dictionary used in the above processing procedure and the like. The tree structure of this dictionary is
FIG. 3 illustrates an internal structure of a dictionary used for encoding and decoding by an algorithm realized in the LZW encoding unit and the LZW decoding unit. In FIG. 14, the numbers in the circles indicate identification numbers, and the places where the numbers in the circles are attached are called “nodes (nodes)”.

【0106】辞書50は、ルート(root;根)51を起
点とする。このルート51には、文字は割り当てられな
い。そして、ルート51の一階層下、すなわち第1階層
52には一文字目の文字が登録される。この一文字目の
文字の登録は、相異なる文字が登録され、主に辞書50
の初期化の時に行われる。図には「a」,「b」及び
「c」の3文字が登録されているが、実際には8ビット
のデータで表現可能な256文字が登録される。
The dictionary 50 has a root (root) 51 as a starting point. No characters are assigned to this route 51. Then, the first character is registered at one level below the root 51, that is, at the first level 52. The registration of the first character is performed by registering different characters.
Is performed at the time of initialization of Although three characters “a”, “b” and “c” are registered in the figure, 256 characters that can be represented by 8-bit data are actually registered.

【0107】そして、第2階層53から下の階層は、情
報源から入力された文字列を学習することによって登録
される文字である。なお、一つ下の階層を有するノード
を「枝(branch)」と呼び、一つ下の階層を有するノー
ドを「葉(leaf)」と呼ぶ。したがって、図では円内の
数字の25,26,13,14,27,28,16,
6,・・・,22,23,24のノードが「葉」であ
り、その他のノードは「枝」である。
[0107] The layers below the second layer 53 are characters registered by learning a character string input from an information source. Note that a node having a lower hierarchy is called a "branch", and a node having a lower hierarchy is called a "leaf". Therefore, in the figure, the numbers 25, 26, 13, 14, 27, 28, 16,
The nodes 6,..., 22, 23, and 24 are “leaves”, and the other nodes are “branches”.

【0108】なお、あるノードが現在は「葉」であって
も、学習により「枝」となる可能性がある。例えば、
「acd」という文字列を辞書50に登録する場合、文
字列「ac」は第1階層52が「a」(円内の数字
1)、第2階層53が「c」(円内の数字6)として登
録されているので、第2階層53の「c」の下の第3階
層54に、新たに「d」を登録することになる。このと
き、円内の数字6のノードは「葉」から「枝」に変わ
る。
Even if a certain node is currently a “leaf”, it may become a “branch” by learning. For example,
When the character string “acd” is registered in the dictionary 50, the character string “ac” is “a” (the number 1 in the circle) in the first hierarchy 52 and “c” (the number 6 in the circle) in the second hierarchy 53. ), “D” is newly registered in the third hierarchy 54 below “c” of the second hierarchy 53. At this time, the node of number 6 in the circle changes from “leaf” to “branch”.

【0109】上記の実施例の説明では、データ圧縮回路
において、符号はlog2n以上の最小の整数のビット数か
らなる出力符号で出力したが、本出願人が特願平3-1306
23号において開示したように、ビット端数補償、Phasin
g in Binary Codes 、あるいは多値算術符号からなる出
力符号で出力してもよい。
In the above description of the embodiment, in the data compression circuit, the code is output as the output code having the minimum integer bit number of log 2 n or more.
Bit fraction compensation, Phasin, as disclosed in No. 23
g in Binary Codes or an output code composed of multi-level arithmetic codes may be used.

【0110】また、初期辞書D1、通常辞書D2及び辞
書D3は外部ハッシュ又は完全ハッシュに基づき構築
し、辞書50は木構造に基づき構築したが、他の構築法
に基づき辞書を構築してもよい。例えば、二進分木(バ
イナリ・ツリー)法によって辞書を構築し、辞書に登録
された文字列等のデータを二進検索(バイナリ・サー
チ)により検索するようにしてもよい。
Although the initial dictionary D1, the normal dictionary D2, and the dictionary D3 are constructed based on an external hash or a complete hash, and the dictionary 50 is constructed based on a tree structure, the dictionary may be constructed based on another construction method. . For example, a dictionary may be constructed by a binary tree method, and data such as a character string registered in the dictionary may be searched by a binary search.

【0111】なお、上記の各実施例は、ワークステーシ
ョン等における文字コード、ベクトル情報、画像データ
などの圧縮及び復元に応用され、必要な記憶容量を大幅
に削減することができる。
Each of the above embodiments is applied to compression and decompression of character codes, vector information, image data, and the like in a workstation or the like, and the required storage capacity can be greatly reduced.

【0112】また、通信回線を利用したデータ送受信に
おいても応用でき、通信時間の短縮を図ることができ
る。例えば、モデム、ファクシミリ等の通信機器に応用
することができる。
Further, the present invention can be applied to data transmission / reception using a communication line, and the communication time can be reduced. For example, it can be applied to communication equipment such as a modem and a facsimile.

【0113】[0113]

【発明の効果】以上説明したように本発明では、データ
圧縮回路において、第1の辞書検索手段が初期辞書又は
通常辞書から、入力文字列と一致する最長の登録文字列
を検索し、同時に第1の辞書検索手段が最長の登録文字
列に一文字を加えた文字列に識別番号を付して通常辞書
に登録し、符号化手段が最長の登録文字列に付された識
別番号を出力符号に符号化するので、符号化処理を速く
行うことができる。
As described above, according to the present invention, in the data compression circuit, the first dictionary search means searches the initial dictionary or the normal dictionary for the longest registered character string that matches the input character string, and The first dictionary search means attaches an identification number to the character string obtained by adding one character to the longest registered character string and registers it in the normal dictionary, and the encoding means uses the identification number assigned to the longest registered character string as an output code. Since the encoding is performed, the encoding process can be performed quickly.

【0114】また、データ圧縮回路において、初期辞書
及び通常辞書は外部ハッシュによるデータ検索及びデー
タ登録を行うように構成したので、データ検索及びデー
タ登録が速くなり、符号化処理をより速く行うことがで
きる。
In the data compression circuit, the initial dictionary and the normal dictionary are configured to perform data search and data registration using an external hash, so that data search and data registration become faster, and the encoding process can be performed faster. it can.

【0115】さらに、データ圧縮回路において、初期辞
書には第2文字までの文字列についてデータ検索及びデ
ータ登録を行い、通常辞書には第3文字以降の文字列に
ついてデータ検索及びデータ登録を行うように構成した
ので、データ検索及びデータ登録に係る処理時間を抑え
ることができる。
Further, in the data compression circuit, data search and data registration are performed for the character string up to the second character in the initial dictionary, and data search and data registration are performed for the character string after the third character in the normal dictionary. The processing time required for data search and data registration can be reduced.

【0116】そして、データ圧縮回路において、初期辞
書及び通常辞書は完全ハッシュによるデータ検索及びデ
ータ登録を行うように構成したので、データ検索及びデ
ータ登録が速くなり、符号化処理をより速く行うことが
できる。
In the data compression circuit, the initial dictionary and the normal dictionary are configured to perform data search and data registration by using a complete hash, so that data search and data registration become faster, and encoding processing can be performed faster. it can.

【0117】それから、第1の辞書検索手段、第1の辞
書登録手段及び符号化手段は、パイプラインにより並列
処理するので、高速に符号化処理を行うことができる。
そのうえ、データ復元回路において、復号化手段が入力
符号を復号化し、同時に第2の辞書検索手段が辞書から
復号化によって復元された文字列を検索し、第1の蓄積
手段及び第2の蓄積手段が復元された文字列を蓄積し、
出力選択手段が出力する復元文字列を選択し、第2の辞
書登録手段が未登録の復元文字列に新たな符号を付して
辞書に登録するので、復号化処理を速く行うことができ
る。
Since the first dictionary search means, the first dictionary registration means, and the encoding means perform parallel processing by the pipeline, the encoding processing can be performed at high speed.
In addition, in the data restoration circuit, the decoding means decodes the input code, and at the same time, the second dictionary search means searches the dictionary for a character string restored by decoding, and the first storage means and the second storage means Accumulates the restored string,
Since the output character selecting unit selects the restored character string to be output, and the second dictionary registration unit adds a new code to the unregistered restored character string and registers it in the dictionary, the decoding process can be performed quickly.

【0118】また、復号化手段、第2の辞書検索手段、
出力選択手段及び第2の辞書登録手段は、パイプライン
により並列処理するので、高速に復号化処理を行うこと
ができる。
Also, the decoding means, the second dictionary search means,
Since the output selection means and the second dictionary registration means perform the parallel processing by the pipeline, the decoding processing can be performed at high speed.

【0119】そして、データ圧縮・復元装置において、
データ圧縮回路では第1の辞書検索手段が初期辞書又は
通常辞書から、入力文字列と一致する最長の登録文字列
を検索し、同時に第1の辞書検索手段が最長の登録文字
列に一文字を加えた文字列に識別番号を付して通常辞書
に登録し、符号化手段が最長の登録文字列に付された識
別番号を出力符号に符号化する。また、データ復元回路
では復号化手段が入力符号を復号化し、同時に第2の辞
書検索手段が辞書から復号化によって復元された文字列
を検索し、第1の蓄積手段及び第2の蓄積手段が復元さ
れた文字列を蓄積し、出力選択手段が出力する復元文字
列を選択し、第2の辞書登録手段が未登録の復元文字列
に新たな符号を付して辞書に登録するので、符号化処理
及び復号化処理を速く行うことができる。
In the data compression / decompression device,
In the data compression circuit, the first dictionary search means searches the initial dictionary or the normal dictionary for the longest registered character string that matches the input character string, and at the same time, the first dictionary search means adds one character to the longest registered character string. The assigned character string is assigned an identification number and registered in a normal dictionary, and the encoding means encodes the identification number assigned to the longest registered character string into an output code. In the data restoration circuit, the decoding means decodes the input code, and at the same time, the second dictionary search means searches the dictionary for a character string restored by decoding, and the first storage means and the second storage means The restored character string is stored, the output selection means selects the restored character string to be output, and the second dictionary registration means assigns a new code to the unregistered restored character string and registers it in the dictionary. The decryption process and the decryption process can be performed quickly.

【0120】したがって、各回路及び装置全体の処理速
度を向上させることができる。
Therefore, the processing speed of each circuit and the entire device can be improved.

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

【図1】本発明のデータ圧縮回路の原理説明図である。FIG. 1 is a diagram illustrating the principle of a data compression circuit according to the present invention.

【図2】本発明のデータ圧縮回路による処理手順を示す
図である。
FIG. 2 is a diagram showing a processing procedure by a data compression circuit of the present invention.

【図3】本発明のデータ復元回路の原理説明図である。FIG. 3 is a diagram illustrating the principle of a data restoration circuit according to the present invention.

【図4】本発明のデータ復元回路による処理手順を示す
図である。
FIG. 4 is a diagram showing a processing procedure by the data restoration circuit of the present invention.

【図5】本発明のデータ圧縮・復元装置の原理説明図で
ある。
FIG. 5 is a diagram illustrating the principle of a data compression / decompression device according to the present invention.

【図6】外部ハッシュ法のデータ構造を示す図である。FIG. 6 is a diagram showing a data structure of an external hash method.

【図7】外部ハッシュ法による辞書検索手順及び辞書登
録手順の一例を示す図である。
FIG. 7 is a diagram showing an example of a dictionary search procedure and a dictionary registration procedure using the external hash method.

【図8】完全ハッシュ法による辞書検索手順及び辞書登
録手順の一例を示す図である。
FIG. 8 is a diagram showing an example of a dictionary search procedure and a dictionary registration procedure using the complete hash method.

【図9】符号化の具体例を示す図である。FIG. 9 is a diagram illustrating a specific example of encoding.

【図10】符号化の処理手順を示す図である。FIG. 10 is a diagram showing an encoding processing procedure.

【図11】文字列と符号との対応関係図である。FIG. 11 is a diagram illustrating a correspondence relationship between a character string and a code.

【図12】復号化の具体例を示す図である。FIG. 12 is a diagram illustrating a specific example of decoding.

【図13】復号化の処理手順を示す図である。FIG. 13 is a diagram showing a decoding processing procedure.

【図14】辞書の木構造の一例を示す図である。FIG. 14 is a diagram illustrating an example of a tree structure of a dictionary.

【図15】従来のデータ圧縮回路を示す図である。FIG. 15 is a diagram showing a conventional data compression circuit.

【図16】従来のデータ圧縮回路による処理手順を示す
図である。
FIG. 16 is a diagram showing a processing procedure by a conventional data compression circuit.

【図17】従来のデータ復元回路を示す図である。FIG. 17 is a diagram showing a conventional data restoration circuit.

【図18】従来のデータ復元回路による処理手順を示す
図である。
FIG. 18 is a diagram showing a processing procedure by a conventional data restoration circuit.

【符号の説明】 1 辞書検索手段 2 辞書登録手段 3 符号化手段 4 初期辞書 5 通常辞書 11 復号化手段 12 辞書検索手段 13 第1の蓄積手段 14 第2の蓄積手段 15 出力選択手段 16 辞書登録手段 17 辞書[Description of Signs] 1 Dictionary search means 2 Dictionary registration means 3 Encoding means 4 Initial dictionary 5 Normal dictionary 11 Decoding means 12 Dictionary search means 13 First storage means 14 Second storage means 15 Output selection means 16 Dictionary registration Means 17 Dictionary

───────────────────────────────────────────────────── フロントページの続き (72)発明者 千葉 広隆 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (56)参考文献 特開 平3−247167(JP,A) 特開 昭62−263529(JP,A) 特開 平4−267630(JP,A) 特開 平4−129429(JP,A) 特開 平4−123619(JP,A) 特開 平4−76727(JP,A) 特開 平3−262331(JP,A) 特開 昭61−13340(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 5/00 H03M 7/30 - 7/46 ──────────────────────────────────────────────────続 き Continuation of the front page (72) Inventor Hirotaka Chiba 1015 Kamikodanaka, Nakahara-ku, Kawasaki City, Kanagawa Prefecture Inside Fujitsu Limited (56) References JP-A-3-247167 (JP, A) JP-A-62-263529 (JP, A) JP-A-4-267630 (JP, A) JP-A-4-129429 (JP, A) JP-A-4-123619 (JP, A) JP-A-4-76727 (JP, A) Kaihei 3-262331 (JP, A) JP-A-61-13340 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 5/00 H03M 7/ 30-7/46

Claims (8)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 情報源から入力された入力文字列を、符
号化することにより圧縮するデータ圧縮回路において、文字列を登録する初期辞書(D1)と、 前記初期辞書に登録された文字列及び前記初期辞書に含
まれる文字列よりも長い文字列を登録する通常辞書(D
2)と、 前記 初期辞書(D1)又は前記通常辞書(D2)に登録
されている登録文字列のうち、入力された入力文字列と
一致する最長の登録文字列を検索する第1の辞書検索手
段(1)と、 前記初期辞書(D1)とのアクセスを行う初期辞書アク
セス手段(4)と、 前記通常辞書(D2)とのアクセスを行う通常辞書アク
セス手段(5)と、 前記最長の登録文字列に一文字を加えた文字列に、識別
番号を付して前記通常辞書(D2)に登録する第1の辞
書登録手段(2)と、 前記最長の登録文字列に付された識別番号を、出力符号
に符号化する符号化手段(3)と、を有し、 前記第1の辞書検索手段(1)の前記初期辞書(D1)
への検索と、前記第1の辞書登録手段(2)の前記通常
辞書(D2)への登録は同時に行うように構成した こと
を特徴とするデータ圧縮回路。
A data compression circuit for compressing an input character string input from an information source by encoding the character string, an initial dictionary (D1) for registering the character string, and a character string registered in the initial dictionary. Included in the initial dictionary
Normal dictionary that registers character strings longer than
And 2), the initial dictionary (D1) or the normal of the registered character strings registered in the dictionary (D2), the first dictionary to find the longest registered character string that matches the inputted input character string search Means (1); initial dictionary access means (4) for accessing the initial dictionary (D1); normal dictionary access means (5) for accessing the normal dictionary (D2); and the longest registration A first dictionary registration unit (2) for registering a character string obtained by adding one character to a character string to the ordinary dictionary (D2) by adding an identification number; and an identification number assigned to the longest registered character string. has a coding means (3) for encoding an output code, the initial dictionary (D1) of the first dictionary search means (1)
Search and the first dictionary registration means (2)
A data compression circuit characterized in that registration in the dictionary (D2) is performed simultaneously .
【請求項2】 前記初期辞書(D1)及び前記通常辞書
(D2)は、外部ハッシュによるデータ検索及びデータ
登録を行うように構成したことを特徴とする請求項1記
載のデータ圧縮回路。
2. The data compression circuit according to claim 1, wherein the initial dictionary (D1) and the normal dictionary (D2) are configured to perform data search and data registration using an external hash.
【請求項3】 前記初期辞書(D1)及び前記通常辞書
(D2)は、完全ハッシュによるデータ検索及びデータ
登録を行うように構成したことを特徴とする請求項1記
載のデータ圧縮回路。
3. The data compression circuit according to claim 1, wherein the initial dictionary (D1) and the normal dictionary (D2) are configured to perform data search and data registration using a complete hash.
【請求項4】 前記初期辞書(D1)には第2文字まで
の文字列についてデータ検索及びデータ登録を行い、前
記通常辞書(D2)には第3文字以降の文字列について
データ検索及びデータ登録を行うように構成したことを
特徴とする請求項1記載のデータ圧縮回路。
4. A data search and data registration for a character string up to a second character in the initial dictionary (D1), and a data search and data registration for a character string after a third character in the normal dictionary (D2). 2. The data compression circuit according to claim 1, wherein the data compression circuit is configured to perform the following.
【請求項5】 前記第1の辞書検索手段(1)、前記第
1の辞書登録手段(2)及び前記符号化手段(3)は、
パイプラインにより並列処理されることを特徴とする請
求項1,2,3又は4記載のデータ圧縮回路。
5. The first dictionary search unit (1), the first dictionary registration unit (2), and the encoding unit (3)
5. The data compression circuit according to claim 1, wherein the data compression circuit is processed in parallel by a pipeline.
【請求項6】 情報源から入力された入力符号を、復号
化することにより復元するデータ復元回路において、 入力された入力符号を復号化する復号化手段(11)
と、 辞書(D3)に登録されている登録文字列のうち、前記
復号化によって復元された文字列と一致する登録文字列
を検索する第2の辞書検索手段(12)と、 前記登録文字列を蓄積する第1の蓄積手段(13)と、 前記登録文字列を蓄積する第2の蓄積手段(14)と、 前記第1の蓄積手段(13)又は前記第2の蓄積手段
(14)に蓄積された登録文字列のうち、いずれかの蓄
積された登録文字列を選択し、復元文字列として出力す
る出力選択手段(15)と、 前記辞書(D3)に登録されている登録文字列のうち、
前記復元文字列と一致する登録文字列を検索し、登録さ
れていない前記復元文字列に新たな符号を付して前記辞
書(D3)に登録する第2の辞書登録手段(16)と、 前記辞書(D3)とのアクセスを行う辞書アクセス手段
(17)と、 を有することを特徴とするデータ復元回路。
6. A decoding means (11) for decoding an input code inputted in a data restoration circuit for restoring an input code inputted from an information source by decoding.
A second dictionary search means (12) for searching a registered character string registered in the dictionary (D3) for a registered character string that matches the character string restored by the decoding; To the first storage means (13), to store the registered character string, and to the first storage means (13) or the second storage means (14). Output selecting means (15) for selecting any of the stored registered character strings from the stored registered character strings and outputting the selected registered character string as a restored character string; home,
A second dictionary registration unit (16) for searching for a registered character string that matches the restored character string, assigning a new code to the unregistered restored character string, and registering the restored character string in the dictionary (D3); And dictionary access means (17) for accessing the dictionary (D3).
【請求項7】 前記復号化手段(11)、前記第2の辞
書検索手段(12)、前記出力選択手段(15)及び前
記第2の辞書登録手段(16)は、パイプラインにより
並列処理されることを特徴とする請求項6記載のデータ
復元回路。
7. The decoding means (11), the second dictionary search means (12), the output selection means (15) and the second dictionary registration means (16) are processed in parallel by a pipeline. 7. The data restoration circuit according to claim 6, wherein:
【請求項8】 情報源から入力された入力文字列又は入
力符号を、符号化又は復号化することにより圧縮及び復
元を行うデータ圧縮・復元装置において、文字列を登録する初期辞書(D1)と、 前記初期辞書に登録された文字列及び前記初期辞書に含
まれる文字列よりも長い文字列を登録する通常辞書(D
2)と、 前記 初期辞書(D1)又は前記通常辞書(D2)に登録
されている登録文字列のうち、入力された入力文字列と
一致する最長の登録文字列を検索する第1の辞書検索手
段(1)と、前記初期辞書(D1)とのアクセスを行う
初期辞書アクセス手段(4)と、前記通常辞書(D2)
とのアクセスを行う通常辞書アクセス手段(5)と、前
記最長の登録文字列に一文字を加えた文字列に、識別番
号を付して前記通常辞書(D2)に登録する第1の辞書
登録手段(2)と、前記最長の登録文字列に付された識
別番号を、出力符号に符号化する符号化手段(3)とか
なり、前記第1の辞書検索手段(1)の前記初期辞書
(D1)への検索と、前記第1の辞書登録手段(2)の
前記通常辞書(D2)への登録は同時に行うように構成
したデータ圧縮回路と、 入力された入力符号を復号化する復号化手段(11)
と、辞書(D3)に登録されている登録文字列のうち、
前記復号化によって復元された文字列と一致する登録文
字列を検索する第2の辞書検索手段(12)と、前記登
録文字列を蓄積する第1の蓄積手段(13)と、前記登
録文字列を蓄積する第2の蓄積手段(14)と、前記第
1の蓄積手段(13)又は前記第2の蓄積手段(14)
に蓄積された登録文字列のうち、いずれかの蓄積された
登録文字列を選択し、復元文字列として出力する出力選
択手段(15)と、前記辞書(D3)に登録されている
登録文字列のうち、前記復元文字列と一致する登録文字
列を検索し、登録されていない前記復元文字列に新たな
符号を付して前記辞書(D3)に登録する第2の辞書登
録手段(16)と、前記辞書(D3)とのアクセスを行
う辞書アクセス手段(17)とからなるデータ復元回路
と、 を有することを特徴とするデータ圧縮・復元装置。
8. An initial dictionary (D1) for registering a character string in a data compression / decompression device that compresses and decompresses an input character string or an input code input from an information source by encoding or decoding. , containing the string and the initial dictionary registered in the initial dictionary
Normal dictionary that registers character strings longer than
And 2), the initial dictionary (D1) or the normal of the registered character strings registered in the dictionary (D2), the first dictionary to find the longest registered character string that matches the inputted input character string search Means (1), initial dictionary access means (4) for accessing said initial dictionary (D1), and said normal dictionary (D2)
A normal dictionary access means (5) for accessing the first dictionary, and a first dictionary registration means for registering a character string obtained by adding one character to the longest registered character string to the normal dictionary (D2) with an identification number (2) and encoding means (3) for encoding the identification number given to the longest registered character string into an output code, wherein the initial dictionary of the first dictionary search means (1)
(D1) search and the first dictionary registration means (2)
The registration to the normal dictionary (D2) is performed simultaneously.
Decoding means for decoding and the data compression circuit, the inputted input code (11)
And of the registered character strings registered in the dictionary (D3)
A second dictionary search unit (12) for searching for a registered character string that matches the character string restored by the decoding, a first storage unit (13) for storing the registered character string, Storage means (14) for accumulating the data, and the first storage means (13) or the second storage means (14)
Output selection means (15) for selecting one of the stored registered character strings from the registered character strings stored in the dictionary and outputting as a restored character string; and a registered character string registered in the dictionary (D3). A second dictionary registration unit (16) for searching for a registered character string that matches the restored character string, assigning a new code to the unregistered restored character string, and registering the restored character string in the dictionary (D3). And a data decompression circuit comprising: a dictionary access unit (17) for accessing the dictionary (D3).
JP34571191A 1991-12-27 1991-12-27 Data compression / decompression device Expired - Fee Related JP3132774B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP34571191A JP3132774B2 (en) 1991-12-27 1991-12-27 Data compression / decompression device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP34571191A JP3132774B2 (en) 1991-12-27 1991-12-27 Data compression / decompression device

Publications (2)

Publication Number Publication Date
JPH05181641A JPH05181641A (en) 1993-07-23
JP3132774B2 true JP3132774B2 (en) 2001-02-05

Family

ID=18378449

Family Applications (1)

Application Number Title Priority Date Filing Date
JP34571191A Expired - Fee Related JP3132774B2 (en) 1991-12-27 1991-12-27 Data compression / decompression device

Country Status (1)

Country Link
JP (1) JP3132774B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5523144B2 (en) * 2010-02-25 2014-06-18 キヤノン株式会社 Information processing apparatus, control method thereof, program, and storage medium
WO2013079999A1 (en) * 2011-12-02 2013-06-06 Canon Kabushiki Kaisha Methods and devices for encoding and decoding messages
JP6613669B2 (en) 2015-07-14 2019-12-04 富士通株式会社 Compression program, compression method, information processing apparatus, replacement program, and replacement method

Also Published As

Publication number Publication date
JPH05181641A (en) 1993-07-23

Similar Documents

Publication Publication Date Title
JP3273119B2 (en) Data compression / decompression device
US5229768A (en) Adaptive data compression system
JP3278297B2 (en) Data compression method, data decompression method, data compression device, and data decompression device
US5406278A (en) Method and apparatus for data compression having an improved matching algorithm which utilizes a parallel hashing technique
JP3541930B2 (en) Encoding device and decoding device
US5151697A (en) Data structure management tagging system
US5585793A (en) Order preserving data translation
JPS6356726B2 (en)
JP3241788B2 (en) Data compression method
US5610603A (en) Sort order preservation method used with a static compression dictionary having consecutively numbered children of a parent
JP3132774B2 (en) Data compression / decompression device
JP3241787B2 (en) Data compression method
JP3117760B2 (en) Data restoration method
JP2954749B2 (en) Data compression method
JPH05152971A (en) Data compressing/restoring method
JP2774350B2 (en) Data compression method and data restoration method of compressed data
JP3038233B2 (en) Data compression and decompression device
JP3053656B2 (en) Dictionary registration method in data compression
JPH05241775A (en) Data compression system
JP2825960B2 (en) Data compression method and decompression method
JP3012677B2 (en) ZL encoding method
JP2999561B2 (en) Data compression and decompression device
JP3088740B2 (en) Data compression and decompression method
JP3388768B2 (en) Data compression and decompression method
JP2952067B2 (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: 20001108

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081124

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081124

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091124

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees