JPH05181641A - Data compressing/restoring device - Google Patents

Data compressing/restoring device

Info

Publication number
JPH05181641A
JPH05181641A JP34571191A JP34571191A JPH05181641A JP H05181641 A JPH05181641 A JP H05181641A JP 34571191 A JP34571191 A JP 34571191A JP 34571191 A JP34571191 A JP 34571191A JP H05181641 A JPH05181641 A JP H05181641A
Authority
JP
Japan
Prior art keywords
dictionary
character string
registered
data
input
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.)
Granted
Application number
JP34571191A
Other languages
Japanese (ja)
Other versions
JP3132774B2 (en
Inventor
Yoshiyuki Okada
佳之 岡田
Shigeru Yoshida
茂 吉田
Yasuhiko Nakano
泰彦 中野
Hirotaka Chiba
広隆 千葉
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)

Abstract

PURPOSE:To improve data compression and restoration processing speeds. CONSTITUTION:This device is constituted of a data compressing circuit and a data restoring circuit. The data compressing circuit is constituted of a dictionary retrieving means 1, a dictionary registering means 2, an encoding means 3, an initial dictionary access means 4, a regular dictionary access means 5, an initial dictionary D1 and a regular dictionary D2. Among them, the dictionary retrieving means 1, the dictionary registering means 2 and the encoding means 3 are subjected to parallel processing by a pipeline. Also, the data restoring circuit is constituted of a decoding means 11, a dictionary retrieving means 12, a first accumulating means 13, a second accumulating means 14, an output selecting means 15, a document registering means 16 and a dictionary access means 17. Amount them, the decoding means 11, the dictionary retrieving means 12 and the output selecting means 15 are subjected to parallel processing by a pipeline.

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

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

【0004】なお、「文字(Character )」及び「文字
列(Character String)」の定義はJIS−C6230
に従うほか、情報理論で用いられている呼称を踏襲し、
1ワード単位で構成されるデータを「文字」と呼び、任
意のワード単位で構成されるデータを「文字列」と呼ぶ
ことにする。
The definitions of "Character" and "Character String" are defined in JIS-C6230.
In addition to obeying the name used in information theory,
Data composed of one word unit is called "character", and data composed of arbitrary word unit is called "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 system has been proposed as an example of compressing the above data.
As a typical example of the universal coding system, LZ (Le
mpel-Ziv) There are an encoding method and an arithmetic encoding method. Also, L
Universal encoding and incremental decomposition type (Increm
(ental persing) algorithm has been proposed. Further, as an improved encoding method of these algorithms, there are an LZSS encoding method belonging to a universal type and an LZW (Lempel-Ziv-Welch) encoding method belonging to an incremental decomposition type.

【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 coding method is described in, for example, “Lempel-Ziv data compression method” by Seiji Munakata, Information Processing, pp.2-6, V.
See ol.26, No.1, 1985 for details. Also, L
The ZSS encoding method is TC Bell, "Better OPM / L Text Co.
mpression ", IEEE Trans.on Commu., Vol.COM-34, No.1
2, Dec. 1986. Furthermore, LZW
The encoding method is TA Welch, "A Technique for High-Perf
ormance Data Compression ", Computer, Jun. 1984. The incremental decomposition type encoding method and the LZW encoding method are disclosed in Japanese Patent Laid-Open No. 59-231683 and US Pat.
o. 4,558,302.

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

【0008】以下、LZW符号化法を使用したデータ圧
縮回路及びデータ復元回路の詳細について説明する。図
15は、従来のデータ圧縮回路を示す図である。図にお
いて、従来のデータ圧縮回路は、辞書検索手段121、
辞書登録手段122、ユニバーサル符号化手段123及
び辞書D12から構成される。
The details of the data compression circuit and the 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, the conventional data compression circuit includes a dictionary search means 121,
The dictionary registration unit 122, the universal encoding unit 123, and the dictionary D12 are included.

【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 inputted input character string. Dictionary registration means 122
Adds an identification number to the input character string that could not be searched by the dictionary search means 121 and registers it in the dictionary 122. The universal encoding means 123 encodes the identification number added to the registered character string searched by the dictionary searching means 121 or the identification number newly added to the input character string by the dictionary registration means 122 to the output code.

【0010】辞書検索手段121、辞書登録手段122
及びユニバーサル符号化手段123の符号化処理は、シ
ーケンシャルに行われる。この符号化処理手順の一例を
図16に示す。
Dictionary search means 121 and dictionary registration means 122
The encoding process of the universal encoding means 123 is performed sequentially. FIG. 16 shows an example of this 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 column 126, dictionary registration column 127, and encoding column 12
A table consisting of 8 is shown.

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

【0013】まず、サイクル1〜サイクル3では、入力
された入力文字列の最初の1文字について、辞書登録手
段122が辞書D12を検索する過程を示す。具体的に
は、辞書検索の結果、入力文字列と登録文字列がサイク
ル1及びサイクル2では一致せず、サイクル3で一致し
たことを示す。
First, in cycle 1 to cycle 3, a process in which the dictionary registration means 122 searches the dictionary D12 for the first one character of the input character string is shown. Specifically, the dictionary search result indicates that the input character string and the registered character string do not match in cycle 1 and cycle 2, but 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 for the second character of the input character string that has been input.
22 shows a process of searching the dictionary D12. In particular,
The input character string and the registered character string do not match in cycle 4 and cycle 5, and in cycle 6 it 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. In addition, for encoding, the universal encoding means 123 encodes the identification number given at the time of dictionary registration. This is the "encoding" shown in cycle 8. Hereinafter, the encoding process is similarly performed.

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

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

【0018】これら、ユニバーサル復号化手段131、
辞書検索手段132、スタック蓄積手段133及び辞書
登録手段134の復号化処理は、シーケンシャルに行わ
れる。この復号化処理手順の一例を図18に示す。
These universal decoding means 131,
The decoding process 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 the conventional data restoration circuit. In the figure, the processing code number column 136,
Decryption column 137, search / accumulation column 138, character string output column 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 shows the number of codes processed when the input code is decoded. Decryption field 137
Shows the contents processed by the universal decoding means 131 of FIG. The search / accumulation column 138 is a dictionary search means 13
2 indicates a process of searching and the stack storage unit 133 stores the searched character. The character string output column 139 shows a process of outputting all the characters accumulated by the stack accumulating unit 133. The numbers in the circles indicate the order of processing procedures. Hereinafter, as in FIG. 16, the “number X in the circle” will be referred to as the “cycle X”.

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

【0022】[0022]

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

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

【0024】また、本発明の他の目的は、入力符号の復
元処理を並列処理により高速化するデータ復元回路を提
供することである。さらに、本発明の他の目的は、入力
データの圧縮処理及び入力符号の復元処理を、並列処理
により高速化するデータ圧縮・復元装置を提供すること
である。
Another object of the present invention is to provide a data restoration circuit which speeds up the 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 input data compression processing and the input code decompression processing 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は、
最長の登録文字列に付された識別番号を、出力符号とし
て符号化する。
In the present invention, in order to achieve the above object, as shown in FIG. 1, the data compression circuit includes a first dictionary search means 1, a first dictionary registration means 2 and an encoding means. 3, an initial dictionary access unit 4, a normal dictionary access unit 5, an initial dictionary D1 and a normal dictionary D2. First
The dictionary search means 1 searches for the longest registered character string that matches the input character string input from the registered character strings registered in the initial dictionary D1 via the initial dictionary access means 4. If the initial dictionary D1 cannot be searched, the search ends. When 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 means 2 assigns an identification number to the character string obtained by adding one character to the longest registered character string searched by the first dictionary search means 1, and the normal dictionary D2 via the normal dictionary access means 5. Register with. The encoding means 3 is
The identification number attached 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 by 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 retrieval and data registration by 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 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に登録されていない文字列に、新たな符号を付し
て登録する。
Moreover, as shown in FIG. 3, the data restoration circuit includes a decoding means 11, a second dictionary searching means 12, a first accumulating means 13, a second accumulating means 14, an output selecting means 15, and a first accumulating means. 2 dictionary registration means 16 and dictionary access means 17
And a dictionary D3. The decoding means 11 decodes the inputted input code. Second dictionary search means 12
Searches the registered character strings registered in the dictionary D3 via the dictionary access means 17 for a character string that matches the character string restored by decoding. First storage means 13
The second storage means 14 stores the character string restored by this search. The output selection unit 15 selects a restored character string to be output from the accumulated character strings. The second dictionary registration means 16 adds a new symbol to a character string that is not registered in the dictionary D3 among the selected restored character strings and registers the character string.

【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から構成する。
Further, the decryption means 11, the second dictionary search means 12, the output selection means 15 and the second dictionary registration means 16 are provided.
Are connected by 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 comprises a first dictionary search means 1, a first dictionary registration means 2, an encoding means 3, an initial dictionary access means 4, a normal dictionary access means 5, an initial dictionary D1 and a normal dictionary D2. Further, the data restoration circuit includes a decoding unit 11, a second dictionary searching unit 12, a first storing unit 13, a second storing unit 14, an output selecting unit 15, a second dictionary registering unit 16,
It is composed of the dictionary access means 17 and the 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 input from the initial dictionary D1 via the initial dictionary access means 4. If the initial dictionary D1 is not searched, the normal dictionary D2 is also searched via the normal dictionary access unit 5. Then, the first dictionary registration means 2 adds an identification number to the character string obtained by adding one character to the longest searched character string, and registers it in the normal dictionary D2 via the normal dictionary access means 5. The encoding means 3 encodes the identification number attached to the retrieved longest registered character string into an output code.

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

【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 the 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 and processed in parallel.

【0033】そのうえ、データ復元回路において、復号
化手段11が入力された入力符号を復号化し、第2の辞
書検索手段12が辞書アクセス手段17を介して辞書D
3のうち、復号化によって復元された文字列と一致する
文字列を検索し、第1の蓄積手段13及び第2の蓄積手
段14に復元された文字列を出力する。出力選択手段1
5は出力する復元文字列を選択し、第2の辞書登録手段
16が未登録の復元文字列に新たな符号を付し、辞書ア
クセス手段17を介して辞書D3に登録する。
Moreover, in the data restoration circuit, the decoding means 11 decodes the input code, and the second dictionary searching means 12 causes the dictionary D via the dictionary accessing means 17.
Among the three, the 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
Reference numeral 5 selects the restored character string to be output, the second dictionary registration means 16 adds a new symbol to the unregistered restored character string, and registers it 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に登録す
る。
Further, the decoding means 11, the second dictionary search means 12, the output selection means 15 and the second dictionary registration means 16 are provided.
Connect in a pipeline for parallel processing. In the data compression / decompression device, the first
Of the dictionary search means 1 through the initial dictionary access means 4
The input character string input is searched from the initial dictionary D1. If the initial dictionary D1 is not searched, the normal dictionary D2 is also searched via the normal dictionary access unit 5.
Then, the first dictionary registration means 2 adds an identification number to the character string obtained by adding one character to the longest searched character string, and registers it in the normal dictionary D2 via the normal dictionary access means 5.
The encoding means 3 encodes the identification number attached to the retrieved longest registered character string into an output code. In the data restoration circuit, the decoding means 11 decodes the input code, and the second dictionary searching means 12 matches the character string restored by decoding in the dictionary D3 via the dictionary access means 17. The retrieved character string is searched, and the restored character string is output to the first accumulating unit 13 and the second accumulating unit 14. The output selection unit 15 selects the restored character string to be output, the second dictionary registration unit 16 adds a new symbol to the unregistered restored character string, and registers it in the dictionary D3 via the dictionary access unit 17.

【0035】[0035]

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

【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 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. Among the registered character strings, the longest registered character string that matches the input character string input from the information source is searched. The first dictionary registration means 2 attaches an identification number to the character string obtained by adding one character to the longest searched character string searched, and adds the identification number to the initial dictionary D1 via the initial dictionary access means 4.
Or in the normal dictionary D2 via the normal dictionary access means 5. The initial dictionary access unit 4 is a unit for accessing the initial dictionary D1 and is, for example, the first dictionary.
The logical addresses instructed by the dictionary search means 1 and the first dictionary registration means 2 are converted into physical addresses, and data is input / output to / from the initial dictionary D1. The normal dictionary access means 5 is a means for accessing the normal dictionary D2, for example, by converting a logical address instructed by the first dictionary search means 1 and the first dictionary registration means 2 into a physical address. , And inputs / outputs data to / from the normal dictionary D2. The encoding unit 3 uses, for example, an LZW encoding unit, and encodes the identification number attached to the longest searched registration character string as an output code.

【0037】ここで、通常辞書D2に登録される「最長
の登録文字列に一文字を加えた文字列」は、次のような
文字列である。例えば、入力文字列が「abcd」であ
り、既に通常辞書D2に登録されている最長の登録文字
列が「ab」であるならば、入力文字列のうち最長の登
録文字列と一致している「ab」の次の一文字「c」を
加えた文字列「abc」である。
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", it matches the longest registered character string of the input character strings. It is a character string “abc” in which 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 the complete hash method or the external hash method described later.

【0039】また、第1の辞書検索手段1、第1の辞書
登録手段2及び符号化手段3の各手段は、いずれも図示
されていないパイプラインで接続されており、並列に処
理することができる。このパイプライン並列処理によ
り、複数の手段での符号化処理が可能となり、高速に符
号化処理を行うことができる。
The first dictionary search means 1, the first dictionary registration means 2 and the encoding means 3 are all connected by a pipeline (not shown) and can be processed in parallel. it can. By this pipeline parallel processing, the encoding processing can be performed by a plurality of means, and the 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 to this parallel processing is the first dictionary search means 1 and the first dictionary registration means 2.
Simultaneously requests access to the initial dictionary D1 or the normal dictionary D2. For example, this is a case where the first dictionary search means 1 and the first dictionary registration means 2 simultaneously request access to the initial dictionary D1. In this way, a state in which access requests are simultaneously made by two or more means is called “collision”. When a collision occurs, for example, the first dictionary registration means 2 accesses the initial dictionary D1 via the initial dictionary access means 4, and then the first dictionary search means 1 similarly accesses the initial dictionary D1. So you will access the dictionary sequentially. However, such a collision is an extremely rare phenomenon from the viewpoint of the entire encoding process. Therefore, the processing time is negligible from the viewpoint of the entire processing time, and there is no problem even if the dictionary and access processing are performed sequentially. An example of this encoding processing procedure is shown below 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 processing character number column 6 shows the character rank from the beginning which is processed when the input character string is encoded. Dictionary search field 7
Indicates 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 means 2. The encoding column 9 shows the contents processed by the encoding means 3.

【0042】なお、円内の数字は処理手順の順番を示
す。以下、「円内の数字X」を「サイクルX」と表記す
る。また、同じ円内の数字がある場合には、同時に並列
して処理が行われることを示す。そして、初期辞書D1
とのアクセスは初期辞書アクセス手段4を介して行わ
れ、また、通常辞書D2とのアクセスは通常辞書アクセ
ス手段5を介して行われるものとして、この過程の表記
を省略する。
The numbers in the circles indicate the order of processing procedures. Hereinafter, the “number X in the circle” will be referred to as the “cycle X”. If there are numbers in the same circle, it means that the processes are performed in parallel at the same time. And the initial dictionary D1
Since the access to and is performed through the initial dictionary access means 4, and the access to the normal dictionary D2 is performed through the normal dictionary access means 5, 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 searching means 1 searches the initial dictionary D1 for the second character following the first first character of the input character string input from the information source.
In cycle 2, the first dictionary searching means 1 searches the normal dictionary D2 for the third character of the input character string. Cycle 3
For the fourth character of the input character string, the first dictionary search means 1 searches the normal dictionary D2. 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 cycle 1 to cycle 3
In the process of, 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 column 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 column 8, cycle 3 of the dictionary search column 7
Then, an identification number is given to the character string of the first character to the fourth character of the input character string which has not been registered in the normal dictionary D2, and the first dictionary registration means 2 registers it 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,
The first dictionary searching means 1 searches the normal dictionary D2 for the sixth character following the fifth character of the input character string. At the same time, in cycle 5 of encoding column 9, cycle 4 of dictionary registration column 8
The identification number attached to the registration character string performed in step 1 is encoded. Thereafter, similar processing is continued.

【0046】このように、辞書検索欄7において初期辞
書D1又は通常辞書D2を検索した結果、入力文字列が
登録されていなかった場合には、辞書登録欄8における
文字列の登録、及び符号化欄9における符号化を、辞書
検索と並列して行う。このため、符号化処理を高速に行
うことができる。
In this way, when the input character string is not registered as a result of searching the initial dictionary D1 or the normal dictionary D2 in the dictionary search field 7, the character string is registered and encoded in the dictionary registration field 8. 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 means 11, a second dictionary search means 12, a first storage means 13, a second storage means 14, an output selection means 15, a second dictionary registration means 16, and a dictionary access. Means 17 and dictionary D3
Composed 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とのデータの入出力を行う。
The decoding means 11 is, for example, an LZW decoding means, and decodes the input code input from the information source. The second dictionary search means 12 is the dictionary access means 1
Of the registered character strings registered in the dictionary D3 via 7, a character string that matches the character string restored by decoding is searched. First storage means 13 and second storage means 1
4 stores the character string restored by the search. The output selection unit 15 selects a restored character string to be output from the accumulated character strings. The second dictionary registration means 16 adds a new symbol to a character string that is not registered in the dictionary D3 among the selected restored character strings and registers the character string. The dictionary access unit 17 is a unit for accessing the dictionary D3, and for example, converts a logical address instructed by the second dictionary search unit 12 and the second dictionary registration unit 16 into a physical address, and then the dictionary. Inputs / outputs data to / from D3.

【0049】なお、辞書アクセス手段17から辞書D3
へのアクセスは、後述する完全ハッシュ法又は外部ハッ
シュ法によって行うこともできる。また、図1のデータ
圧縮回路で説明した「衝突」は、このデータ復元回路で
も発生する。例えば、第2の辞書検索手段12が検索要
求を、第2の辞書登録手段16が登録要求を同時にする
場合である。この場合、例えば第2の辞書登録手段16
の登録処理後に、第2の辞書検索手段12の検索処理を
行うようにシーケンシャルに行われる。データ圧縮回路
の場合と同様に、衝突は全体の復号化処理から見れば極
めて稀な現象であるため、全体の処理時間から見れば無
視できる程の処理時間に過ぎないので、シーケンシャル
に辞書とアクセス処理を行なっても問題はない。
Incidentally, the dictionary D3 from the dictionary access means 17
The access to can also be performed by the complete 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 decompression 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 means 16
After the registration processing of, the search processing of the second dictionary search means 12 is sequentially performed. As in the case of the data compression circuit, collision is an extremely rare phenomenon from the viewpoint of the entire decoding process, so it is only a negligible processing time from the viewpoint of the overall processing time. There is no problem in processing.

【0050】そして、復号化手段11、第2の辞書検索
手段12、第1の蓄積手段13、第2の蓄積手段14、
出力選択手段15及び第2の辞書登録手段16の各手段
は、いずれも図示されていないパイプラインで接続され
ており、並列に処理することができる。このパイプライ
ン並列処理により、複数の手段での符号化処理が可能と
なり、高速に符号化処理を行うことができる。以下、こ
の復号化処理手順の一例を図4に示す。
Then, the decrypting means 11, the second dictionary searching means 12, the first accumulating means 13, the second accumulating means 14,
The output selecting means 15 and the second dictionary registering means 16 are connected by a pipeline (not shown), and can be processed in parallel. By this pipeline parallel processing, the encoding processing can be performed by a plurality of means, and the encoding processing can be performed at high speed. An example of this decoding processing procedure is shown below 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 column 21, a decoding column 22, a search / accumulation column 23, a character string output column 24, and a dictionary registration column 25.

【0052】処理符号数欄21は、入力符号が復号化さ
れる際に処理される符号数を示す。復号化欄22は、図
3の復号化手段11が処理する内容を示す。検索・蓄積
欄23は、第2の辞書検索手段12が検索し、スタック
蓄積手段13,14が検索された文字を蓄積する処理を
示す。文字列出力欄24は、出力選択手段15がスタッ
ク蓄積手段13,14に蓄積した文字を全て出力する処
理を示す。辞書登録欄25は、第2の辞書登録手段16
が処理する内容を示す。
The processing code number column 21 shows the number of codes processed when the input code is decoded. The decryption column 22 shows the contents processed by the decryption means 11 in FIG. The search / accumulation column 23 shows a process of accumulating the characters searched by the second dictionary searching means 12 and searched by the stack accumulating means 13 and 14. 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 includes the second dictionary registration means 16
Indicates the contents processed by.

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

【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 column 22, the decoding means 11 decodes the second input code. At the same time, in the cycle 2 of the search / accumulation column 23, the second dictionary search means 12
The coded character decoded by is searched from the dictionary D3. Also,
The retrieved restored character is stored in the stack by the stack storage unit 13. These cycles 2 are processed in parallel.

【0055】次に、サイクル3及びサイクル4では、後
述する再帰的な復号により、第2の辞書検索手段12が
復号化した符号文字を辞書D3から検索し、スタック蓄
積手段13が検索された復元文字をスタックに蓄積す
る。
Next, in cycles 3 and 4, the code characters decoded by the second dictionary retrieval means 12 are retrieved from the dictionary D3 by recursive decoding, which will be described later, and the stack storage means 13 retrieves and restores them. 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 coded characters decoded by the second dictionary search means 12 are searched from the dictionary D3, and the stack storage means 14 stores the searched restored characters 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 cycles 3 to 4 is output. These cycle 5
Processing is performed in parallel.

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

【0058】このように、復号化欄22で行う復号化と
並列して、一方のスタック蓄積手段が検索した文字を蓄
積し、他方のスタック蓄積手段が蓄積した文字列を復元
文字列として出力する処理を行うことができる。このた
め、復号化処理を高速に行うことができる。
In this way, in parallel with the decoding performed in the decoding column 22, the characters retrieved by one stack accumulating means are accumulated, and the character string accumulated by the other stack accumulating means 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 comprises a data compression circuit and a data decompression circuit. The data compression circuit comprises a first dictionary search means 1, a first dictionary registration means 2, an encoding means 3, an initial dictionary access means 4, a normal dictionary access means 5, an initial dictionary D1 and a normal dictionary D2. Further, the data restoration circuit includes a decoding means 11 and a second dictionary search means 1
2, the first storage unit 13, the second storage unit 14, the output selection unit 15, the second dictionary registration unit 16, the dictionary access unit 17, and the dictionary D3.

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

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

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

【0063】このようなハッシュ法を使用した辞書検索
及び辞書登録では、ハッシュ関数Hをどのように選んで
も、相異なる検索キーの内部コードω1 ,ω2 に対し
て、ハッシュアドレスが H(ω1 )=H(ω2 ) となる場合が起こり得る。このような状態を「衝突」と
呼び、この衝突を回避するために外部ハッシュ法(「オ
ープンハッシュ法」又は「連鎖法」とも呼ばれている)
が用いられる。また、衝突が起こらないように、予め表
に検索キーの内部コードωにとり得る全ての値を用意す
る方法が完全ハッシュ法である。以下、外部ハッシュ法
による場合と完全ハッシュ法による場合とに分けて説明
する。
In the dictionary search and dictionary registration using such a hash method, no matter how the hash function H is selected, the hash addresses are H (ω) for the internal codes ω 1 and ω 2 of different search keys. There may be cases where 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 this collision.
Is used. Further, the perfect hash method is a method in which all possible values for the internal code ω of the search key are prepared in advance in the table so that no collision occurs. Hereinafter, the case of using the external hash method and the case of 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 the data structure of the external hash method. In the external hash method, first, the hash function H
A table corresponding to the addresses obtained by the above, that is, an array called Bucket Header (BH) is prepared. In the figure, this bucket header BH is provided with b list headers (list headders) having hash addresses 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 linked 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 and the list L02 are combined with each other by setting a pointer to the list L02. This relationship is indicated by arrow A2. If the lists L02 and the subsequent ones are not linked by the pointers, the terminal symbol “0” is set. Hereinafter, the list headers having hash addresses 1 to (b-1) are similarly linked to the list L by the list structure.

【0066】なお、データの検索は次の手順で処理が行
われる。なお、ここではハッシュ関数Hにより求められ
るハッシュアドレスが「3」である場合を例に説明す
る。求められたハッシュアドレス「3」に対応するバケ
ットヘッダBHのリストヘッダから、最初のリストL3
1へのポインタを取得する。そして、最初のリストL3
1内のデータと照合する。もし、データが一致しなけれ
ば、次のリストL32へのポインタを取得し、次のリス
トL32のデータと照合する。もし、データが一致しな
ければ、所望のデータが見つからなかったことを示す。
なお、リストL32に次のリストへのポインタが設定さ
れているならば、同様の検索処理を経て、目的のデータ
を検索する。
The data retrieval is performed in the following procedure. Note that, here, a 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
Get a pointer to 1. And the first list L3
Match with the data in 1. If the data do not match, a pointer to the next list L32 is obtained and collated with the data in the next list L32. If the data do not match, it indicates that the desired data was not found.
If a pointer to the next list is set in the list L32, the target data is searched through similar search processing.

【0067】また、データの登録は次の手順で処理が行
われる。データの検索と同様に、ハッシュ関数Hにより
求められるハッシュアドレスが「3」である場合を例に
説明する。求められたハッシュアドレス「3」に対応す
るバケットヘッダBHのリストヘッダから最初のリスト
L31へのポインタを取得する。そして、次のリストへ
のポインタが「0」になるまでリストをたどる。図6の
例ではリストL32が最後のリストであるから、ここで
新たなデータのリストを生成し、生成したリストへのポ
インタをリストL32内のポインタ格納域に設定する。
Data registration is performed according to the following procedure. Similar to the data search, the 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 acquired from the list header of the bucket header BH corresponding to the obtained hash address “3”. Then, the list is traced until the pointer to the next list becomes "0". Since the list L32 is the last list in the example of FIG. 6, 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 the dictionary having such a data structure, data retrieval 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 by the external hash method. In the figure, the dictionary is the first memory FM, next in order to speed up the search and registration process.
It is composed of three physical memories, a memory NM and an extention memory EM. Further, 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, the data retrieval using this dictionary is processed 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 obtained by the hash function H of this character string is “ω 1 ” is 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 hash function H
Dress ω1From the address of the first memory FM of the initial dictionary
Ω1Pointer to the next list stored intwenty oneTo
get. And a pointer ω to the next listtwenty oneFrom
 address of extention memory EM ωtwenty oneStored in
Data Ktwenty oneTo match. In this case, the character string Ktwenty twoK32K 42
First letter Ktwenty twoDoes not match with, so next memory NM
Address of ωtwenty oneTo the next list from ωtwenty twoGet
To do.

【0071】次に、次のリストへのポインタω22から、
通常辞書の firstメモリFMのアドレスω22に格納され
ている次のリストへのポインタω31を取得する。以下、
初期辞書の場合と同様な検索が行われる。そして、最後
は extentionメモリEMのアドレスω41に格納されてい
るデータK21と照合したが、一致する文字列が検索でき
ずに終了した。この過程を図7では矢印で示す。
Next, from the pointer ω 22 to the next list,
The pointer ω 31 to the next list stored in the address ω 22 of the first memory FM of the normal dictionary is acquired. Less than,
The same search as in the case of the initial dictionary is performed. Finally, the data K 21 stored in the address ω 41 of the extention memory EM was collated, but the matching character string could not be retrieved, and the process ended. 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を登録する。こうして、新た
な文字列の登録が行われる。
Data registration using this dictionary is performed by the following procedure. Note that, here, a case will be described as an example in which the character string “K 22 K 32 K 42 ” that cannot be searched in the above is registered. The list is traced until the pointer to the next list becomes "0" by the same process as the above-mentioned data search. In this case, the address of the next memory NM becomes ω 41 . Here, the character K 42 is generated at another address of the extention memory EM. In FIG. 7, this address is ω 42 , and “0” is set in the next memory NM at the same address. Also, to concatenate the lists, ne
At the address ω 41 of the xt memory NM, ω 42 which is a pointer to the newly generated list is registered. In this way, a new character string is registered.

【0073】なお、上記のデータ検索及びデータ登録を
行う初期辞書には第2文字までの文字列について行い、
通常辞書には第3文字以降の文字列について行う。こう
することにより、入力文字列が最適に分散されるため、
データ検索及びデータ登録を行う際の処理時間を抑える
ことができる。
It should be noted that the above-mentioned data search and data registration are performed for character strings up to the second character in the initial dictionary.
In the normal dictionary, the character string starting from the third character is used. This will optimally distribute the input string, so
It is possible to reduce the processing time when performing data search and data registration.

【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 after the third character.
For example, the initial dictionary may be a character string of up to the third character, and the normal dictionary may be a character string of the fourth character or later, depending on the nature of the input character string. By doing so, it is possible to construct an optimal dictionary corresponding to various properties of the input character string.

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

【0076】図において、辞書は完全ハッシュメモリP
Mのみの物理的なメモリから構成され、登録するデータ
の内容に応じて初期辞書と、通常辞書とに分けられる。
また、完全ハッシュメモリPMのアドレスは、各文字列
のデータと一対一に対応させるため、ハッシュアドレス
ωとデータアドレスKとから構成される。
In the figure, the dictionary is a complete hash memory P.
It is composed of a physical memory of only M, and is divided into an initial dictionary and a normal dictionary according to the contents of data to be registered.
Further, 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 the 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 total of 2
The 8-bit address is used as the address of the complete hash memory PM. That is, each hash address ω
Indicates the start address of each block of 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 」である場合を例に説明する。
Data retrieval using this dictionary is performed by the following procedure. Here, a case where the character string to be searched is “K 2 K 3 K 4 K 5 ”, and the hash address obtained by the hash function H of this character string is “ω 1 ” is described as an example.

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

【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 string3Is valid or not
To check the address ω1・ K 2Stored in
Pointer to next ωtwenty oneTo get. And the address ωtwenty one
And the second character K in the string3Data of the initial dictionary
Dress ωtwenty one・ K3To get the flag FL stored in
It Hereinafter, the search is performed by the same process. That
And finally the address ω41・ KFiveFlags stored in
Matches with FL, and 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」に設定する。こうして、新たな文字列の登
録が行われる。
Data registration using this dictionary is performed by the following procedure. Here, it is described as an example a case of registering the character string "K 2 K 3 K 4 K 5" that could not be searched in the above. The list is traced until the pointer to the next list becomes "0" by the same process as the above-mentioned data search. In this case, the address of the complete hash memory PM is ω 41 · K 5 . Here, the flag FL is set to "1". In this way, 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. Figure 9
It is a figure which shows the specific example at the time of encoding an input character string by the encoding algorithm of a LZW code. This input character string is a character string consisting of a combination of only three characters a, b, and c. First, initialization is performed in advance by registering only one character a, b, and c in the dictionary in association with the 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 character by character from left to right. The first letter a is read and this a is used as the prefix (string). Next, the second character b is read, and ab obtained by adding this b to the preceding letter a is collated with the registered character string in the dictionary. At this time, since there is no character string matching ab in the dictionary, the corresponding code 1 of the preceding letter a is output as the 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 association with the code 4. The contents registered in this dictionary are shown in the registration contents column 73. Here, let the second input character b be the initial letter 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, which is the initial character b plus this a, is collated with the registered character string in the dictionary. At this time, since the character string matching ba is not in the dictionary, the corresponding code 2 of the initial letter b is output as the encoded output, and the character string ba is registered in the dictionary in correspondence with the code 5. In addition, the third input character a is defined as the initial letter.

【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 which is obtained by adding this b to the initial character a is collated with the registered character string in the dictionary. At this time, since the character string matching ab is registered in the dictionary, ab is the initial character string at this time.
Furthermore, the fifth input character c is read and the initial character string a
The abc obtained by adding the c to the b is collated 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 correspondence with the code 6. Then, the fifth input character c is set as the initial letter again.

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

【0087】図10は、以上に例示した符号化の処理手
順を示すフローチャートである。図において、Sに続く
数字はステップ番号を示す。 〔S101〕予め初期化によって、入力される可能性の
ある全一文字に対しそれぞれ符号を対応させて辞書に登
録する。また、辞書において次に登録すべきアドレスn
を、例えば256に設定する。ここで、nは辞書に登録
される文字列に対応して符号を0,1,2,・・・と付
した場合、登録文字列の総数に相当する。さらに、入力
文字列を読み込み、入力した最初の文字を語頭文字列
(prefix string )ωとする。
FIG. 10 is a flow chart showing the encoding processing procedure exemplified above. In the figure, the number following S indicates a step number. [S101] By initializing, all the one characters that may be input are registered in the dictionary in correspondence with the codes. The address n to be registered next in the dictionary
Is set to 256, for example. Here, n corresponds 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. Furthermore, the input character string is read, and the first character input is used 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 there is input character data. 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, and the corresponding code code (ω) is read and output as a coded output. At this time, the code code (ω) is converted into a binary code having a bit number of [log 2 n] and output. here,
The symbol [x] represents the smallest integer among the integers of the numerical value x or more. Hereinafter, the symbol [x] will be used in this sense. Since there is no character string to be processed in this step, this step is terminated after this step is executed.

【0090】〔S105〕語頭文字列ωに、ステップS
102で読み込んだ文字Kを加えた文字列ωKを辞書と
照合し、文字列ωKが辞書に登録されているか否かを判
別する。もし、登録されていればステップS106に進
み、登録されていなければステップS107に進む。
[S105] Step S is added to the initial character string ω.
The character string ωK added with the character K read in 102 is collated with the dictionary to determine whether 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 set again as the initial character string ω. Then, the process returns to step S102 again. In this way, by repeating steps S102 to S106, as a character string that matches the input character string,
The maximum length character string of 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, and the corresponding code code (ω) is read out and output as a coded 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 address n of the dictionary
The character string ωK is stored in. Further, the character K read in step S102 is used as the initial character string ω, and the dictionary address n is incremented to prepare for execution of step S102 and subsequent steps for the next new input character string.

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

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

【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 by referring to the dictionary. Further, the code 1 of "1b" is referenced to read the corresponding character a. Such a series of repeated read operations is called "recursive decoding". This is the recursive decoding field 8
2 shows. As a result, 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, a combination of the previous input code 2 and the first character a of the character string restored this time, "2
"5" is associated with "a" and registered in the dictionary.

【0096】以下、同様のアルゴリズムにより文字列の
復元と辞書登録を続ける。このようにして入力符号1,
2,4,3,5,・・・に対して復元が行われ、図12
の復元文字列欄821に示すような文字列a,b,a
b,c,ba,・・・が復元文字列として出力される。
そして、図11(B)に示すような登録符号93と対応
文字列94との対応関係が辞書に登録される。
Thereafter, character string restoration and dictionary registration are continued by the same algorithm. In this way, the input code 1,
Restoration is performed on 2, 4, 3, 5, ...
Character strings a, b, a as shown in the restored character string column 821
b, c, ba, ... Are output as a restored character string.
Then, the correspondence relationship 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 decoding processing procedure exemplified above. In the figure, the number following S indicates a step number. [S111] By initializing, the characters are registered in the dictionary in correspondence with the characters that may be input. Also, the address n to be registered next in the dictionary is
For example, it is set to 256. Here, n corresponds 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, read the input code and set the first input code CODE (binary code) to 1
The input code ω is converted to a 0-ary number. In this case, ω was the input character string in the encoding of FIG. 10, but in this decoding ω
Note that is the 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 searched from the dictionary and output as a restored character. 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] It is determined whether or not there is input code data in step S112. 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 read input code CODE is converted into the input code ω, and this input code ω is changed 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 proceeds to step S116 when ω is n or more. Note that ω becomes n or more when, for example, the input code column 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 the previous step S119.
Replace the set (OLD ω, FINchar) with ωK. That is, the value set in OLD ω is set in ω, and the value set in FINchar is set in K. Then, K is pushed onto the stack (PUSH). Note that ω is in step S117
Is decrypted with.

【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 ω is registered in the dictionary by the processing up to the previous time, 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 code 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 (ω)
Is 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文字に至るまで繰り
返す。
[S118] The letter K is temporarily pushed onto the stack, the code ω i is set to a new ω, and the process returns to step S117. 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] LIFO (Last In Fast Out) of each character pushed on the stack in step S118.
Pop (POP) in the format and output the restored character string. For example, if the input code column 81 in FIG. 12 is "5",
Pushed on the stack in the order of a and b, and the restored character string ba is output. At the same time, the first character of the character string restored this time is set to FINchar, and the previously set OLDω
A character string consisting of a combination with FINchar (OLDω, FINchar) is registered in the dictionary in correspondence with the value of n. That is, this character string is stored at address n of the dictionary. Further, n is incremented and IN set in step S114 is set.
ω is set to OLD ω to prepare for execution of the next step S112 and thereafter.

【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 repeating the steps S117 to S119 of FIG. That is, since the input code ω is registered in the dictionary by the processing up to the previous time,
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 this character K is temporarily saved in the stack. Then, using the code ω i as a new input code ω, the character string D (ω) corresponding to the input code ω is read again from the dictionary. These procedures are recursively repeated until the new input code ω becomes one character. Then, the character saved in 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 a tree structure of a dictionary used in the above processing procedure and the like. The tree structure of this dictionary is
It is the figure which shows the internal structure of the dictionary used at the time of encoding and decoding by the algorithm realized in the LZW encoding means and the LZW decoding means. In FIG. 14, the numbers in the circles indicate the identification numbers, and the places with the numbers in the circles are called “nodes”.

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

【0107】そして、第2階層53から下の階層は、情
報源から入力された文字列を学習することによって登録
される文字である。なお、一つ下の階層を有するノード
を「枝(branch)」と呼び、一つ下の階層を有するノー
ドを「葉(leaf)」と呼ぶ。したがって、図では円内の
数字の25,26,13,14,27,28,16,
6,・・・,22,23,24のノードが「葉」であ
り、その他のノードは「枝」である。
The layers below the second layer 53 are characters registered by learning the character string input from the information source. A node having a layer one level below is called a "branch", and a node having a layer one level below is called a "leaf". Therefore, in the figure, the numbers 25, 26, 13, 14, 27, 28, 16,
The nodes of 6, ..., 22, 23, 24 are “leaf”, 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” due to learning. For example,
When registering the character string “acd” in the dictionary 50, the character string “ac” is “a” (the number 1 in the circle) in the first layer 52 and “c” (the number 6 in the circle) in the second layer 53. ), The new “d” is registered in the third layer 54 below the “c” in the second layer 53. At this time, the node with the numeral 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, the code is output by the data compression circuit as the output code having the smallest integer bit number of log 2 n or more.
Bit fraction compensation, Phasin, as disclosed in No. 23
You may output with g in Binary Codes or the output code which consists of multi-valued arithmetic codes.

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

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

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

【0113】[0113]

【発明の効果】以上説明したように本発明では、データ
圧縮回路において、第1の辞書検索手段が初期辞書又は
通常辞書から、入力文字列と一致する最長の登録文字列
を検索し、同時に第1の辞書検索手段が最長の登録文字
列に一文字を加えた文字列に識別番号を付して通常辞書
に登録し、符号化手段が最長の登録文字列に付された識
別番号を出力符号に符号化するので、符号化処理を速く
行うことができる。
As described above, in the present invention, in the data compression circuit, the first dictionary searching 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 dictionary search unit 1 adds 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 unit uses the identification number added to the longest registered character string as the output code. Since the encoding is performed, the encoding process can be performed quickly.

【0114】また、データ圧縮回路において、初期辞書
及び通常辞書は外部ハッシュによるデータ検索及びデー
タ登録を行うように構成したので、データ検索及びデー
タ登録が速くなり、符号化処理をより速く行うことがで
きる。
Further, in the data compression circuit, since the initial dictionary and the normal dictionary are configured to perform the data search and the data registration by the external hash, the data search and the 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 character strings up to the second character in the initial dictionary, and data search and data registration are performed for character strings after the third character in the normal dictionary. Since it is configured as described above, it is possible to suppress the processing time related to data search and data registration.

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

【0117】それから、第1の辞書検索手段、第1の辞
書登録手段及び符号化手段は、パイプラインにより並列
処理するので、高速に符号化処理を行うことができる。
そのうえ、データ復元回路において、復号化手段が入力
符号を復号化し、同時に第2の辞書検索手段が辞書から
復号化によって復元された文字列を検索し、第1の蓄積
手段及び第2の蓄積手段が復元された文字列を蓄積し、
出力選択手段が出力する復元文字列を選択し、第2の辞
書登録手段が未登録の復元文字列に新たな符号を付して
辞書に登録するので、復号化処理を速く行うことができ
る。
Since the first dictionary searching means, the first dictionary registering means and the encoding means perform parallel processing by the pipeline, the encoding processing can be performed at high speed.
Moreover, in the data restoration circuit, the decoding means decodes the input code, and at the same time, the second dictionary searching means searches the dictionary for the character string restored by the decoding, and the first storing means and the second storing means. Accumulates the restored strings,
Since the restored character string output by the output selection unit is selected 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の辞書登録手段は、パイプライン
により並列処理するので、高速に復号化処理を行うこと
ができる。
Decoding means, second dictionary searching means,
Since the output selection means and the second dictionary registration means perform parallel processing by the pipeline, the decoding processing can be performed at high speed.

【0119】そして、データ圧縮・復元装置において、
データ圧縮回路では第1の辞書検索手段が初期辞書又は
通常辞書から、入力文字列と一致する最長の登録文字列
を検索し、同時に第1の辞書検索手段が最長の登録文字
列に一文字を加えた文字列に識別番号を付して通常辞書
に登録し、符号化手段が最長の登録文字列に付された識
別番号を出力符号に符号化する。また、データ復元回路
では復号化手段が入力符号を復号化し、同時に第2の辞
書検索手段が辞書から復号化によって復元された文字列
を検索し、第1の蓄積手段及び第2の蓄積手段が復元さ
れた文字列を蓄積し、出力選択手段が出力する復元文字
列を選択し、第2の辞書登録手段が未登録の復元文字列
に新たな符号を付して辞書に登録するので、符号化処理
及び復号化処理を速く行うことができる。
Then, in the data compression / decompression device,
In the data compression circuit, the first dictionary searching 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 searching means adds one character to the longest registered character string. The character string is added with an identification number and registered in a normal dictionary, and the encoding means encodes the identification number given to the longest registered character string into an output code. Further, 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 the character string restored by the decoding, and the first storage means and the second storage means The restored character string is accumulated, the restored character string output by the output selection means is selected, and the second dictionary registration means adds a new symbol to the unregistered restored character string and registers it in the dictionary. The encryption 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 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 the data compression / decompression device of 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 by the external hash method.

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

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

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

【図11】文字列と符号との対応関係図である。FIG. 11 is a correspondence diagram of character strings and codes.

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

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

【図14】辞書の木構造の一例を示す図である。FIG. 14 is a diagram showing 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.

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

1 辞書検索手段 2 辞書登録手段 3 符号化手段 4 初期辞書 5 通常辞書 11 復号化手段 12 辞書検索手段 13 第1の蓄積手段 14 第2の蓄積手段 15 出力選択手段 16 辞書登録手段 17 辞書 1 dictionary search means 2 dictionary registration means 3 encoding means 4 initial dictionary 5 ordinary 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番地 富士通株式会社内 ─────────────────────────────────────────────────── --- Continuation of the front page (72) Inventor Hirotaka Chiba 1015 Kamiodanaka, Nakahara-ku, Kawasaki City, Kanagawa Prefecture Fujitsu Limited

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 情報源から入力された入力文字列を、符
号化することにより圧縮するデータ圧縮回路において、 初期辞書(D1)又は通常辞書(D2)に登録されてい
る登録文字列のうち、入力された入力文字列と一致する
最長の登録文字列を検索する第1の辞書検索手段(1)
と、 前記初期辞書(D1)とのアクセスを行う初期辞書アク
セス手段(4)と、 前記通常辞書(D2)とのアクセスを行う通常辞書アク
セス手段(5)と、 前記最長の登録文字列に一文字を加えた文字列に、識別
番号を付して前記通常辞書(D2)に登録する第1の辞
書登録手段(2)と、 前記最長の登録文字列に付された識別番号を、出力符号
に符号化する符号化手段(3)と、 を有することを特徴とするデータ圧縮回路。
1. In a data compression circuit for compressing an input character string input from an information source by encoding, among registered character strings registered in an initial dictionary (D1) or a normal dictionary (D2), First dictionary search means (1) for searching the longest registered character string that matches the input character string that has been input
An initial dictionary access means (4) for accessing the initial dictionary (D1), a normal dictionary access means (5) for accessing the normal dictionary (D2), and one character in the longest registered character string. The first dictionary registration means (2) for adding an identification number to the character string added with and registering it in the normal dictionary (D2), and the identification number given to the longest registered character string as an output code. A data compression circuit comprising: an encoding means (3) for encoding.
【請求項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 by 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 by perfect hash.
【請求項4】 前記初期辞書(D1)には第2文字まで
の文字列についてデータ検索及びデータ登録を行い、前
記通常辞書(D2)には第3文字以降の文字列について
データ検索及びデータ登録を行うように構成したことを
特徴とする請求項1記載のデータ圧縮回路。
4. The initial dictionary (D1) performs data search and data registration for character strings up to the second character, and the normal dictionary (D2) performs data search and data registration for character strings after the third character. The data compression circuit according to claim 1, wherein the data compression circuit is configured to perform.
【請求項5】 前記第1の辞書検索手段(1)、前記第
1の辞書登録手段(2)及び前記符号化手段(3)は、
パイプラインにより並列処理されることを特徴とする請
求項1,2,3又は4記載のデータ圧縮回路。
5. The first dictionary search means (1), the first dictionary registration means (2), and the encoding means (3),
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 input in a data recovery circuit for recovering by decoding an input code input from an information source.
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 decryption; and the registered character string. In the first storage means (13), the second storage means (14) for storing the registered character string, 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 stored registered character strings and outputting it as a restored character string; and a registered character string registered in the dictionary (D3). home,
Second dictionary registration means (16) for searching for a registered character string that matches the restored character string, adding a new symbol to the unregistered restored character string, and registering it in the dictionary (D3); A data restoration circuit comprising: a 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)又は通常辞書(D2)に登録されてい
る登録文字列のうち、 入力された入力文字列と一致する最長の登録文字列を検
索する第1の辞書検索手段(1)と、前記初期辞書(D
1)とのアクセスを行う初期辞書アクセス手段(4)
と、前記通常辞書(D2)とのアクセスを行う通常辞書
アクセス手段(5)と、前記最長の登録文字列に一文字
を加えた文字列に、識別番号を付して前記通常辞書(D
2)に登録する第1の辞書登録手段(2)と、前記最長
の登録文字列に付された識別番号を、出力符号に符号化
する符号化手段(3)とからなるデータ圧縮回路と、 入力された入力符号を復号化する復号化手段(11)
と、辞書(D3)に登録されている登録文字列のうち、
前記復号化によって復元された文字列と一致する登録文
字列を検索する第2の辞書検索手段(12)と、前記登
録文字列を蓄積する第1の蓄積手段(13)と、前記登
録文字列を蓄積する第2の蓄積手段(14)と、前記第
1の蓄積手段(13)又は前記第2の蓄積手段(14)
に蓄積された登録文字列のうち、いずれかの蓄積された
登録文字列を選択し、復元文字列として出力する出力選
択手段(15)と、前記辞書(D3)に登録されている
登録文字列のうち、前記復元文字列と一致する登録文字
列を検索し、登録されていない前記復元文字列に新たな
符号を付して前記辞書(D3)に登録する第2の辞書登
録手段(16)と、前記辞書(D3)とのアクセスを行
う辞書アクセス手段(17)とからなるデータ復元回路
と、 を有することを特徴とするデータ圧縮・復元装置。
8. 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 the initial dictionary (D1) or the normal dictionary (D2). A first dictionary search means (1) for searching the longest registered character string that matches the input character string input from the registered character strings registered in
Initial dictionary access means (4) for accessing with 1)
And a normal dictionary access means (5) for accessing the normal dictionary (D2), and a character string obtained by adding one character to the longest registered character string with an identification number, and the normal dictionary (D).
A data compression circuit comprising first dictionary registration means (2) for registration in 2) and encoding means (3) for encoding the identification number given to the longest registered character string into an output code; Decoding means (11) for decoding the inputted input code
And among the registered character strings registered in the dictionary (D3),
Second dictionary retrieval means (12) for retrieving a registered character string that matches the character string restored by the decryption, first accumulating means (13) for accumulating the registered character string, and the registered character string. Second accumulating means (14) for accumulating and storing the first accumulating means (13) or the second accumulating means (14)
Output selection means (15) for selecting one of the stored registered character strings from the stored registered character strings and outputting it as a restored character string; and the registered character string registered in the dictionary (D3). Second dictionary registration means (16) for searching for a registered character string that matches the restored character string among them, and adding a new symbol to the unregistered restored character string and registering it in the dictionary (D3) And a data decompression circuit comprising a dictionary access means (17) for accessing the dictionary (D3), and a data compression / decompression device.
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 true JPH05181641A (en) 1993-07-23
JP3132774B2 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011176770A (en) * 2010-02-25 2011-09-08 Canon Inc Information processing apparatus, control method thereof, program, and storage medium
JP2015509293A (en) * 2011-12-02 2015-03-26 キヤノン株式会社 Method and device for encoding and decoding messages
EP3119002A1 (en) 2015-07-14 2017-01-18 Fujitsu Limited Encoding program, encoding method, information processsing device, replacement program, and replacement method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011176770A (en) * 2010-02-25 2011-09-08 Canon Inc Information processing apparatus, control method thereof, program, and storage medium
JP2015509293A (en) * 2011-12-02 2015-03-26 キヤノン株式会社 Method and device for encoding and decoding messages
EP3119002A1 (en) 2015-07-14 2017-01-18 Fujitsu Limited Encoding program, encoding method, information processsing device, replacement program, and replacement method
US9965448B2 (en) 2015-07-14 2018-05-08 Fujitsu Limited Encoding method and information processing device

Also Published As

Publication number Publication date
JP3132774B2 (en) 2001-02-05

Similar Documents

Publication Publication Date Title
JP3541930B2 (en) Encoding device and decoding device
JP3273119B2 (en) Data compression / decompression device
US5406278A (en) Method and apparatus for data compression having an improved matching algorithm which utilizes a parallel hashing technique
US5229768A (en) Adaptive data compression system
JP3278297B2 (en) Data compression method, data decompression method, data compression device, and data decompression device
JP3241788B2 (en) Data compression method
JP2536422B2 (en) Data compression device and data decompression device
JP3132774B2 (en) Data compression / decompression device
JP3241787B2 (en) Data compression method
JP3127016B2 (en) Data compression and decompression method
JP3117760B2 (en) Data restoration method
JPH05152971A (en) Data compressing/restoring method
JP3038233B2 (en) Data compression and decompression device
JP3053656B2 (en) Dictionary registration method in data compression
JPH05176187A (en) Data compression decoding device
JPH06161705A (en) Data encoding system and data decoding system
JP2999561B2 (en) Data compression and decompression device
JPH06168097A (en) Data encoding system and data decoding system
JP3012677B2 (en) ZL encoding method
JP3384813B2 (en) Data compression method
JP2825960B2 (en) Data compression method and decompression method
JP3388768B2 (en) Data compression and decompression method
JP3051501B2 (en) Data compression method
JP3100206B2 (en) Data compression method
JP2999587B2 (en) Data compression and decompression 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