JP3117760B2 - Data restoration method - Google Patents

Data restoration method

Info

Publication number
JP3117760B2
JP3117760B2 JP03275292A JP27529291A JP3117760B2 JP 3117760 B2 JP3117760 B2 JP 3117760B2 JP 03275292 A JP03275292 A JP 03275292A JP 27529291 A JP27529291 A JP 27529291A JP 3117760 B2 JP3117760 B2 JP 3117760B2
Authority
JP
Japan
Prior art keywords
dictionary
character string
input code
code
registered
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP03275292A
Other languages
Japanese (ja)
Other versions
JPH05113998A (en
Inventor
泰彦 中野
茂 吉田
佳之 岡田
広隆 千葉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP03275292A priority Critical patent/JP3117760B2/en
Publication of JPH05113998A publication Critical patent/JPH05113998A/en
Application granted granted Critical
Publication of JP3117760B2 publication Critical patent/JP3117760B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Document Processing Apparatus (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は圧縮されたデータを復号
化するデータ復元方式に関し、特にユニバーサル符号化
の一種である増分分解型の改良としてのLZW符号によ
る圧縮されたデータのデータ復元方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data restoring method for decoding compressed data, and more particularly to a data restoring method for LZW-compressed data as an improvement of an incremental decomposition type which is a kind of universal encoding. .

【0002】近年、文字コード、ベクトル情報、画像デ
ータなど各種のデータがコンピュータで扱われるように
なっており、扱われるデータ量も急速に増加してきてい
る。大量のデータを扱うときは、データの中の冗長な部
分を省いてデータ量を圧縮することで、記憶容量を減ら
したり、速く伝送したりすることが望まれる。
In recent years, various types of data such as character codes, vector information, and image data have been handled by computers, and the amount of data handled has rapidly increased. When dealing with a large amount of data, it is desirable to reduce the storage capacity or to transmit data at high speed by omitting redundant portions in the data and compressing the data amount.

【0003】このような様々なデータを1つの方式でデ
ータ圧縮する方法をしてユニバーサル符号化が提案され
ている。ユニバーサル符号化の代表的な方法として、Zi
v-Lempel符号を用いた方法が知られている(例えば、宗
像清治著、「Ziv-Lempelデータ圧縮法」、情報処理、p
p.2〜6 , Vol.26,No.1,1985を参照のこと)。Ziv-Lempe
l符号では、ユニバーサル型と、増分分解型(Increment
al persing )の2つのアルゴリズムが提案されてい
る。
[0003] Universal encoding has been proposed as a method of compressing such various data by one method. Zi is a typical universal coding method.
Methods using v-Lempel codes are known (for example, Seiji Munakata, "Ziv-Lempel Data Compression Method", Information Processing, p
p.2-6, Vol.26, No.1,1985). Ziv-Lempe
For the l code, the universal type and the incremental decomposition type (Increment
al persing) have been proposed.

【0004】本発明は増分分解型アルゴリズムを改良し
たLZW(Lempel-Ziv-Welch)符号によって圧縮されたデ
ータの復号化をさらに改善したものに関わるものであ
る。なお、「文字(Character )」及び「文字列(Char
acter String)」の定義はJIS−C6230に従うほ
か、情報理論で用いられている呼称を踏襲し、1ワード
単位で構成されるデータを「文字」と呼び、任意のワー
ド単位で構成されるデータを「文字列」と呼んで、本発
明を圧縮されたデータの復号化に関わるものとして説明
する。
The present invention relates to a further improved decoding of data compressed by an LZW (Lempel-Ziv-Welch) code in which an incremental decomposition type algorithm is improved. In addition, "Character (Character)" and "character string (Char
In addition to the definition of "acter String", the data conforms to JIS-C6230 and follows the name used in information theory. Data composed of one word is called "character", and data composed of an arbitrary word is defined. The present invention will be described as a "character string" as it relates to the decoding of compressed data.

【0005】[0005]

【従来の技術】従来のLZW符号の符号化アルゴリズム
によれば、入力文字列を互いに異なる部分文字列に分け
て符号化し、これらの部分文字列と符号との対応を辞書
に登録するとともに、入力文字列を、辞書中に登録され
た部分文字列と比較し、入力文字列と一致する部分文字
列の内、最大長の部分文字列を選択し、選択された部分
文字列に対応する符号によって入力文字列を符号化し、
これによってデータを圧縮することが行われている。
2. Description of the Related Art According to a conventional LZW code encoding algorithm, an input character string is divided into different partial character strings and encoded, and the correspondence between these partial character strings and codes is registered in a dictionary and the input character string is input. The character string is compared with the partial character string registered in the dictionary, and the partial character string having the maximum length is selected from the partial character strings that match the input character string, and the code corresponding to the selected partial character string is used. Encode the input string,
Thus, data is compressed.

【0006】図7は、例えばa,b,cの3文字だけの
組み合わせからなる入力文字列71を、LZW符号の符
号化アルゴリズムによって符号化する場合の具体例を示
す図である。予め辞書に、初期化によって、1文字の
a,b,cだけをそれぞれ符号1,2,3に対応づけて
登録しておく。
FIG. 7 is a diagram showing a specific example in which an input character string 71 composed of, for example, a combination of only three characters a, b, and c is encoded by an LZW encoding algorithm. In the dictionary, only one character a, b, and c are registered in association with the codes 1, 2, and 3, respectively, by initialization.

【0007】まず、入力文字列71を左から右へ一字ず
つ読み込む。最初の文字aを読んで、このaを語頭文字
(列)(prefix string) とする。次に、2番目の文字b
を読み、先の語頭文字aにこのbを加えたabを辞書の
登録文字列と照合する。辞書にはabに一致する文字列
がないから、このときは辞書を参照し、先の語頭文字a
の対応符号1を符号化出力として出力する(出力符号欄
72)とともに、文字列abを符号4に対応させて辞書
に登録する(登録内容欄73)。そして今度は2番目の
入力文字bを語頭文字とする。
First, the input character string 71 is read one character at a time from left to right. Read the first letter a, and let this a be a prefix string. Next, the second character b
Is read, and ab obtained by adding the b to the initial letter a is compared with the registered character string in the dictionary. Since there is no character string that matches ab in the dictionary, refer to the dictionary at this time and
The corresponding code 1 is output as an encoded output (output code field 72), and the character string ab is registered in the dictionary in association with the code 4 (registration content field 73). Then, the second input character b is set as the initial character.

【0008】次に、入力文字列71の3番目の文字aを
読み、語頭文字bにこのaを加えたbaを辞書の登録文
字列と照合する。辞書にはbaに一致する文字列がない
から、このときも辞書から語頭文字bの対応符号2を符
号化出力として出力するとともに、文字列baを符号5
に対応させて辞書に登録する。そして今度は3番目の入
力文字aを語頭文字とする。
Next, the third character a of the input character string 71 is read, and ba obtained by adding the letter a to the initial character b is compared with the registered character string in the dictionary. Since there is no character string matching ba in the dictionary, the corresponding code 2 of the initial character b is output from the dictionary as an encoded output and the character string ba is
And register it in the dictionary. Then, the third input character a is set as the initial character.

【0009】さらに、4番目の文字bを読み、語頭文字
aにこのbを加えたabを辞書の登録文字列と照合す
る。辞書にはabに一致する文字列があるから、このと
きはabを語頭文字列とし、続けて、5番目の入力文字
cを読み、語頭文字列abにこのcを加えたabcを辞
書の登録文字列と照合する。辞書にはabcに一致する
文字列がないから、このときは辞書から語頭文字列ab
の対応符号4を符号化出力として出力するとともに、文
字列abcを符号6に対応させて辞書に登録する。そし
て、今度はcを語頭文字とする。
Further, the fourth character b is read, and ab obtained by adding the b to the initial letter a is compared with the registered character string in the dictionary. In the dictionary, there is a character string that matches ab. In this case, ab is used as the initial character string, then the fifth input character c is read, and abc obtained by adding this c to the initial character string ab is written in the dictionary. Matches with the registered character string of. Since there is no character string that matches abc in the dictionary, 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, let c be the initial letter.

【0010】以下、同様にこうしたアルゴリズムにより
符号化と辞書登録を続ける。このようにして入力文字列
a,b,a,b,c・・・に対して符号化が行われ、図
7の出力符号欄72に示すような符号1,2,4,3・
・・が符号化出力として出力される。そして、図9
(A)に示すような登録文字列91と対応符号92との
対応関係が辞書に登録される。
[0010] Similarly, encoding and dictionary registration are continued by such an algorithm. In this manner, encoding is performed on the input character strings a, b, a, b, c,..., And codes 1, 2, 4, 3,.
Is output as an encoded output. And FIG.
The correspondence between the registered character string 91 and the corresponding code 92 as shown in (A) is registered in the dictionary.

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

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

【0013】〔S104〕語頭文字列ωを辞書と照合
し、対応する符号code(ω)を読み出し、符号化出力と
して出力する。このときの符号code(ω)のビット数
は、log2n以上の最小の整数に相当する。このステップ
では文字列が入力しないから、本ステップを実行後、本
処理手順を終了する。
[S104] The initial character string ω is collated with the dictionary, the corresponding code code (ω) is read, and output as an encoded output. The number of bits of the code code (ω) at this time corresponds to the smallest integer equal to or greater than log 2 n. In this step, since no character string is input, the present processing procedure is terminated after executing this step.

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

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

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

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

【0018】まず、入力符号81を左から右へ一つずつ
読み込む。最初の符号1を読み、辞書を参照して文字列
aを復元する(復元文字列欄821)。最初の符号は、
初期化によって必ず辞書に登録されている。次に、2番
目の符号2を読み、辞書を参照して文字列bを復元す
る。このとき、前回の入力符号1と今回復号した文字列
の最初の一文字b(今回の復号文字列は単に文字bのみ
であるが)とを組み合わせた(1b)に符号4を対応さ
せて辞書に登録する(登録内容欄83)。
First, input codes 81 are read one by one from left to right. The first code 1 is read, and the character string a is restored with reference to the dictionary (restored character string column 821). The first sign is
It is always registered in the dictionary by initialization. Next, the second code 2 is read, and the character string b is restored with reference to the dictionary. At this time, code 4 is associated with (1b), which is a combination of the previous input code 1 and the first character b of the currently decoded character string (although the current decoded character string is simply character b), and stores it in the dictionary. Register (registered content column 83).

【0019】次に、入力文字列81の3番目の符号4を
読み、辞書を参照して対応する1bを読み出し、さらに
1bの符号1を、辞書を参照して対応する文字aを読み
出す(この一連の読み出し繰り返し動作を「再帰的な復
号化」と呼ぶ。再帰的復号化欄82を参照)。これによ
って、文字列abを復号化された文字列として出力する
(復元文字列欄831)。同時に、前回の入力符号2と
今回復号した文字列の最初の一文字aとを組み合わせた
(2a)に符号5を対応させて辞書に登録する(登録内
容欄83)。
Next, the third code 4 of the input character string 81 is read, the corresponding 1b is read with reference to the dictionary, and the code 1 of 1b is read with reference to the dictionary, and the corresponding character a is read with reference to the dictionary. A series of read repetition operations is referred to as "recursive decoding" (see recursive decoding column 82). As a result, the character string ab is output as a decrypted character string (restored character string column 831). At the same time, the combination of the previous input code 2 and the first character a of the currently decoded character string (2a) is registered in the dictionary in association with the code 5 (registered content column 83).

【0020】以下、同様にこうしたアルゴリズムにより
復号化と辞書登録を続ける。このようにして入力符号
1,2,4,3,5・・・に対して復号化が行われ、図
8の復元文字列欄821に示すような文字列a,b,a
b,c,ba・・・が復号化出力として出力される。そ
して、図9(B)に示すような登録符号93と対応文字
列94との対応関係が辞書に登録される。
Hereinafter, decoding and dictionary registration are continued by using such an algorithm. In this manner, the input codes 1, 2, 4, 3, 5,... Are decoded, and the character strings a, b, a shown in the restored character string column 821 in FIG.
are output as decoded outputs. Then, the correspondence between the registration code 93 and the corresponding character string 94 as shown in FIG. 9B is registered in the dictionary.

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

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

【0023】〔S114〕読み込んだ入力符号CODEから
入力符号ωに変換するとともに、この入力符号ωをINω
にセットする。 〔S115〕入力符号ωをnと比較する。このステップ
は、入力符号が辞書に登録されているか否か(ω≧n)
を判別するものである。ωがnより小さい場合が通常で
あり、このときにはステップS117へ進み、ωがn以
上のときには(図8の入力符号欄81が「8」のときが
これに相当する)ステップS116へ進む。
[S114] The input code CODE is converted into the input code ω and the input code ω is converted to INω
Set to. [S115] The input code ω is compared with n. This step determines whether the input code is registered in the dictionary (ω ≧ n)
Is to be determined. It is normal that ω is smaller than n. At this time, the process proceeds to step S117, and when ω is equal to or more than n (the case where the input code column 81 in FIG. 8 is “8” corresponds to this), the process proceeds to step S116.

【0024】〔S116〕ステップS111または前回
にステップS119で設定されたOLD ωおよびFINchar
の組(OLD ω,FINchar )をωKと置き換える。すなわ
ち、OLD ωにセットされた値をωに、FINchar にセット
された値をKにセットする。そして、Kをスタックにプ
ッシュ(PUSH)する。ωはステップS117で復号
化される。(図8の入力符号欄81が「8」のとき、OL
D ω(ω)は5であり、FINchar (K)はbである。) 〔S117〕通常、入力符号ωは前回までの処理で辞書
に登録されているため、入力符号ωに対応する文字列D
(ω)を辞書から読み出す。読み出した文字列D(ω)
をωi Kに分解する。ωi は符号、Kは復号化文字であ
る。そして、文字列D(ω)が、ωi Kに分解できない
1文字であるか否かを判別する。D(ω)がωi Kに分
解できるならばステップS118に進み、D(ω)が1
文字であるならばステップS119へ進む。
[S116] OLD ω and FINchar set in step S111 or last time in step S119
(OLD ω, FINchar) is replaced with ωK. That is, the value set to OLD ω is set to ω, and the value set to FINchar is set to K. Then, K is pushed on the stack (PUSH). ω is decoded in step S117. (When the input code field 81 in FIG. 8 is "8", OL
Dω (ω) is 5 and FINchar (K) is b. [S117] Normally, since the input code ω has been registered in the dictionary in the previous processing, the character string D corresponding to the input code ω
(Ω) is read from the dictionary. Character string D (ω) read
Is decomposed into ω i K. ω i is a sign and K is a decoded character. Then, it is determined whether or not the character string D (ω) is one character that cannot be decomposed into ω i K. If D (ω) can be decomposed into ω i K, the process proceeds to step S118, where D (ω) is 1
If it is a character, the process proceeds to step S119.

【0025】〔S118〕文字Kを一時的にスタックに
プッシュし、また符号ωi を新たなωとし、再度ステッ
プS117に戻る。このステップS117およびステッ
プS118の実行を、D(ω)が1文字に至るまで繰り
返す。ステップS117およびステップS118の処理
を前述のように「再帰的復号化」と呼ぶ。
[0025] [S118] to push the character K to temporarily stack, also the sign ω i as a new ω, returns to step S117 again. The execution of steps S117 and S118 is repeated until D (ω) reaches one character. The processing in steps S117 and S118 is referred to as “recursive decoding” as described above.

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

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

【0028】[0028]

【発明が解決しようとする課題】しかし、このような方
式では、何度も復元される同一の文字列でも、上述のよ
うに再帰的な処理をその都度行わなければならない。し
たがって、辞書からの読み出し、一時的なスタックへの
退避及び退避させた文字のポップといった一連の処理が
必要であり、この処理のために無駄な時間が費やされる
という問題点があった。
However, in such a system, as described above, recursive processing must be performed each time even for the same character string restored many times. Therefore, a series of processes such as reading from the dictionary, temporarily saving to the stack, and popping the saved characters are required, and there is a problem that useless time is spent for this process.

【0029】本発明はこのような点に鑑みてなされたも
のであり、一度再帰的な復号化処理によって復元された
文字列を有効に利用し、復号化処理時間を短縮するデー
タ復元方式を提供することを目的とする。
The present invention has been made in view of the above points, and provides a data restoration method which effectively utilizes a character string once restored by recursive decoding processing and shortens decoding processing time. The purpose is to do.

【0030】[0030]

【課題を解決するための手段】本発明では上記目的を達
成するために、図1に示すように、入力符号を第1の辞
書を用いて再帰的に復号化する第1の復号化手段2と、
前回入力符号と今回復号化された文字列の第1文字とを
組にし、この組に新たな符号を対応させて第1の辞書に
登録する第1の辞書登録手段1とを備え、入力符号に基
づき復号化された文字列を、入力符号とともに第2の辞
書に登録する第2の辞書登録手段4と、第2の復号化手
段3とを備える。
According to the present invention, in order to achieve the above object, as shown in FIG. 1, a first decoding means 2 for recursively decoding an input code using a first dictionary. When,
A first dictionary registering means for pairing a previously input code and a first character of a currently decoded character string with a new code corresponding to the set and registering the new code in a first dictionary; A second dictionary registration unit 4 and a second decoding unit 3 for registering a character string decoded on the basis of.

【0031】第2の復号化手段3は、検索手段3aと文
字列出力手段3bとを有する。すなわち、検索手段3a
は第1の復号化手段2に基づき復号化を行う前に、入力
符号を第2の辞書から検索する。また、文字列出力手段
3bは検索手段3aにより入力符号が検出された場合、
第2の辞書から入力符号に対応する復号化された文字列
を出力する。
The second decoding means 3 has a search means 3a and a character string output means 3b. That is, the search means 3a
Searches for an input code from the second dictionary before performing decoding based on the first decoding means 2. When the input code is detected by the search means 3a, the character string output means 3b
And outputting a decoded character string corresponding to the input code from the second dictionary.

【0032】また、第1の辞書に登録されている入力符
号を参照した頻度を表す参照頻度をさらに設け、第2の
辞書登録手段4は新たに新規入力符号が入力されるごと
に、この新規入力符号に対応する参照頻度をカウントす
るカウント手段を有し、文字列出力手段3bは、参照頻
度が所定値を超えた場合は、第2の辞書から入力符号に
対応する復号化された文字列を出力する選択手段を有す
る。
Further, a reference frequency indicating the frequency of referring to the input code registered in the first dictionary is further provided, and the second dictionary registration means 4 receives the new input code every time a new input code is input. The character string output unit 3b includes a counting unit that counts a reference frequency corresponding to the input code, and the character string output unit 3b, when the reference frequency exceeds a predetermined value, decodes the decoded character string corresponding to the input code from the second dictionary Is provided.

【0033】さらに、検索手段3aは入力符号を第2の
辞書から一度だけ検索し、第1の辞書から検索する。そ
して、第2の辞書登録手段4、検索手段3a及び文字列
出力手段3bは、いずれもハッシュ関数に基づいて、第
2の辞書とアクセスする。
Further, the search means 3a searches for the input code only once from the second dictionary and searches for the input code from the first dictionary. Then, the second dictionary registration unit 4, the search unit 3a, and the character string output unit 3b all access the second dictionary based on the hash function.

【0034】それから、第2の辞書登録手段4は、入力
符号に対応する文字列が第2の辞書に既に存在し、か
つ、第2の辞書に登録されている文字列よりも今回復号
化された文字列のほうが長い文字列である場合、今回復
号化された文字列を第2の辞書に登録する。
Then, the second dictionary registering means 4 determines that the character string corresponding to the input code already exists in the second dictionary and that the character string registered in the second dictionary is decoded this time. If the extracted character string is a longer character string, the currently decoded character string is registered in the second dictionary.

【0035】[0035]

【作用】第1の復号化手段2は、入力符号を第1の辞書
を用いて再帰的に復号化する。第1の辞書登録手段1
は、前回入力符号と今回復号化された文字列の第1文字
とを組にし、この組に新たな符号を対応させて第1の辞
書に登録する。
The first decoding means 2 recursively decodes the input code using the first dictionary. First dictionary registration means 1
Sets a previously input code and the first character of the currently decoded character string as a set, and associates the set with a new code and registers it in the first dictionary.

【0036】一方、第2の辞書登録手段4は、入力符号
に基づき復号化された最終的に文字列を、入力符号とと
もに第2の辞書に登録する。第2の復号化手段3は、検
索手段3aと文字列出力手段3bとを有し、第1の復号
化手段2による復号化前に入力符号に対応する文字列が
第2の辞書に登録されている場合、この文字列を出力す
る。すなわち、検索手段3aは第1の復号化手段2に基
づき復号化を行う前に、入力符号を第2の辞書から検索
する。そして、文字列出力手段3bは検索手段3aによ
り入力符号が検出された場合、第2の辞書から入力符号
に対応する復号化された文字列を出力する。
On the other hand, the second dictionary registration means 4 registers the finally decoded character string based on the input code in the second dictionary together with the input code. The second decoding unit 3 includes a search unit 3a and a character string output unit 3b. Before decoding by the first decoding unit 2, a character string corresponding to an input code is registered in a second dictionary. If this is the case, output this string. That is, the search unit 3a searches the second dictionary for an input code before performing decoding based on the first decoding unit 2. Then, when the input code is detected by the search means 3a, the character string output means 3b outputs a decoded character string corresponding to the input code from the second dictionary.

【0037】また、第1の辞書に登録されている入力符
号を参照した頻度を表す参照頻度をさらに設け、第2の
辞書登録手段4は新たに新規入力符号が入力されるごと
に、この新規入力符号に対応する参照頻度をカウントす
るカウント手段を設ける。文字列出力手段3bは、参照
頻度が所定値を超えた場合は、第2の辞書から入力符号
に対応する復号化された文字列を出力する選択手段を設
けて、第2の辞書の検索を最小限度に抑える。
Further, a reference frequency indicating the frequency of referring to the input code registered in the first dictionary is further provided, and the second dictionary registering means 4 receives this new input code every time a new input code is input. Counting means is provided for counting the reference frequency corresponding to the input code. The character string output means 3b is provided with a selection means for outputting a decoded character string corresponding to the input code from the second dictionary when the reference frequency exceeds a predetermined value. Minimize.

【0038】さらに、検索手段3aは、入力符号を第2
の辞書から一度だけ検索し、その後に第1の辞書から検
索するようにして、第1の辞書に蓄積された文字列を有
効に活用する。
Further, the search means 3a sets the input code to the second
Is searched only once, and then the first dictionary is searched, thereby effectively utilizing the character strings stored in the first dictionary.

【0039】そして、第2の辞書登録手段4、検索手段
3a及び文字列出力手段3bに、いずれもハッシュ関数
に基づいて、第2の辞書とアクセスするようにして、第
2の辞書への登録及び検索の処理速度を短縮する。
Then, the second dictionary registration unit 4, the retrieval unit 3a, and the character string output unit 3b access the second dictionary based on the hash function, and register the second dictionary. And reduce the processing speed of the search.

【0040】それから、第2の辞書登録手段4は、入力
符号に対応する文字列が第2の辞書に既に存在し、か
つ、第2の辞書に登録されている文字列よりも今回復号
化された文字列のほうが長い文字列である場合、今回復
号化された文字列を第2の辞書に登録するようにして、
復号化の効率を上げる。
Then, the second dictionary registration means 4 determines that the character string corresponding to the input code already exists in the second dictionary, and that the character string registered in the second dictionary is decoded this time. If the extracted character string is a longer character string, the newly decoded character string is registered in the second dictionary,
Increase decoding efficiency.

【0041】[0041]

【実施例】以下、本発明の一実施例を図面に基づいて説
明する。図2は復号化の第1の実施例の処理手順を示す
フローチャートである。図において、図11に示したス
テップと同一の内容を持つステップには図11のステッ
プ番号と同じ番号を付し、その説明も省略する。ただ
し、図11の説明にある辞書は全て第1の辞書とする。
なお、Sに続く数字はステップ番号を示す。
An embodiment of the present invention will be described below with reference to the drawings. FIG. 2 is a flowchart showing the processing procedure of the first embodiment of the decoding. In the figure, steps having the same contents as the steps shown in FIG. 11 are assigned the same step numbers as those in FIG. 11, and the description thereof is omitted. However, all the dictionaries described in FIG. 11 are the first dictionaries.
The number following S indicates a step number.

【0042】〔S21〕ハッシュ関数に基づいて入力符
号ωに対応するハッシュアドレスH(ω)を求め、第2
の辞書に入力符号ωが登録されているか否かを判別す
る。もし、入力符号ωが登録されている(YES)なら
ばステップS22に進み、入力符号ωが登録されていな
い(NO)ならばステップS117に進む。なお、ハッ
シュアドレスH(ω)は入力符号ωを第2の辞書の最大
登録可能数で割った余りで演算される。
[S21] A hash address H (ω) corresponding to the input code ω is obtained based on the hash function.
Is determined whether or not the input code ω is registered in the dictionary. If the input code ω is registered (YES), the process proceeds to step S22. If the input code ω is not registered (NO), the process proceeds to step S117. Note that the hash address H (ω) is calculated by the remainder obtained by dividing the input code ω by the maximum registrable number of the second dictionary.

【0043】〔S22〕入力符号ωに対応する復元文字
列を第2の辞書から読み出す。すなわち、ステップS2
1で求めたハッシュアドレスH(ω)に登録されている
登録文字列を読み出す。読み出し後、ステップS24に
進む。
[S22] The restored character string corresponding to the input code ω is read from the second dictionary. That is, step S2
The registered character string registered at the hash address H (ω) obtained in step 1 is read. After the reading, the process proceeds to step S24.

【0044】〔S23〕ステップS118でスタックに
プッシュした各文字をLIFO形式でポップして復元文
字列を出力する。また、第2の辞書上のステップS21
で求めたハッシュアドレスH(ω)に、この復元文字列
を入力符号ωとともに、第2の辞書に登録する。すなわ
ち、後述する図6において、入力符号ωは符号code(H
(ω))として、復元文字列は str(H(ω))として
登録される。
[S23] Each character pushed on the stack in step S118 is popped in the LIFO format to output a restored character string. Step S21 on the second dictionary
The restored character string is registered in the second dictionary together with the input code ω in the hash address H (ω) obtained in (1). That is, in FIG. 6 described later, the input code ω is the code code (H
(Ω)), the restored character string is registered as str (H (ω)).

【0045】〔S24〕今回復元した文字列の最初の一
文字をFINcharとし、前回セットされた OLDωとFINchar
との組( OLDω,FINchar )からなる文字列を、nの
値に対応させて第1の辞書に登録する(実際には、この
文字列を第1の辞書のアドレスnに登録する)。さら
に、nをインクリメントし、ステップS114でセット
されたINωをOLD ωにセットして、次のステップS11
2以降の実行に備える。
[S24] The first character of the character string restored this time is set to FINchar, and OLDω and FINchar set last time are set.
Is registered in the first dictionary corresponding to the value of n (actually, this character string is registered at the address n of the first dictionary). Further, n is incremented, and INω set in step S114 is set to OLDω, and the next step S11
Prepare for execution after 2.

【0046】ただし、図11ではステップS118の次
のステップがステップS117であるのに対して、本第
1の実施例ではステップS118の次のステップはステ
ップS21である。これにより、逐次的にハッシュ関数
に基づき第2の辞書にアクセスされ、従来の復号化と比
べて速く得ることができる。
However, in FIG. 11, the step following step S118 is step S117, whereas in the first embodiment, the step following step S118 is step S21. Thereby, the second dictionary is sequentially accessed based on the hash function, and can be obtained faster than in the conventional decoding.

【0047】図3は復号化の第2の実施例の処理手順を
示すフローチャートである。図において、図2及び図1
1に示したステップと同一の内容を持つステップには図
2及び図11のステップ番号と同じ番号を付し、その説
明も省略する。ただし、図11の説明にある辞書は全て
第1の辞書とする。なお、Sに続く数字はステップ番号
を示す。
FIG. 3 is a flowchart showing a processing procedure of the second embodiment of the decoding. In the figures, FIG. 2 and FIG.
Steps having the same contents as the steps shown in FIG. 1 are denoted by the same step numbers as in FIG. 2 and FIG. 11, and the description thereof is omitted. However, all the dictionaries described in FIG. 11 are the first dictionaries. The number following S indicates a step number.

【0048】図2の第1の実施例と異なるのは、図2で
はステップS118の次のステップがステップS21で
あるのに対して、本第2の実施例ではステップS118
の次のステップはステップS117である。これによ
り、第2の辞書へのアクセスは最初の入力符号ωに対し
てのみ行われる。このステップS21に要する処理時間
は第2の辞書の登録数が増加するごとに長くなる。した
がって、ステップS21を排除することによって復元化
の処理時間が抑えられ、第1の実施例と比べて速く復元
文字列を得ることができる。
The difference from the first embodiment shown in FIG. 2 is that the step following step S118 is step S21 in FIG. 2, whereas step S118 is executed in the second embodiment.
Is a step S117. Thus, access to the second dictionary is performed only for the first input code ω. The processing time required for step S21 increases as the number of registered second dictionaries increases. Therefore, by eliminating step S21, the restoration processing time can be reduced, and a restored character string can be obtained faster than in the first embodiment.

【0049】図4は復号化の第3の実施例の処理手順を
示すフローチャートである。図において、図3及び図1
1に示したステップと同一の内容を持つステップには図
3及び図11のステップ番号と同じ番号を付し、その説
明も省略する。ただし、図11の説明にある辞書は全て
第1の辞書とする。なお、Sに続く数字はステップ番号
を示す。
FIG. 4 is a flowchart showing the processing procedure of the third embodiment of the decoding. In the figures, FIG. 3 and FIG.
Steps having the same contents as the steps shown in FIG. 1 are denoted by the same step numbers as in FIG. 3 and FIG. 11, and the description thereof is omitted. However, all the dictionaries described in FIG. 11 are the first dictionaries. The number following S indicates a step number.

【0050】〔S41〕ステップS118でスタックに
プッシュした各文字をLIFO形式でポップして復元文
字列を出力する。そして、文字出力後はステップS42
に進む。
[S41] Each character pushed on the stack in step S118 is popped in the LIFO format to output a restored character string. Then, after outputting the characters, step S42 is executed.
Proceed to.

【0051】〔S42〕2種の判別を行う。すなわち、
一つは入力符号ωと、後述する図6に示す第2の辞書の
内容において、ステップS21で求めたハッシュアドレ
スH(ω)に登録されている参照番号の符号code(H
(ω))とが同じか否かの判別である。もう一つは、今
回復元した文字列の長さが、同じく入力符号ωに対応す
るハッシュアドレスH(ω)に登録されている登録文字
列str(H(ω))の長さよりも長いか否かの判別であ
る。もし、入力符号ωと符号code(H(ω))が同じで
なく、かつ、今回復元した文字列の長さが第2の辞書に
登録されている登録文字列 str(H(ω))の長さより
も長い(YES)ならばステップS43に進み、短い
(NO)ならばステップS24に進む。
[S42] Two types of discrimination are performed. That is,
One is the input code ω and the code code (H of the reference number registered in the hash address H (ω) obtained in step S21 in the content of the second dictionary shown in FIG.
(Ω)) is the same or not. The other is whether the length of the character string restored this time is longer than the length of the registered character string str (H (ω)) registered at the hash address H (ω) also corresponding to the input code ω. It is a judgment of whether or not. If the input code ω and the code code (H (ω)) are not the same, and the length of the character string restored this time is the registered character string str (H (ω)) registered in the second dictionary. If it is longer (YES), the process proceeds to step S43, and if shorter (NO), the process proceeds to step S24.

【0052】〔S43〕ステップS21で求めたハッシ
ュアドレスH(ω)に、今回復元した文字列を復元文字
列として入力符号ωとともに第2の辞書に登録する。す
なわち、後述する図6において、入力符号ωは符号code
(H(ω))にとして、復元文字列は str(H(ω))
として登録される。辞書登録後、ステップS24に進
む。
[S43] At the hash address H (ω) obtained in step S21, the character string restored this time is registered in the second dictionary together with the input code ω as a restored character string. That is, in FIG. 6 described later, the input code ω is a code code
(H (ω)), the restored character string is str (H (ω))
Registered as After the dictionary is registered, the process proceeds to step S24.

【0053】したがって、ハッシュ関数に基づき第2の
辞書への登録する場合、第2の辞書内においては同一の
登録箇所に、より長い文字列を登録することになるた
め、効率よく復元文字列を得ることができる。
Therefore, when registering in the second dictionary based on the hash function, a longer character string is registered in the same registration location in the second dictionary. Obtainable.

【0054】図5は復号化の第4の実施例の処理手順を
示すフローチャートである。図において、図2及び図1
1に示したステップと同一の内容を持つステップには図
2及び図11のステップ番号と同じ番号を付し、その説
明も省略する。ただし、図11の説明にある辞書は全て
第1の辞書とする。なお、Sに続く数字はステップ番号
を示す。そして、第1の辞書には、既に登録されている
入力符号ωを参照した頻度を表す参照頻度c(ω)をさ
らに設ける。
FIG. 5 is a flowchart showing a processing procedure of the fourth embodiment of the decoding. In the figures, FIG. 2 and FIG.
Steps having the same contents as the steps shown in FIG. 1 are denoted by the same step numbers as in FIG. 2 and FIG. 11, and the description thereof is omitted. However, all the dictionaries described in FIG. 11 are the first dictionaries. The number following S indicates a step number. Then, the first dictionary is further provided with a reference frequency c (ω) representing the frequency of referring to the already registered input code ω.

【0055】〔S51〕第1の辞書から入力符号ωに対
応する参照頻度c(ω)を読み出し、所定値Tより大き
いか否か判別する。もし、参照頻度c(ω)が所定値T
より大きい(YES)ならばステップS21に進み、参
照頻度c(ω)が所定値Tより小さい(NO)ならばス
テップS117に進む。
[S51] The reference frequency c (ω) corresponding to the input code ω is read from the first dictionary, and it is determined whether or not it is larger than a predetermined value T. If the reference frequency c (ω) is a predetermined value T
If it is larger (YES), the process proceeds to step S21, and if the reference frequency c (ω) is smaller than the predetermined value T (NO), the process proceeds to step S117.

【0056】〔S52〕入力符号ωに対応する参照頻度
c(ω)をインクリメントする。その後、ステップS5
1に戻る。ただし、図11ではステップS118の次の
ステップがステップS117であるのに対して、本第4
の実施例ではステップS118の次のステップはステッ
プS52である。したがって、参照頻度の高い入力符号
ωのみに対応して第2の辞書にアクセスされるため、効
率よく第2の辞書とアクセスすることができ、復号化処
理も速くなる。
[S52] The reference frequency c (ω) corresponding to the input code ω is incremented. Then, step S5
Return to 1. However, in FIG. 11, the step following step S118 is step S117.
In the embodiment, the step following step S118 is step S52. Therefore, since the second dictionary is accessed in correspondence only with the input code ω having a high reference frequency, the second dictionary can be accessed efficiently and the decoding process can be performed quickly.

【0057】図6は第2の辞書の内容の一例を示す図で
ある。第2の辞書は、ハッシュアドレスH(ω)に基づ
いて、参照番号および登録文字列から構成される。参照
番号は入力符号ωに相当し、登録文字列は復号化処理に
よって復号された文字列が登録される。なお、ハッシュ
アドレスH(ω)は入力符号ωを辞書最大登録可能数
(図6では1000)で割った余りで求められる。
FIG. 6 is a diagram showing an example of the contents of the second dictionary. The second dictionary includes a reference number and a registered character string based on the hash address H (ω). The reference number corresponds to the input code ω, and the registered character string is a character string decoded by the decoding process. Note that the hash address H (ω) is obtained by the remainder obtained by dividing the input code ω by the maximum number of dictionaries that can be registered (1000 in FIG. 6).

【0058】上記の説明では、第2の辞書はハッシュ関
数に基づき構築したが、他の構築法に基づき構築しても
よい。例えば、二進分木(バイナリ・ツリー)法によっ
て第2の辞書を構築し、二進探索(バイナリ・サーチ)
により復元文字列の探索を行なってもよい。
In the above description, the second dictionary is constructed based on the hash function, but may be constructed based on another construction method. For example, a second dictionary is constructed by a binary tree method, and a binary search is performed.
May be used to search for a restored character string.

【0059】上述の各実施例は、ワークステーション等
における文字コード、ベクトル情報、画像データなどを
圧縮したデータの復元に応用され、記憶容量を大幅に削
減することができる。また、通信回線を利用したデータ
送受信(例えば、モデム、ファックス等)においても応
用でき、通信時間の短縮を図ることができる。
Each of the above embodiments is applied to the restoration of data obtained by compressing character codes, vector information, image data, and the like in a workstation or the like, and the storage capacity can be greatly reduced. Further, the present invention can be applied to data transmission / reception (for example, a modem, a facsimile, etc.) using a communication line, and the communication time can be reduced.

【0060】[0060]

【発明の効果】以上説明したように本発明では、第2の
復号化手段の検索手段によって入力符号を第2の辞書か
ら検索し、検出されたときは文字列出力手段が第2の辞
書から入力符号に対応する復号化文字列を出力し、検出
されない場合は第1の復号化手段が入力符号を第1の辞
書を用いて再帰的に復号化して出力し、その後第2の辞
書登録手段がこの復号化された文字列に所定の処理を施
して第2の辞書に登録して次の復号化処理に備えるよう
に構成したので、入力符号に対応する復元文字列を大幅
に速く得ることができる。
As described above, according to the present invention, the input code is searched from the second dictionary by the search means of the second decoding means, and if it is detected, the character string output means is searched from the second dictionary. A decoded character string corresponding to the input code is output, and if not detected, the first decoding means recursively decodes and outputs the input code using the first dictionary, and then outputs the second dictionary registration means Is configured to apply a predetermined process to this decoded character string, register it in the second dictionary, and prepare for the next decoding process, so that the restored character string corresponding to the input code can be obtained much faster. Can be.

【0061】また、第2の辞書に最終的な復元文字列を
登録するので、再帰的な復号化処理をその都度行うこと
なく復元文字列を得ることができる。しかも、第2の辞
書の登録をハッシュ関数に基づき行うので、さらに速く
復元文字列を得ることができる。
Since the final restored character string is registered in the second dictionary, a restored character string can be obtained without performing recursive decoding processing each time. Moreover, since the registration of the second dictionary is performed based on the hash function, the restored character string can be obtained even faster.

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

【図1】本発明の原理説明図である。FIG. 1 is a diagram illustrating the principle of the present invention.

【図2】第1の復号化の処理手順を示す図である。FIG. 2 is a diagram showing a procedure of a first decoding process.

【図3】第2の復号化の処理手順を示す図である。FIG. 3 is a diagram showing a procedure of a second decoding process.

【図4】第3の復号化の処理手順を示す図である。FIG. 4 is a diagram showing a procedure of a third decoding process.

【図5】第4の復号化の処理手順を示す図である。FIG. 5 is a diagram showing a fourth decryption processing procedure.

【図6】第2の辞書の内容の一例を示す図である。FIG. 6 is a diagram showing an example of the contents of a second dictionary.

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

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

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

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

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

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

1 第1の辞書登録手段 2 第1の復号化手段 3 第1の復号化手段 3a 検索手段 3b 文字列出力手段 4 第2の辞書登録手段 DESCRIPTION OF SYMBOLS 1 1st dictionary registration means 2 1st decoding means 3 1st decoding means 3a search means 3b character string output means 4 2nd dictionary registration means

───────────────────────────────────────────────────── フロントページの続き (72)発明者 千葉 広隆 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (56)参考文献 特開 昭60−116228(JP,A) 特開 平3−68219(JP,A) 特開 平3−179520(JP,A) 特開 平3−204233(JP,A) 特開 平3−204235(JP,A) (58)調査した分野(Int.Cl.7,DB名) H03M 7/40 ────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Hirotaka Chiba 1015 Kamiodanaka, Nakahara-ku, Kawasaki City, Kanagawa Prefecture Inside Fujitsu Limited (56) References JP-A-60-116228 (JP, A) JP-A-3-68219 (JP, A) JP-A-3-179520 (JP, A) JP-A-3-204233 (JP, A) JP-A-3-204235 (JP, A) (58) Fields investigated (Int. Cl. 7) , DB name) H03M 7/40

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 入力符号を第1の辞書を用いて再帰的に
復号化する第1の復号化手段(2)と、前回入力符号と
今回復号化された文字列の第1文字とを組にし、この組
に新たな符号を対応させて前記第1の辞書に登録する第
1の辞書登録手段(1)とを備え、入力符号の復号化を
行うデータ復元方式において、 前記入力符号に基づき復号化された文字列を、前記入力
符号とともに第2の辞書に登録する第2の辞書登録手段
(4)と、 前記第1の復号化手段(2)に基づき復号化を行う前
に、前記入力符号を前記第2の辞書から検索する検索手
段(3a)と、前記検索手段(3a)により前記入力符
号が検出された場合、前記第2の辞書から前記入力符号
に対応する前記復号化された文字列を出力する文字列出
力手段(3b)とを有する第2の復号化手段(3)と、 を有することを特徴とするデータ復元方式。
A first decoding means (2) for recursively decoding an input code using a first dictionary, and combining a previously input code with a first character of a currently decoded character string. A first dictionary registering means (1) for registering a new code in the first dictionary in association with the set, and in a data restoration method for decoding the input code, A second dictionary registration unit (4) for registering the decoded character string together with the input code in a second dictionary; and before performing decoding based on the first decoding unit (2), Search means (3a) for searching for an input code from the second dictionary; and when the input code is detected by the search means (3a), the decoded code corresponding to the input code is detected from the second dictionary. Character string output means (3b) for outputting a character string Data recovery method, characterized in that it comprises a Goka means (3), the.
【請求項2】 前記第1の辞書には登録されている入力
符号を参照した頻度を表す参照頻度をさらに設け、前記
第2の辞書登録手段(4)は新たに入力される新規入力
符号が入力されるごとに、前記新規入力符号に対応する
前記参照頻度をカウントするカウント手段を有し、 前記文字列出力手段(3b)は、前記参照頻度が所定値
を超えた場合は、前記第2の辞書から前記入力符号に対
応する前記復号化された文字列を出力する選択手段を有
することを特徴とする請求項1記載のデータ復元方式。
2. The method according to claim 1, wherein the first dictionary further includes a reference frequency indicating a frequency of referring to the registered input code, and the second dictionary registration unit (4) determines whether a newly input code is newly input. The character string output means (3b) includes a counting means for counting the reference frequency corresponding to the new input code every time the reference frequency is input. 2. The data restoration method according to claim 1, further comprising selecting means for outputting the decoded character string corresponding to the input code from the dictionary of (1).
【請求項3】 前記検索手段(3a)は、前記入力符号
を前記第2の辞書から一度だけ検索し、前記第1の辞書
から検索することを特徴とする請求項1記載のデータ復
元方式。
3. The data restoration method according to claim 1, wherein said search means (3a) searches said input code only once from said second dictionary and searches said first code from said first dictionary.
【請求項4】 前記第2の辞書登録手段(4)、前記検
索手段(3a)及び前記文字列出力手段(3b)は、い
ずれもハッシュ関数に基づいて、前記第2の辞書とアク
セスすることを特徴とする請求項1,2又は3記載のデ
ータ復元方式。
4. The second dictionary registration unit (4), the search unit (3a), and the character string output unit (3b) all access the second dictionary based on a hash function. The data restoration method according to claim 1, 2, or 3, wherein
【請求項5】 前記第2の辞書登録手段(4)は、前記
入力符号に対応する文字列が前記第2の辞書に既に存在
し、かつ、前記第2の辞書に登録されている文字列より
も今回復号化された文字列のほうが長い文字列である場
合、前記今回復号化された文字列を前記第2の辞書に登
録することを特徴とする請求項4記載のデータ復元方
式。
5. The method according to claim 1, wherein the second dictionary registration unit (4) is configured to determine whether the character string corresponding to the input code already exists in the second dictionary and the character string registered in the second dictionary. 5. The data restoration method according to claim 4, wherein when the character string decoded this time is longer than the character string decoded this time, the character string decoded this time is registered in the second dictionary.
JP03275292A 1991-10-23 1991-10-23 Data restoration method Expired - Fee Related JP3117760B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03275292A JP3117760B2 (en) 1991-10-23 1991-10-23 Data restoration method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03275292A JP3117760B2 (en) 1991-10-23 1991-10-23 Data restoration method

Publications (2)

Publication Number Publication Date
JPH05113998A JPH05113998A (en) 1993-05-07
JP3117760B2 true JP3117760B2 (en) 2000-12-18

Family

ID=17553401

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03275292A Expired - Fee Related JP3117760B2 (en) 1991-10-23 1991-10-23 Data restoration method

Country Status (1)

Country Link
JP (1) JP3117760B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4586633B2 (en) * 2005-05-25 2010-11-24 ソニー株式会社 Decoder circuit, decoding method, and data recording apparatus
JP5523144B2 (en) * 2010-02-25 2014-06-18 キヤノン株式会社 Information processing apparatus, control method thereof, program, and storage medium

Also Published As

Publication number Publication date
JPH05113998A (en) 1993-05-07

Similar Documents

Publication Publication Date Title
JP3541930B2 (en) Encoding device and decoding device
US5406278A (en) Method and apparatus for data compression having an improved matching algorithm which utilizes a parallel hashing technique
JP3241788B2 (en) Data compression method
JP3117760B2 (en) Data restoration method
JP3038223B2 (en) Data compression method
JPH0764765A (en) Data compressing device and data restoring device
JP3127016B2 (en) Data compression and decompression method
JP3241787B2 (en) Data compression method
JP3132774B2 (en) Data compression / decompression device
JP2954749B2 (en) Data compression method
JP3105598B2 (en) Data compression method using universal code
JP2774350B2 (en) Data compression method and data restoration method of compressed data
JPH05152971A (en) Data compressing/restoring method
JP3130324B2 (en) Data compression method
JPH05241775A (en) Data compression system
JPH06168097A (en) Data encoding system and data decoding system
JPH05113869A (en) Data compressive encoding and decoding method
JP3384813B2 (en) Data compression method
JP3053656B2 (en) Dictionary registration method in data compression
JP3051501B2 (en) Data compression method
JP3088740B2 (en) Data compression and decompression method
JP2799228B2 (en) Dictionary initialization method
JP3100206B2 (en) Data compression method
JP3388768B2 (en) Data compression and decompression method
JPH05120281A (en) Data compression system

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: 20000912

LAPS Cancellation because of no payment of annual fees