JP3231105B2 - Data encoding method and data restoration method - Google Patents

Data encoding method and data restoration method

Info

Publication number
JP3231105B2
JP3231105B2 JP31957992A JP31957992A JP3231105B2 JP 3231105 B2 JP3231105 B2 JP 3231105B2 JP 31957992 A JP31957992 A JP 31957992A JP 31957992 A JP31957992 A JP 31957992A JP 3231105 B2 JP3231105 B2 JP 3231105B2
Authority
JP
Japan
Prior art keywords
data
dictionary
encoding
jib
lempel
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
JP31957992A
Other languages
Japanese (ja)
Other versions
JPH06168096A (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 JP31957992A priority Critical patent/JP3231105B2/en
Publication of JPH06168096A publication Critical patent/JPH06168096A/en
Application granted granted Critical
Publication of JP3231105B2 publication Critical patent/JP3231105B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ジブ・レンペル符号を
用いたユニバーサル符号化によりデータを圧縮するデー
タ符号化方式、及びデータ復元方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data encoding method for compressing data by universal encoding using a Jib-Lempel code and a data restoring method.

【0002】[0002]

【従来の技術】近年、OA(オフィシャル・オートメー
ション)の発達に伴い、一文書中に文字、図形、画像な
ど様々のメディアを混在して取り込めるようになってき
ている。そして、文字コードや白黒2値画像等の混在情
報が、それらのレイアウト情報とともに、文書データと
してG4ファクシミリや光ディスクファイル・システム
などで扱われるようになってきており、それらの情報の
データ量も急速に増加してきている。これらのマルチメ
ディアから成る文書情報をディジタルデータとして利用
するとき、一般に、画像情報のデータ量は文字コードの
データ量に比較して10倍〜数10倍と多くなる。この
ため、データ蓄積やデータ伝送等で、画像情報を扱うと
きは、それらの処理を効率良く行うために、データの中
の冗長な部分を省いてデータ量を圧縮することにより、
記憶容量の削減や伝送の効率化を図っている。
2. Description of the Related Art In recent years, with the development of OA (Official Automation), it has become possible to incorporate various media such as characters, figures, and images in a single document. Mixed information such as character codes and black-and-white binary images is now handled as document data in G4 facsimile and optical disk file systems, etc., along with their layout information. The amount of such information is also rapidly increasing. It is increasing. When document information composed of such multimedia is used as digital data, the data amount of image information is generally ten times to several tens times larger than the data amount of character codes. For this reason, when handling image information in data storage, data transmission, etc., in order to efficiently perform such processing, the data amount is compressed by omitting redundant portions in the data,
It aims to reduce storage capacity and increase transmission efficiency.

【0003】しかしながら、大容量のファイルシステム
や文書データベースでは、文書データ中の文字コード情
報も全体として大きなものとなるため、画像情報のみな
らず文字コード情報の圧縮も必要となってくる。
However, in a large-capacity file system or a document database, the character code information in the document data becomes large as a whole, so that not only image information but also character code information must be compressed.

【0004】文字コードや画像データなどの様々のデー
タを一つの方式でデータ圧縮できる方法として、ユニバ
ーサル符号化方式が知られており、その代表的な方法と
してジブ・レンペル符号(宗像清治、「Ziv-Lempelのデ
ータ圧縮法」、情報処理、Vol.26,No.1,Jan.1985年参
照)がある。
A universal encoding method is known as a method capable of compressing various data such as character codes and image data by one method. As a typical method, a Jib Lempel code (Seiji Munakata, "Ziv -Lempel Data Compression Method ", Information Processing, Vol. 26, No. 1, Jan. 1985).

【0005】このジブ・レンペル符号には、 ユニバーサル型と 増分分解型(Incremental Paring) の2つのアルゴリズムがある。There are two algorithms for the Jib-Lempel code, a universal type and an incremental paring type.

【0006】さらに、ユバーサル型アルゴリズムの改良
として、LZW符号がある(T.C. Bell,"Better OPM/L T
ext Compression",IEEE Trans. on Commun., Vol.COM-3
4,No.12,Dec.1986参照)。
Further, as an improvement of the universal algorithm, there is an LZW code (TC Bell, "Better OPM / LT
ext Compression ", IEEE Trans. on Commun., Vol.COM-3
4, No. 12, Dec. 1986).

【0007】また、増分分解型アルゴリズムにも、その
改良型として、LZW符号がある(T.A. Welch,"A Techn
ique for High-Performance Data Compression",Comput
er,June 1984 参照)。
An LZW code is also an improved version of the incremental decomposition type algorithm (TA Welch, "A Techn.
ique for High-Performance Data Compression ", Comput
er, June 1984).

【0008】これらの符号化方式の内、高速処理ができ
ることと、アルゴリズムが簡単であることから、最近
は、LZW符号が、記憶装置に格納するファイルの圧縮
などに使用されるようになってきている。
[0008] Among these encoding methods, LZW codes have recently been used for compression of files stored in storage devices because of their high speed processing and simple algorithms. I have.

【0009】ここで、上記ユニバーサル符号化な代表的
な方法であるジブ・レンペル符号のユニバーサル型及び
増分分解型の2つのアルゴリズムについて説明する。 1.ユニバーサル型のアルゴリズム このアルゴリズムは、演算量が多いが、高い圧縮率が得
られるものであり、符号化するデータを、過去のデータ
系列の任意の位置から一致する最大長の系列(部分列)
に区切り、過去の系列の複製として符号化する方法であ
る。
Here, two algorithms of a universal type and an incremental decomposition type of the Jib Lempel code, which are typical methods of the universal coding, will be described. 1. Universal type algorithm This algorithm requires a large amount of computation, but can provide a high compression rate. The maximum length sequence (subsequence) that matches data to be encoded from an arbitrary position in the past data sequence
And encodes it as a copy of a past series.

【0010】このようなユニバーサル型ジブ・レンペル
符号の符号化の基本概念を図15(a) に示す。同図(a)
に示すPバッファには過去のデータ系列である既に符号
化済みの入力データ「・・・abc・・・」が格納され
ている。一方、Qバッファにはこれから符号化するデー
タ(文字列)「abcdef」が入力・格納されてい
る。
FIG. 15 (a) shows the basic concept of the encoding of such a universal type Jib Lempel code. Figure (a)
.. Abc... Stored in the P buffer shown in FIG. On the other hand, data (character string) “abcdef” to be encoded is input and stored in the Q buffer.

【0011】このような状態において、Qバッファ内の
データを符号化する際には、Qバッファのデータ系列を
キーとしてPバッファ内のデータ系列を走査し、Pバッ
ファ内でQバッファ内のデータ系列に一致する最大長の
部分列(同図(a) の例では「abc」)を求める。そし
て、Pバッファ中のこの最大長の部分列を指定するため
に、同図(b) に示す形式の情報の組を符号化する。この
情報の組は、「Pバッファ中における最大一致系列の開
始位置」(同図(a) の例では「a」のアドレス)、「一
致する長さ」(同図(a) の例では「3」)、及び「次の
シンボル」(同図(a) の例では「d」)の3個の情報か
らなる。
In such a state, when encoding the data in the Q buffer, the data sequence in the P buffer is scanned using the data sequence in the Q buffer as a key, and the data sequence in the Q buffer is scanned in the P buffer. Is obtained ("abc" in the example of FIG. 3A). Then, in order to specify the substring having the maximum length in the P buffer, a set of information in the format shown in FIG. This set of information includes "the start position of the maximum matching sequence in the P buffer" (the address of "a" in the example of FIG. 3A), and "length of matching" (in the example of FIG. 3 "), and" next symbol "(" d "in the example of FIG. 3A).

【0012】続いて、このQバッファ内の符号化した系
列(この場合、「abc」)をPバッファ内に移動・格
納して新たな過去のデータ系列を得る。以下、Qバッフ
ァ内の残りのデータ系列「def」についても、同様の
操作を繰り返し、Qバッファ内の残りのデータ系列をP
バッファ内に既に格納されている部分列に分解し、上述
のようにして符号化すると共に、Pバッファ内のデータ
系列を更新する。
Subsequently, the encoded sequence (in this case, "abc") in the Q buffer is moved and stored in the P buffer to obtain a new past data sequence. Hereinafter, the same operation is repeated for the remaining data series “def” in the Q buffer, and the remaining data series in the Q buffer is
The data sequence is decomposed into partial strings already stored in the buffer, encoded as described above, and the data series in the P buffer is updated.

【0013】2.増分分解型のアルゴリズム このアルゴリズムは、圧縮率はユニバーサル型より劣る
が、アルゴリズムが簡単であり、計算も容易であること
から高速処理ができる。
2. Incremental decomposition type algorithm Although this algorithm is inferior in compression ratio to the universal type, the algorithm is simple and the calculation is easy, so that high-speed processing can be performed.

【0014】このアルゴリズムの代表的な方法であるL
ZW符号化の方法を、図16に示すフローチャート、図
17に示す辞書(学習辞書)、及び図18に示すデータ
変換の模式図を用いて説明する。
L which is a typical method of this algorithm
The ZW encoding method will be described with reference to a flowchart shown in FIG. 16, a dictionary (learning dictionary) shown in FIG. 17, and a schematic diagram of data conversion shown in FIG.

【0015】LZW符号化は、書き替え可能な辞書(学
習用辞書)を1個持ち、入力文字列を相異なる文字列
(部分列)に分け、これらの文字列を出現した順に参照
番号を付けて上記辞書に登録すると共に、現在入力して
いる文字列を、上記辞書に既に登録されている最大長の
一致する文字列に割り当てられた参照番号で表わすこと
により符号化するものである。尚、以後の説明では、情
報理論で用いられる呼称を踏襲し、データの1ワード単
位を文字と呼び、データが任意ワードつながったものを
文字列と呼ぶ。
The LZW encoding has one rewritable dictionary (learning dictionary), divides an input character string into different character strings (substrings), and assigns reference numbers in the order in which these character strings appear. And registering the character string currently input in the dictionary with a reference number assigned to a matching character string of the maximum length already registered in the dictionary. In the following description, one word unit of data is referred to as a character, and data connected with an arbitrary word is referred to as a character string, following the name used in information theory.

【0016】LZW符号化処理では、まず、ステップS
1で、予め辞書DC に、全文字につき一文字から成る文
字列を登録する初期化を行う。即ち、例えば、一文字を
8ビットコードで符号化する場合には、最大256種類
の全文字につき一文字からなる文字列を、辞書DC のア
ドレス0〜255番地に初期登録する。これにより、例
えば図17に示すように、辞書DC のアドレス0、1、
2、・・・、255に、アルファベット「a」、
「b」、「c」、・・・や、ひらがな、カタカナ、数字
等が登録される。尚、同図の左側に示す文字列テーブル
B1は説明を容易なものとするために、補助的に示した
ものである。
In the LZW encoding process, first, at step S
1, the pre dictionary D C, is initialized to register a string of one character per total characters. That is, for example, when encoding character with 8-bit code, a string of one character per maximum 256 all characters are initially registered in the address 0 to 255 address of the dictionary D C. Thus, for example, as shown in FIG. 17, the address of the dictionary D C 0, 1,
, 255, the alphabet "a",
“B”, “c”,..., Hiragana, katakana, numerals, and the like are registered. It should be noted that the character string table B1 shown on the left side of the figure is supplementarily shown for easy explanation.

【0017】以下の説明では、説明を分かり易くするた
めに、図18に示すような入力文字列が入力された場合
の例を取り上げて説明する。まず、ステップS1で、辞
書DC の書込用先頭アドレスnに、上記初期登録された
最後の文字列の格納アドレスの次のアドレスである「2
56」を、新たに登録する文字列の辞書DC への格納ア
ドレスとして設定する。
In the following description, an example in which an input character string as shown in FIG. 18 is input will be described for easy understanding. First, at step S1, the leading address n for writing dictionary D C, which is the next address of the storage address of the last character string the initial registration "2
56 "is set as the storage address to the dictionary D C of the character string to be newly registered.

【0018】続いて、同じくステップS1で、入力され
た最初の文字Kをキーデータ(インデックス)として辞
書Dc を検索し、参照番号ω(辞書DC に登録されてい
る文字Kの参照番号)を求め、これを語頭文字列(prefi
x string) とする。これにより、入力文字列が、例え
ば、図18に示すような「ababcbababaaa
aaaa」であれば、最初の文字Kである「a」をイン
デックスとして辞書DCが検索され、「a」の参照番号
「0」が参照番号ωとして求められ、この参照番号
「0」が語頭文字列となる(図18の出力コードの欄を
参照)。
[0018] Then, similarly in step S1, searches the dictionary D c the first character K which is input as the key data (index), reference numeral omega (reference number of a character K which is registered in the dictionary D C) And assign this to the initial string (prefi
x string). As a result, the input character string is, for example, “ababcbababaaaa” as shown in FIG.
If aaaa ", dictionary D C is searched for, which is the first letter K" a "as an index," obtained as a reference number "0" of a "reference number ω, the reference number" 0 "is the word This is the initial character string (see the output code column in FIG. 18).

【0019】次に、ステップS2で、入力文字列の次の
文字Kを読む。これにより、上記最初の入力文字の
「a」の次の文字「b」が読み込まれる。続いて、ステ
ップS3で、文字Kがあるか否かを判別する。これは、
入力文字列がまだ終了していないか否かを判別する処理
である。
Next, in step S2, the next character K of the input character string is read. Thus, the character “b” next to the first input character “a” is read. Subsequently, in a step S3, it is determined whether or not the character K is present. this is,
This is a process for determining whether or not the input character string has not been completed yet.

【0020】図18に示す入力文字列の場合は、上記ス
テップS2で、「a」の次の文字「b」が読み込まれる
ので文字列がまだ終了しておらず、したがって、ステッ
プS3ではYesと判断し、次にステップS4で、文字
列「ωK」が辞書DC に登録されてあるか否か検索す
る。
In the case of the input character string shown in FIG. 18, the character string "b" next to "a" is read in step S2, and the character string has not been finished yet. determination, and then in step S4, a character string "ωK" searches whether are registered in the dictionary D C.

【0021】これにより、ステップS1で求められた語
頭文字列ω(ここでは参照番号「0」)に、ステップS
2で読み込んだ文字K(ここでは「b」)を加えた文字
列「0b」が、辞書DC 内に登録されているか否かが調
べられる。
Thus, the initial character string ω (here, reference number “0”) obtained in step S1 is added to step S1.
(In this case "b") read in two characters K is the string "0b" plus, whether or not it is registered in the dictionary D C is examined.

【0022】そして、この検索で、Noであれば、ステ
ップS6に進み、ステップS1で得られている文字Kの
参照番号ωの符号「code(ω)」を出力し、また文字列
「ωK」に新たな参照番号nを付与して辞書DC のアド
レスnに登録する。
If the result of this search is No, the process proceeds to step S6, where the code "code (ω)" of the reference number ω of the character K obtained in step S1 is output, and the character string "ωK" It is registered in the address n of the dictionary D C to impart a new reference number n in.

【0023】これにより、図18に示す入力文字列の場
合、まず、「a」の参照番号ωである「0」の符号が出
力され、さらに、検出されなかった文字列「0b」が参
照番号「256」が付与されて、辞書DC のアドレス2
56に登録される。
As a result, in the case of the input character string shown in FIG. 18, first, the code of "0" which is the reference number ω of "a" is output, and the character string "0b" which has not been detected is replaced with the reference number. been granted the "256", the address of the dictionary D C 2
56 is registered.

【0024】続いて、同じくステップS6で、上記ステ
ップS2で読み込んだ入力文字Kを参照番号ωに置き換
えると共に、辞書DC のアドレスnを「1」インクリメ
ントして、ステップS2に戻り次の文字Kを読み込む。
[0024] Then, similarly in step S6, along with replacing the input character K read in step S2 to the reference numbers omega, the address n of the dictionary D C is incremented "1", the process returns to the step S2 next character K Read.

【0025】これにより、図18の入力文字列の例であ
れば、参照番号ωが「b」の参照番号である「1」に置
き換えられ、次回新たに登録される文字列の辞書DC
での登録アドレスnがインクリメントされて「257」
に変わる。
[0025] Thus, in the example of the input string in FIG. 18, reference numeral ω is replaced by "b" is a reference number "1", the dictionary D in C of a character string next newly registered Registration address n is incremented by "257"
Changes to

【0026】一方、ステップS4で文字列「ωK」が辞
書DC に登録されていれば、この場合は、ステップS5
に進んで、その文字列「ωK」を参照番号ωに置き換
え、再びステップS2に戻ってステップS4で文字列
「ωK」が辞書DC から探せなくなるまでステップS2
〜S5を繰り返し、最大一致長の文字列の検索を続け
る。
On the other hand, if the character string "ωK" is registered in the dictionary D C in step S4, in this case, step S5
The process proceeds to step S2 to the replace the string "ωK" at reference numeral omega, not find in step S4 string "ωK" from the dictionary D C returns to step S2 again
Steps S5 to S5 are repeated to continue searching for the character string having the maximum matching length.

【0027】このような方法で行われるLZW符号化の
処理を、図18に示す入文字列「ababcbabab
aaaaaaa」を取り上げて具体的に説明すると、ま
ず、最初の文字「a」を入力したとき、辞書DC には
「a」の他に一致する文字列がないので、「a」に付与
された参照番号「0」の符号code(0)を出力する。そ
して、拡張した文字列「ab」に参照番号「256」を
付与して辞書DC に登録する。実際の辞書登録は図13
の右側に示すように文字列「0b」の形で登録される。
The processing of LZW encoding performed by such a method is described by the input character string "ababcbabab" shown in FIG.
To be specific addresses the aaaaaaa ", firstly, when typing the first letter" a ", there is no character string that matches the other" a "in the dictionary D C, granted to" a " The code code (0) of the reference number “0” is output. Then, registered in the dictionary D C by giving the reference number "256" to the extended character string "ab". Figure 13 shows the actual dictionary registration.
Is registered in the form of a character string “0b” as shown on the right side of “.

【0028】続いて、2番目の文字「b」が新たな検索
文字列の先頭になる。この場合、辞書DC には文字
「b」の他に一致する文字がないので文字「b」に付さ
れている「1」の参照番号の符号code(1)を出力し、
同時に拡張した文字列「ba」もまだ辞書DC に登録さ
れていないので、文字列「ba」を「1a」で表わし、
参照番号「257」を付与して辞書DC に登録する。そ
して、次は、3番目の文字「a」が次の検索文字列「ω
K」の先頭になる。以下同様に、このような処理を続け
ていくことにより、図18に示す入力文字列「abab
cbababaaaaaaa」が、同図の出力コード欄
に示す「0、1、256、2、257、260、0、2
62、263」の符号列に変換・出力され、この結果と
して、入力文字列が圧縮される。
Subsequently, the second character "b" becomes the head of a new search character string. In this case, the dictionary D C outputs the sign of the reference numbers "1" since there is no character that matches the other characters "b" which are assigned to the letter "b" code (1),
Is not registered in the extended character string "ba" is also still Dictionary D C simultaneously represents a character string "ba" in "1a",
Given the reference number "257" is registered in the dictionary D C is. Then, next, the third character “a” is replaced with the next search character string “ω
K ”. Similarly, by continuing such processing, the input character string “abab” shown in FIG.
“cbababaaaaaaa” is “0, 1, 256, 2, 257, 260, 0, 2” shown in the output code column of FIG.
62, 263 ", and as a result, the input character string is compressed.

【0029】次に、上述の如くLZW符号化された符号
データを復元するアルゴリズムを、図19のフローチャ
ートを用いて説明する。また、この復元の具体例とし
て、図18に示すLZW符号化された出力符号列「0、
1、256、257、260、0、262、263」
を、入力符号列として図20(a) に再掲して説明の補助
とする。
Next, an algorithm for restoring LZW encoded code data as described above will be described with reference to the flowchart of FIG. As a specific example of this restoration, the output code string “0,
1, 256, 257, 260, 0, 262, 263 "
Is again shown in FIG. 20 (a) as an input code string to assist the explanation.

【0030】先ず、ステップS11では、この場合も上
記LZW符号化のときと同様に、辞書Dd に全文字につ
き一文字から成る文字列を初期登録する。これから説明
する上記具体例では、各一文字「a」,「b」,
「c」、・・・を、それぞれ参照番号「0」、「1」、
「2」、・・・を付与して辞書Dd に登録し、また、辞
書Dd の書込用先頭アドレスnに、上記初期登録された
最後の文字列の格納アドレスの次のアドレスである「2
56」を、新たに登録する文字列の辞書Dd への格納ア
ドレスnとして設定する。
First, in step S11, as in the case of the LZW encoding, a character string consisting of one character for every character is initially registered in the dictionary Dd. In the specific example described below, each of the characters “a”, “b”,
"C",... Are represented by reference numbers "0", "1",
Are registered in the dictionary Dd by adding "2",..., And "2" which is the next address of the storage address of the last character string initially registered is added to the writing start address n of the dictionary Dd.
56 "is set as the storage address n of the newly registered character string in the dictionary Dd.

【0031】次に、同じくステップS11で、最初の符
号CODEを読み込み、この符号CODEに対応する参
照番号をOLDωにセットする。これにより、図20
(a)示す入力符号列の例では最初の入力符号である参
照番号「0」の符号code(0)が読み込まれて、参照番
号「0」に変換された後、OLDωにセットされる。
Next, in step S11, the first code CODE is read, and a reference number corresponding to the code CODE is set to OLDω. As a result, FIG.
In the example of the input code string shown in (a), the code code (0) of the reference number “0”, which is the first input code, is read, converted to the reference number “0”, and set to OLDω.

【0032】続いて、同じくステップS11で、参照番
号「OLDω」に対応する文字Kを復元する。この処理
では、最初の入力符号CODEは上述のようにして辞書
Ddに初期登録された一文字の参照番号のいずれかに該
当することから、その入力符号CODEに一致する符号
code(K)を辞書Dd から探し出し、該当文字「K」を
出力する。尚、この出力した文字「K」は後に必要に応
じて行われる例外処理に備えてFINcharにもセットし
ておく。
Subsequently, in step S11, the character K corresponding to the reference number "OLDω" is restored. In this process, since the first input code CODE corresponds to one of the one-character reference numbers initially registered in the dictionary Dd as described above, the code that matches the input code CODE is used.
The code (K) is searched from the dictionary Dd, and the corresponding character "K" is output. Note that the output character "K" is also set in FINchar in preparation for an exception process performed as necessary later.

【0033】これにより、図20(a) に示す入力符号列
の例では、最初に参照番号「0」に対応する文字「a」
が、復元・出力されると共に、FINcharにもセットさ
れる。
Thus, in the example of the input code string shown in FIG. 20A, first, the character "a" corresponding to the reference number "0"
Is restored and output, and is also set in FINchar.

【0034】続いて、ステップS12で、次の入力符号
CODEを読み込む。すなわち、図20(a) に示す入力
符号列の例では、「1」の符号code(1)が読み込まれ
る。そして、ステップS13で、新たに読み込まれた符
号CODEが有るか否か、すなわち符号入力の終了の有
無を判別する。図20(a) に示す入力符号列の例では、
ステップS12で参照番号「1」の符号code(1)が新
たな入力符号CODEとして読み込まれる。
Subsequently, in step S12, the next input code CODE is read. That is, in the example of the input code string shown in FIG. 20A, the code code (1) of "1" is read. Then, in a step S13, it is determined whether or not there is a code CODE newly read, that is, whether or not the code input is completed. In the example of the input code string shown in FIG.
In step S12, the code code (1) having the reference number "1" is read as a new input code CODE.

【0035】このように、新たな入力符号CODEがあ
れば、ステップS14に進んで、この入力符号CODE
に対応する参照番号「ω」をINωにセットする。これ
により、図20(a) に示す入力符号の例では、参照番号
「1」がINωにセットされる。
As described above, if there is a new input code CODE, the process proceeds to step S14, where the input code CODE is set.
Is set to INω. Thus, in the example of the input code shown in FIG. 20A, the reference number “1” is set to INω.

【0036】つぎに、ステップS15で、上記参照番号
「ω」が辞書Dd に既に登録されているか否か(ω≧
n)を判別する。この処理では、通常、読み込んだ符号
CODEは前回までの処理で、辞書Dd に既に登録され
ているから、ω<nであり、ステップS16に進んで、
辞書Dd を検索して、上記参照番号「ω」に対応する文
字列ω′Kを辞書Dd から読み出し、参照番号「ω」に
対応する文字列が二文字の文字列「ω′K」であるか否
か判別する。そして二文字の文字列「ω′K」であった
場合には、ステップS17で文字「K」を一時的にスタ
ックし、参照番号「ω′」を新たな参照番号ωとして再
度ステップS16に戻り、このステップS16、S17
の手順を再帰的に参照番号ωに対応する文字列が一文字
「K」に成るまで繰り返し、最後ステップS18に進ん
で、まず上記最後に復元した文字Kを出力した後、ステ
ップS17でスタックした全ての文字をLIFO(Last
In First Out) 形式でポップアップして出力する(上記
ステップS12で読み込んだ符号CODEの復元・出
力)。さらに、ステップS18において、上記復元文字
列の第一文字KをFINcharにセットした後、前回復元
処理した参照番号OLDωと今回復元した文字列の最初
の一文字Kとから組(OLDω、K)で表わされる文字
列を、新たな参照番号「n」を付与して辞書Dd のアド
レスnに登録する。続いて、アドレスnを「1」インク
リメントして、その「n+1」を次に辞書Dd に登録す
る文字列の登録アドレスnとして設定し、さらにINω
にセットされていた今回復元された符号CODEに対応
する参照番号「ω」をOLDωに代入して、ステップS
12に戻る。
Next, in step S15, it is determined whether or not the reference number "ω" has already been registered in the dictionary Dd (ω ≧
n) is determined. In this process, normally, the read code CODE is already registered in the dictionary Dd in the previous process, so that ω <n, and the process proceeds to step S16.
The dictionary Dd is searched, and the character string ω′K corresponding to the reference number “ω” is read from the dictionary Dd, and the character string corresponding to the reference number “ω” is a two-character character string “ω′K”. Is determined. If it is a two-character string "ω'K", the character "K" is temporarily stacked in step S17, and the reference number "ω '" is set as a new reference number ω, and the process returns to step S16 again. This step S16, S17
Is repeated recursively until the character string corresponding to the reference number ω becomes one character "K", and the process proceeds to the last step S18, where the last restored character K is output, and then all of the characters stacked in the step S17 are output. LIFO (Last
(In First Out) pop-up and output (restoration and output of code CODE read in step S12). Further, in step S18, after setting the first character K of the restored character string to FINchar, the first character K of the restored character string is represented by a set (OLDω, K) from the reference number OLDω of the previously restored processing and the first character K of the currently restored character string. The character string is registered at the address n of the dictionary Dd with a new reference number "n". Subsequently, the address n is incremented by "1", and "n + 1" is set as a registration address n of a character string to be registered next in the dictionary Dd.
The reference number “ω” corresponding to the code CODE restored this time, which has been set to
Return to 12.

【0037】これにより、図20(a) に示す入力符号の
場合には、同(b) に示すように、2番目に読み込まれた
参照番号「1」の符号CODE(=code(1))から文
字「b」が復元・出力され、この文字「b」がFINch
arにセットされると共に、前回復元処理した符号COD
E(=code(0))に対応する参照番号「0」と今回復
元した一文字「b」との連なりから成る文字列「0b」
が新たな参照番号「256」が付与されて辞書Dd に登
録される。
Thus, in the case of the input code shown in FIG. 20A, as shown in FIG. 20B, the code CODE (= code (1)) of the reference number "1" read second. The character "b" is restored and output from
ar and the code COD that was previously restored
A character string “0b” consisting of a series of a reference number “0” corresponding to E (= code (0)) and one character “b” restored this time
Is given a new reference number "256" and registered in the dictionary Dd.

【0038】そして、辞書Dd の登録アドレスnが「2
57」に更新された後、OLDωには今回、復元された
符号CODE(=code(1))に対応する参照番号
「1」がセットされ、ステップS12で3番目の符号co
de(56)が読み込まれる。
The registered address n of the dictionary Dd is "2
After being updated to “57”, the reference number “1” corresponding to the code CODE (= code (1)) restored this time is set in OLDω, and the third code co is set in step S12.
de (2 56) is read.

【0039】そして、辞書Dd の検索により求められた
文字列「0b」から文字列「ab」への置き換えが行わ
れて、文字列「ab」が出力される。同時に、前回復元
処理した符号code(1)に対応する参照番号「1」と今
回復元した文字列の第一文字「a」とを組み合わせた文
字列「1a」(=「ba」)が、新たな参照番号「25
7」が付与されて辞書Dd のアドレス「257」に登録
される。
Then, the character string "0b" obtained by searching the dictionary Dd is replaced with the character string "ab", and the character string "ab" is output. At the same time, a character string “1a” (= “ba”) obtained by combining the reference number “1” corresponding to the code code (1) restored last time and the first character “a” of the character string restored this time is new. Reference number "25
"7" is added and registered in the address "257" of the dictionary Dd.

【0040】一方、上記のステップS15の判別で、読
み込んだ符号code(ω)が前回までの処理で辞書Dd に
登録されていない場合(ω≧n)は、ステップS19に
進んで例外処理を行う。この例外処理では、まず、前回
復元した文字列の第一文字「FINchar」を出力した
後、前回復元処理した符号CODEに対応する参照番号
「OLDω」を参照番号ωとしてセットした後に、上記
前回復元した文字列の第一文字「FINchar」を加えた
文字列「OLDω、FINchar」を求め、この新たな文
字列に対応する参照番号をINωにセットしてからステ
ップS16に進む。
On the other hand, if it is determined in step S15 that the read code (ω) is not registered in the dictionary Dd in the previous process (ω ≧ n), the process proceeds to step S19 to perform an exception process. . In this exception processing, first, after outputting the first character "FINchar" of the previously restored character string, the reference number "OLDω" corresponding to the code CODE restored last time is set as the reference number ω, and then the previously restored character string is restored. A character string “OLDω, FINchar” obtained by adding the first character “FINchar” of the character string is obtained, a reference number corresponding to the new character string is set to INω, and the process proceeds to step S16.

【0041】このことにより、例えば、図20(a) に示
す入力符号列の場合では、6番目に入力する「260」
の符号code(260)に対応する参照番号「260」
は、この時点では辞書Dd に定義されていない。この場
合は、まず、ステップS19で、前回復元された符号co
de(257)に対応する文字列「bab」の第一文字
(FINchar)が出力された後、上記前回復元処理した
符号code(257)に対応する参照番号「257」に前
回復元した文字列「ba」の最初の一文字「b」を加え
た文字列「257b」を求め、この文字列に対し参照番
号「260」を付与し、この参照番号をINωにセット
する。そして、次に、ステップS16→S17の処理を
繰り返すことにより、「a」、「b」の順に1文字づつ
スタックする。そしてステップS18で、ポップアップ
操作により文字列「ab」を出力して、最終的に符号co
de(20)を「bab」の文字列に復元・出力すると
共に、上記文字列「257b」を参照番号「260」を
付与して辞書Dd に登録する(同図(b) 〜(e) 参照)。
Thus, for example, in the case of the input code string shown in FIG.
Reference number "260" corresponding to code (260) of
Are not defined in the dictionary Dd at this time. In this case, first, in step S19, the previously restored code co
After the first character (FINchar) of the character string “bab” corresponding to de (257) is output, the previously restored character string “ba” is added to the reference number “257” corresponding to the code code (257) previously restored. Is obtained by adding the first character "b" of ".", A reference number "260" is given to this character string, and this reference number is set to INω. Then, by repeating the processing of steps S16 → S17, the characters are stacked one by one in the order of “a” and “b”. In step S18, the character string "ab" is output by a pop-up operation, and finally the code
de (2 6 0) as well as restore and output the character string "bab", registered in the dictionary Dd by applying a reference number "260" of the character string "257b" (FIG. (b) ~ (e )).

【0042】以下、同様な処理を順次繰り返すことによ
り、図20(a) に示す入力符号列が同図(e) に示す文字
列に復元される。
Thereafter, by repeating the same processing sequentially, the input code string shown in FIG. 20A is restored to the character string shown in FIG.

【0043】[0043]

【発明が解決しようとする課題】上述したジブ・レンペ
ル符号化によるデータ圧縮は、他の方式に見られるよう
な対象データの統計的な性質や定常性を予め仮定して圧
縮を行う方法でなく、符号すると元の情報に完全に復元
されるという情報保存型のデータ圧縮方法であることか
ら、例えば文字コードや、プログラムのソースコードも
しくはブジェクトコードのように、完全な復元が要求さ
れるデータの圧縮に適している。
The data compression by the Jib-Lempel coding described above is not a method of performing compression by assuming in advance the statistical properties and stationarity of the target data as seen in other systems. Since it is an information-storing type data compression method that is completely restored to the original information when encoded, it is possible to use data that requires complete restoration, such as character codes, program source codes or object codes. Suitable for compression.

【0044】また、ジブ・レンペル符号は、任意の記号
列に直接適用できるので、画像データを、一定量のデー
タに分割して、そのデータを文字コード同様に扱えば、
画像データもジブ・レンペル符号化によって圧縮するこ
とができる。したがって、例えば文字コードと画像デー
タのように性質が異なる複数種類のデータが混在する情
報をジブ・レンペル符号化により圧縮することは可能で
ある。
Since the Jib-Lempel code can be directly applied to an arbitrary symbol string, if image data is divided into a certain amount of data and the data is handled in the same manner as a character code,
Image data can also be compressed by Jib-Lempel coding. Therefore, it is possible to compress information in which a plurality of types of data having different properties, such as a character code and image data, are mixed by Jib-Lempel coding.

【0045】しかし、従来のジブ・レンペル符号化によ
るデータ圧縮は、1個の辞書のみ用いて行っており、こ
の辞書を入力データを符号化しながら作成・更新してい
き、辞書の容量が一杯になると直ちに即クリア(初期
化)するか、または容量が一杯になった後、圧縮率が悪
化してきた場合にクリアして、再び辞書の登録を最初か
ら始めるという方法でデータの符号化を行っている。こ
のため、上記辞書の容量が小さいと入力データの局所的
な性質は促えられるものの、十分な学習が行えず入力デ
ータの圧縮率は余り上がらない。
However, the conventional data compression by Jib Lempel coding is performed using only one dictionary, and this dictionary is created and updated while encoding the input data, so that the capacity of the dictionary becomes full. Data is coded by clearing (initializing) immediately as soon as possible, or clearing when the compression rate has deteriorated after the capacity is full, and restarting the dictionary registration from the beginning. I have. For this reason, if the capacity of the dictionary is small, local characteristics of the input data can be promoted, but sufficient learning cannot be performed, and the compression ratio of the input data does not increase much.

【0046】一方、上記辞書の容量を余り大きくする
と、入力データの大局的な性質は促えられているものの
入力データの局所的な変化への対応が鈍くなり、この面
でデータ圧縮率が悪化するという問題があった。
On the other hand, if the capacity of the dictionary is too large, the general nature of the input data is promoted, but the response to local changes in the input data becomes slow, and the data compression ratio deteriorates in this aspect. There was a problem of doing.

【0047】本発明は、このような従来の問題的に鑑み
なされたものであり、登録容量が異なる複数の書き換え
可能な辞書を用いてジブ・レンペル符号化を行うことに
より、入力データの大局的な性質と局所的な変化に対応
した効率的なジブ・レンペル符号化を行い、ジブ・レン
ペル符号化によるデータ圧縮の圧縮率を向上させること
を目的とする。
The present invention has been made in view of such a conventional problem. By performing Jib-Lempel encoding using a plurality of rewritable dictionaries having different registration capacities, the general scope of input data can be improved. An object of the present invention is to perform efficient Jib-Lempel encoding corresponding to various characteristics and local changes, and to improve the data compression ratio by Jib-Lempel encoding.

【0048】[0048]

【課題を解決するための手段】図1は、本発明(第1の
発明)の原理図である。この第1の発明は、ジブ・レン
ペル符号を用いたユニバーサル符号化によりデータ圧縮
するデータ符号化方において、入力データがある特定の
一定区間にわたってジブ・レンペル符号化される毎に初
期設定が行われる第1の辞書1と、前記入力データの連
続する複数の前記一定区間にわたるジブ・レンペル符号
化過程で生成される辞書データを全て登録できる第2の
辞書2と、入力されるデータを前記第1の辞書1を用い
てジブ・レンペル符号化すると共に、このジブ・レンペ
ル符号化過程で生ずる新たな辞書データを前記第1の辞
書1に登録する第1の符号化手段3と、該第1の符号化
手段1に入力されるデータを前記第2の辞書2を用いて
ジブ・レンペル符号化すると共に、このジブ・レンペル
符号化過程で生ずる新たな辞書データを前記第2の辞書
2に登録する第2の符号化手段4と、前記一定区間毎
に、前記第1の符号化手段3により得られたジブ・レン
ペル符号列と前記第2の符号化手段4により得られたジ
ブ・レンペル符号列のデータ量を比較し、データ量が少
ない方のジブ・レンペル符号列をこの符号化に用いられ
た辞書を示すフラグと共に出力する圧縮データ出力手段
5と、を備えたことを特徴とする。
FIG. 1 is a principle diagram of the present invention (first invention). According to the first invention, in a data encoding method for compressing data by universal encoding using a Jib Lempel code, an initial setting is performed every time input data is Jib Lempel encoded over a certain specific section. A first dictionary 1; a second dictionary 2 capable of registering all dictionary data generated in a Jib-Lempel encoding process over a plurality of continuous sections of the input data; A first encoding means 3 for performing Jib-Lempel encoding using the dictionary 1 and registering new dictionary data generated in the Jib-Lempel encoding process in the first dictionary 1; The data input to the encoding means 1 is subjected to Jib-Lempel encoding using the second dictionary 2, and new dictionary data generated in this Jib-Lempel encoding process is A second encoding unit 4 to be registered in the second dictionary 2, a jib-Lempel code string obtained by the first encoding unit 3 and the second encoding unit 4 for each of the predetermined sections. Compressed data output means 5 for comparing the data amount of the obtained Jib-Lempel code sequence and outputting the smaller data amount of the Jib-Lempel code sequence together with a flag indicating the dictionary used for this encoding. It is characterized by having.

【0049】上記第1の発明において前記一定区間は、
例えば、請求項2記載のように前記第1の辞書1が初期
設定されてから前記第2の符号化手段4がジブ・レンペ
ル符号化したデータ数が「0」からある特定の個数にな
るまでの期間であるように定義してもよい。
In the first aspect, the certain section is
For example, after the first dictionary 1 is initialized as described in claim 2, the number of data subjected to the Jib-Lempel encoding by the second encoding unit 4 becomes from "0" to a specific number. May be defined as the period.

【0050】また、さらには、前記一定区間は、例え
ば、請求項3記載のように、前記第1の辞書1が初期設
定されてから、その登録容量が一杯になるまでの期間で
あるように定義してもよい。
Further, the fixed section may be, for example, a period from when the first dictionary 1 is initialized to when its registered capacity becomes full, as described in claim 3. May be defined.

【0051】また、さらに、前記一定区間は、例えば請
求項4記載のように、前記第1の辞書1の登録容量が一
杯になってから、前記第1の符号手段3から出力される
ジブ・レンペル符号列の入力データに対する圧縮率があ
る下限値まで低下するまでの期間であるように定義して
もよい。
Further, the fixed section is provided with a jib output from the first encoding means 3 after the registered capacity of the first dictionary 1 becomes full, for example. It may be defined as a period until the compression ratio of the input data of the Lempel code string decreases to a certain lower limit.

【0052】さらに、前記一定区間は、例えば、請求項
5記載のように、第1の符号化手段3と第2の符号化手
段4が1個のジブ・レンペル符号を出力する期間である
ように設定してもよい。
Further, the fixed section may be, for example, a period during which the first encoding means 3 and the second encoding means 4 output one Jib-Lempel code. May be set.

【0053】そして、上記のような、各種構成におい
て、前記第1の符号化手段3と前記第2の符号化手段4
は、並行して同一入力データのジブ・レンペル符号化を
行うような構成にしてもよい。
In the various configurations as described above, the first encoding means 3 and the second encoding means 4
May be configured to perform Jib-Lempel encoding of the same input data in parallel.

【0054】次に図2は、もう1つの本発明(第2の発
明)の原理図である。この第2の発明は、上記第1の発
明のデータ符号化方式によってジブ・レンペル符号化さ
れた圧縮データを復元する復元方式であって、圧縮デー
タがある特定の一定区間にわたって復元される毎に初期
設定される第1の辞書11と、前記圧縮データの連続す
る複数の前記一定区間にわたって復元過程で生成される
辞書データを登録できる第2の辞書12と、前記フラグ
を参照して、復元すべき圧縮データの圧縮の際に用いら
れた辞書が、上記第1の発明の前記第1の辞書1または
前記第2の辞書2のいずれかであるかを判断して、第1
の辞書11または第2の辞書12のいずれか一方を選択
し、この辞書を用いて前記圧縮データを復元すると共
に、必要に応じて上記辞書にこの復元により得られた辞
書データを登録する復元手段13と、を備えたことを特
徴とする。
Next, FIG. 2 is a principle diagram of another present invention (second invention). The second invention is a decompression method for decompressing Jib-Lempel encoded data by the data encoding method of the first invention. The first dictionary 11 to be initialized, the second dictionary 12 capable of registering the dictionary data generated in the decompression process over the plurality of continuous sections of the compressed data, and the decompression with reference to the flag It is determined whether the dictionary used at the time of compressing the compressed data to be compressed is one of the first dictionary 1 or the second dictionary 2 of the first aspect of the present invention.
Restoring means for selecting either the dictionary 11 or the second dictionary 12 and restoring the compressed data using this dictionary and, if necessary, registering the dictionary data obtained by this restoration in the dictionary. 13 is provided.

【0055】この第2の発明は、上記構成において、例
えば、前記一定区間は、前記第1の辞書11が初期設定
されてから前記復元手段13により復元された復元デー
タのデータ長がある特定の値に等しくなるまでの期間で
あるように定義してもよい。
According to the second aspect of the present invention, in the above-mentioned configuration, for example, in the specific section, the data length of the restored data restored by the restoring unit 13 after the first dictionary 11 is initialized is a specific length. It may be defined to be a period until it becomes equal to the value.

【0056】また、さらに、前記一定区間は、例えば、
請求項9記載のように、前記第1の辞書11が初期設定
されてから、その登録容量が一杯になるまでの期間であ
るように定義してもよい。
Further, the certain section is, for example,
As described in claim 9, the period may be defined to be a period from when the first dictionary 11 is initialized to when its registered capacity becomes full.

【0057】また、さらには、前記一定区間は、例え
ば、請求項10記載のように前記復元手段13が1つの
ジブ・レンペル符号を入力してから、このジブ・レンペ
ル符号を復元するまでの期間であるように定義してもよ
い。
Further, for example, the fixed section is a period from when the restoration means 13 inputs one Jib Lempel code to when the restoration means 13 restores the Jib Lempel code. May be defined as

【0058】そして、上記各種構成において、前記復元
手段13は、前記第1の辞書12を用いた前記圧縮デー
タの復元と前記第2の辞書12を用いた前記圧縮データ
の復元を、並行して同時に行うような構成にしてもよ
い。
In the various configurations described above, the decompression means 13 performs the decompression of the compressed data using the first dictionary 12 and the decompression of the compressed data using the second dictionary 12 in parallel. It may be configured to be performed at the same time.

【0059】[0059]

【作用】まず、図1に示す第1の発明においては、例え
ば、第1の辞書1及び第2の辞書2に、予めアルファベ
ット、かな、英数字等の1文字が対応するジブ・レンペ
ル符号と、対応付けられて登録されている(初期設
定)。
First, in the first invention shown in FIG. 1, for example, a Jib-Lempel code in which one character such as an alphabet, a kana, or an alphanumeric character corresponds to the first dictionary 1 and the second dictionary 2 in advance. Are registered in association with each other (initial setting).

【0060】そして、データが入力されると、第1の符
号化手段3は第1の辞書1を、第2の符号化手段4は第
2の辞書2を参照して、その入力データに対応するジブ
・レンペル符号がそれぞれの辞書に登録されてあるか調
べる。そして、登録されてあれば、次のデータを入力
し、先の入力データに今度の入力データを加えた文字列
がそれぞれの辞書に登録されてあるか調べる。第1の符
号化手段1と第2の符号化手段2は、このような辞書
1,2の検索処理を、入力した文字列がそれぞれの辞書
に登録されていないことが分かるまで繰り返す。そし
て、第1の符号化手段1と第2の符号化手段2は、現在
までに入力した文字列がそれぞれの辞書1,2に登録さ
れていないことが分かると、前回までの入力文字列に対
応するジブ・レンペル符号を出力すると共に、今回まで
の入力文字列にまだ未使用のジブ・レンペル符号を割り
当て、それぞれの辞書1,2に登録すると共に、今度
は、今回入力した文字(最新の入力文字)を次にジブ・
レンペル符号化する文字列の先頭文字として、上述した
処理を繰り返す。
When the data is input, the first encoding means 3 refers to the first dictionary 1 and the second encoding means 4 refers to the second dictionary 2 to correspond to the input data. It is checked whether the Jib Lempel code to be registered is registered in each dictionary. If it has been registered, the next data is input, and it is checked whether a character string obtained by adding the input data to the previous input data is registered in each dictionary. The first encoding unit 1 and the second encoding unit 2 repeat such search processing of the dictionaries 1 and 2 until it is found that the input character string is not registered in each dictionary. When the first encoding unit 1 and the second encoding unit 2 find that the character string input so far is not registered in the respective dictionaries 1 and 2, the first encoding unit 1 and the second encoding unit 2 A corresponding Jib-Lempel code is output, an unused Jib-Lempel code is assigned to the input character string up to this time, and registered in each of the dictionaries 1 and 2. Input characters) then jib
The above processing is repeated as the first character of the character string to be Lempel encoded.

【0061】このような処理が、何度も繰り返される
と、第1及び第2の辞書1,2には、どんどん新たな文
字列が登録されてゆく。そして、やがて、容量が小さい
第1の辞書1の登録容量が一杯になる。
When such processing is repeated many times, new character strings are registered in the first and second dictionaries 1 and 2 more and more. Eventually, the registered capacity of the first dictionary 1 having a small capacity becomes full.

【0062】第1の辞書1がこのような状態になると、
第1符号化手段1は、所定のタインミングで、第1の辞
書1を、上述のように初期設定する。したがって、第1
の辞書1には、これから入力されるデータに対応する文
字列を再び登録されるようになる。
When the first dictionary 1 is in such a state,
The first encoding unit 1 initializes the first dictionary 1 at a predetermined timing as described above. Therefore, the first
The character string corresponding to the data to be input from now on is registered again in the dictionary 1.

【0063】一方、容量の大きい第2の辞書2には、最
初の入力データから最新の入力データまでの文字列の中
に現れる未登録がどんどん登録されていく。このため、
第2の辞書2には、入力データの大局的な性質を示す多
量の文字列がどんどん蓄積される。
On the other hand, in the second dictionary 2 having a large capacity, unregistered characters appearing in a character string from the first input data to the latest input data are registered more and more. For this reason,
In the second dictionary 2, a large number of character strings indicating the global properties of the input data are accumulated.

【0064】他方、第1の辞書1は、入力データの一定
区間毎に初期設定されて、新たな登録を開始するので、
登録される文字列は入力データの局所的な性質を反映し
たものとなる。したがって第1の辞書1は入力データの
性質(種類)の変化に対応し易く、入力データの性質が
変化した場合には、第1の辞書1を用いた方が第2の辞
書2を用いた場合よりも圧縮率が高くなる。
On the other hand, the first dictionary 1 is initialized for each fixed section of the input data and starts a new registration.
The registered character string reflects the local properties of the input data. Therefore, the first dictionary 1 can easily cope with a change in the property (type) of the input data. When the property of the input data changes, the first dictionary 1 uses the second dictionary 2. The compression ratio is higher than in the case.

【0065】このため、第1の符号化手段3と第2の符
号化手段4から出力される入力データの圧縮データ(ジ
ブ・レンペル符号列)のデータ量を、上記一定区間毎に
比較して、よりデータ量の少ない圧縮データを選択出力
することにより、データの圧縮率を従来よりも向上させ
ることができる。また、圧縮データ出力手段5は、上記
圧縮データの出力の際に、この圧縮データが第1の辞書
1または第2の辞書2のいずれの辞書を用いてジブ・レ
ンペル符号化されたものであるかを示すフラグも出力す
る。このことにより、圧縮データの復元側は、復元時に
どの辞書を用いればよいのか、復元前に知ることができ
るので、入力する圧縮データの復元を正しく行うことが
できる。
For this reason, the data amount of the compressed data (Jib-Lempel code string) of the input data output from the first encoding means 3 and the second encoding means 4 is compared for each of the above-mentioned fixed sections. By selectively outputting compressed data having a smaller data amount, the data compression ratio can be improved as compared with the conventional case. The compressed data output means 5 is such that, when outputting the compressed data, the compressed data is subjected to Jib-Lempel encoding using either the first dictionary 1 or the second dictionary 2. Also outputs a flag indicating whether or not. Thus, the decompression side of the compressed data can know which dictionary should be used at the time of decompression before the decompression, so that the input compressed data can be correctly decompressed.

【0066】次に、図2に示す上記第2の発明において
は、まず、第1の辞書11と第2の辞書12が、上記第
1の発明の辞書11,12と同様に初期設定される。こ
の初期設定が終了すると、復元手段13は上記第1の発
明により生成された圧縮データの復元を開始する。この
圧縮データは、(フラグ、圧縮データ)の複数の組の系
列から成り、復元手段13は、まずフラグを入力して、
続いて入力する圧縮データが第1の辞書1または第2の
辞書2のいずれの辞書を用いて圧縮されたものであるか
を判断し、第1の辞書1の場合には第1の辞書11を、
第2の辞書2の場合には第2の辞書12を参照して、以
後入力する圧縮データを前記一定区間単位で復元してい
く。また、復元手段13は、この復元過程において、上
記第1の発明の第1の符号化手段3及び第2の符号化手
段4と同様にして、第1の辞書1及び第2の辞書2に、
未登録の復元データをそのジブ・レンペル符号と対応付
けて登録していく。また、復元手段13は、上記第1の
発明の場合と同様に、一定区間のデータ復元が終了する
毎に第1の辞書11を初期設定する。したがって、この
第1の辞書11も、上記第1の発明の第1の辞書1と同
様にして、登録と初期設定が行われる。したがって、復
元手段3は、上記第1の発明から出力される圧縮データ
を正確に復元することができる。
Next, in the second invention shown in FIG. 2, first, the first dictionary 11 and the second dictionary 12 are initialized similarly to the dictionaries 11 and 12 of the first invention. . When this initialization is completed, the decompression means 13 starts decompression of the compressed data generated by the first invention. The compressed data is composed of a series of a plurality of sets of (flag, compressed data).
Then, it is determined whether the input compressed data is compressed using one of the first dictionary 1 and the second dictionary 2, and in the case of the first dictionary 1, the first dictionary 11 To
In the case of the second dictionary 2, with reference to the second dictionary 12, the compressed data to be input thereafter is restored in units of the fixed section. Further, in this restoration process, the restoration means 13 stores the first dictionary 1 and the second dictionary 2 in the same manner as the first encoding means 3 and the second encoding means 4 of the first invention. ,
The unregistered restored data is registered in association with the Jib-Lempel code. Further, the restoring unit 13 initializes the first dictionary 11 every time data restoration in a certain section is completed, as in the case of the first invention. Therefore, the first dictionary 11 is registered and initialized similarly to the first dictionary 1 of the first invention. Therefore, the decompression means 3 can correctly decompress the compressed data output from the first invention.

【0067】[0067]

【実施例】以下、図面を参照しながら、本発明の実施例
を説明する。図3は、本発明の一実施例のデータ符号化
システムの基本構成図である。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 3 is a basic configuration diagram of a data encoding system according to one embodiment of the present invention.

【0068】同図において、原データ110は、文字コ
ード、画像情報等の複数種類の情報が混在したデータで
あり、1つのファイルに格納されている。また、LZW
符号化A系120は、原データ110のLZW符号化を
行うLZW符号器Aと大局辞書121とから成り、原デ
ータ110の大局的な性質を大局辞書121により学習
しながら、LZW符号器Aにより上記原データ110の
LZW符号化を行う。大局辞書121は、十分に大きな
辞書容量を持つ書き換え可能な辞書であり、LZW符号
器Aによる上記原データ110のLZW符号化の過程
で、原データ110の大局的な性質が反映された辞書と
成る。
In the figure, original data 110 is data in which a plurality of types of information such as character codes and image information are mixed and stored in one file. Also, LZW
The encoding A system 120 includes an LZW encoder A for performing LZW encoding of the original data 110 and a global dictionary 121. The LZW encoder A learns the global properties of the original data 110 using the global dictionary 121. LZW encoding of the original data 110 is performed. The global dictionary 121 is a rewritable dictionary having a sufficiently large dictionary capacity. In the process of LZW encoding of the original data 110 by the LZW encoder A, a dictionary in which the global properties of the original data 110 are reflected. Become.

【0069】一方、LZW符号化B系130は、原デー
タ110のLZW符号化を行うLZW符号器Bと局所辞
書131から成り、原データ110の各部の性質の変化
(局所的な変化)を局所辞書131により把握・学習し
ながら、上記原データ110のLZW符号化を行う。局
所辞書131は、上記大局辞書121よりも小さな辞書
容量を持つ書き換え可能な辞書であり、LZW符号器B
による上記原データ110のLZW符号化の過程で、あ
る特定の入力データ数(以後、ブロックと表現する)単
位で、何度もクリア(初期設定)されながら新登録を繰
り返すことにより、原データ110の局所的な変化に対
応した辞書と成る。
On the other hand, the LZW encoding B system 130 is composed of an LZW encoder B for performing LZW encoding of the original data 110 and a local dictionary 131, and localizes changes (local changes) in the properties of each part of the original data 110. The LZW encoding of the original data 110 is performed while grasping and learning by the dictionary 131. The local dictionary 131 is a rewritable dictionary having a dictionary capacity smaller than that of the global dictionary 121, and is an LZW encoder B
In the process of LZW encoding of the original data 110, the new registration is repeated many times (initial setting) in units of a specific number of input data (hereinafter, referred to as a block), so that the original data 110 Becomes a dictionary corresponding to the local change of.

【0070】これらLZW符号化A系120とLZW符
号化B系130は、それぞれLZW符号器A、LZW符
号器Bにより原データ110のLZW符号化を上記ブロ
ック単位で並行して行い、それぞれのLZW符号化によ
り得られた上記原データ110の各ブロックの圧縮デー
タA、圧縮データBをそれぞれ、バッファA150、バ
ッファB160に格納する。圧縮率比較器10は、バ
ッファA150に格納されているLZW符号データのデ
ータ量とバッファB160に格納されているLZW符号
データのデータ量を基に、LZW符号器Aによる原デー
タ110の各ブロックのデータの圧縮率AとLZW符号
器Bによる原データ110の各ブロックのデータの圧縮
率Bを、同一ブロック同士で比較し、上記圧縮データA
と上記圧縮データBの内、圧縮率の高い方の圧縮データ
を選択する旨を選択信号aによりMPX(マルチプレク
サ)170に指示する。
The LZW encoding A system 120 and the LZW encoding B system 130 perform LZW encoding of the original data 110 in parallel by the LZW encoder A and the LZW encoder B on a block-by-block basis. The compressed data A and compressed data B of each block of the original data 110 obtained by the encoding are stored in the buffer A150 and the buffer B160, respectively. Compression ratio comparator 1 4 0, based on the data amount of the LZW code data stored in the LZW code data of the data amount and a buffer B160 stored in the buffer A150, each of the original data 110 according LZW encoder A The compression ratio A of the block data and the compression ratio B of the data of each block of the original data 110 by the LZW encoder B are compared between the same blocks, and the compressed data A
The selection signal a instructs the MPX (multiplexer) 170 to select the compressed data having the higher compression rate from the compressed data B.

【0071】MPX170は、上記圧縮率比較140
から加わる上記選択信号aの指示に従って、上記バッフ
ァA150または上記バッファB160のいずれか一方
に格納されているデータ量のより小さい方の圧縮データ
を選択出力する。
[0071] MPX170 is the compression ratio comparator 140
In accordance with the instruction of the selection signal a added from the above, the smaller compressed data stored in either the buffer A 150 or the buffer B 160 is selectively output.

【0072】MPX170は、上記圧縮データの選択出
力を、上記原データ110の各ブロック毎に行うので、
MPX170から出力される圧縮データは、離散した時
系列のデータとなる。また、MPX170は、圧縮デー
タを選択出力する際、その先頭に、上記圧縮データが大
局辞書121または局所辞書131のいずれの辞書を用
いて得られたものであるかを示す辞書フラグを付けて出
力する。
The MPX 170 performs the selective output of the compressed data for each block of the original data 110.
The compressed data output from the MPX 170 is discrete time-series data. Further, when the compressed data is selectively output, the MPX 170 adds a dictionary flag indicating which of the global dictionary 121 and the local dictionary 131 is used at the head of the compressed data to output the compressed data. I do.

【0073】このMPX170から出力される圧縮デー
タ系列180の構成を図4に示す。同図に示す(辞書フ
ラグ181,圧縮データ182)の組は、上記圧縮率
A,Bを比較する原データ110のLZW符号化のブロ
ック単位(符号化ブロック単位)で、MPX170から
出力される。
FIG. 4 shows the configuration of compressed data sequence 180 output from MPX 170. The set of (dictionary flag 181, compressed data 182) shown in the figure is output from the MPX 170 in LZW coding block units (coding block units) of the original data 110 for comparing the compression ratios A and B.

【0074】続いて、本発明の一実施例のデータ符号化
(データ圧縮)方式のアルゴリズムを図5のフローチャ
ートを参照しながら説明する。尚、この例では、LZW
符号化A系120のLZW符号器AとLZW符号化B系
0のLZW符号器Bは、共に不図示の入力カウンタ
を備えている。この入力カウンタは、入力データである
原データ110の符号化単位である1ブロックのデータ
数(例えば、100Kバイト)を計数するために使用さ
れる減算カウンタである。また、原データ110からの
データ入力は、1バイト単位で行い、この1バイトデー
タを文字コード以外のデータ(例えば、画像情報)であ
っても1文字として取り扱い、複数の文字から成る入力
データを文字列と表現する。
Next, an algorithm of a data encoding (data compression) system according to an embodiment of the present invention will be described with reference to a flowchart of FIG. In this example, LZW
Encoding A system 120 LZW coder A and LZW coding B system 1 3 0 of LZW coder B of has both an input counter (not shown). This input counter is a subtraction counter used to count the number of data in one block (for example, 100 Kbytes), which is a coding unit of the original data 110 as input data. The data input from the original data 110 is performed in units of 1 byte. Even if the 1-byte data is data other than the character code (for example, image information), it is treated as one character, and the input data including a plurality of characters is processed. Expressed as a character string.

【0075】まず、LZW符号器AとLZW符号器Bは
共に、それぞれの入力カウンタに、原データ110の符
号化単位である1ブロックのデータ数(ブロックサイ
ズ)を、初期値として設定する(ステップS701)。
First, both the LZW encoder A and the LZW encoder B set the number of data of one block (block size), which is the coding unit of the original data 110, as an initial value in each input counter (step S1). S701).

【0076】続いて、LZW符号器AとLZW符号器B
は、該当入力ファイルから原データ110の最初のデー
タを入力する(ステップS702)。次に、LZW符号
器AとLZW符号器Bは、上記入力データが上記該当入
力ファイルの終了を示す「EOF」(End of File) であ
るか否か判別し(ステップS703)、「EOF」であ
れば全ての原データ110のLZW符号化が終了したの
で、直ちに処理を終了するが、入力データが「EOF」
でなければ、入力カウンタを「1」デクリメントして
(ステップS704)、このデクリメントされた入力カ
ウンタの値が「0」(CT=0)になったか否か判別す
る(ステップS705)。このステップS705の判別
処理は、原データ110におけるある1ブロックの入力
データのLZW符号化が終了したか否かを判別する処理
である。
Subsequently, the LZW encoder A and the LZW encoder B
Inputs the first data of the original data 110 from the corresponding input file (step S702). Next, the LZW encoder A and the LZW encoder B determine whether or not the input data is “EOF” (End of File) indicating the end of the input file (step S703). If there is, the processing ends immediately because the LZW encoding of all the original data 110 is completed, but the input data is “EOF”
If not, the input counter is decremented by "1" (step S704), and it is determined whether or not the value of the decremented input counter has become "0" (CT = 0) (step S705). The determination process of step S705 is a process of determining whether or not LZW encoding of input data of a certain block in the original data 110 has been completed.

【0077】この判別で、CT=0でないときは、LZ
W符号器AとLZW符号器Bは、原データ110のある
1ブロックデータのLZW符号化がまだ終了していない
ものと判断し、上記ステップS70で入力されたデー
タのLZW符号化を同時に並行して開始する(S70
6)。
In this determination, if CT = 0 is not satisfied, LZ
W encoder A and LZW encoder B judges that the LZW encoding of one block data of the original data 110 is not yet finished at the same time in parallel LZW coding of data input in step S70 2 And start (S70
6).

【0078】この並列処理において、LZW符号器Aは
大局辞書121を用いて上記入力データのLZW符号化
を行い(ステップS707A)、LZW符号器Bは局所
辞書131を用いて上記入力データのLZW符号化を行
う(ステップS707B)。
In this parallel processing, the LZW encoder A performs LZW encoding on the input data using the global dictionary 121 (step S707A), and the LZW encoder B uses the local dictionary 131 to perform LZW encoding on the input data. (Step S707B).

【0079】そして、LZW符号器Aは、大局辞書Aに
上記入力データに対応するLZW符号が登録されていれ
ば(S708A,YES)、その入力データも加えた文
字列のLZW符号化を試みるため、再びステップS70
2に戻り、次のデータを入力する。
If the LZW code corresponding to the input data is registered in the global dictionary A (S708A, YES), the LZW encoder A attempts LZW encoding of the character string including the input data. Again at step S70
Return to step 2 and enter the next data.

【0080】したがって、LZW符号器Aは、上記ステ
ップS708Aで入力データ(1文字または文字列)が
大局辞書121に登録されていないと判断するまで、上
記ステップS702〜S706、ステップS707A〜
S709Aを繰り返す。
Therefore, the LZW encoder A determines that the input data (one character or character string) is not registered in the general dictionary 121 in the step S708A, and the steps S702 to S706 and the steps S707A to
S709A is repeated.

【0081】そして、LZW符号器Aは、上記ステップ
S708Aで、大局辞書121に今までに入力されたデ
ータ列(文字列)が登録されていないと判別すると(S
7081A,NO)、前回のステップS707Aで大局
辞書121から読み出したLZW符号をバッファA1
0に格納すると共に、今回のステップS707Aで大局
辞書121に登録されていないことが判明した入力デー
タ(一文字または文字列)に新たなLZW符号を割り当
て、これらの(入力データ,LZW符号)の組を上記入
力データをインデックスとして大局辞書121に登録し
た後(ステップS709A)、再びステップS702に
戻り上記該当入力ファイルから次にLZW符号化すべき
原データ110の新たなデータの入力を開始する。
When the LZW encoder A determines in step S708A that the data string (character string) input so far is not registered in the global dictionary 121 (step S708A).
7081A, NO), the buffer A1 5 the LZW code read from global dictionary 121 in the previous step S707A
0, and a new LZW code is assigned to the input data (one character or character string) found not to be registered in the global dictionary 121 in step S707A, and a set of these (input data, LZW code) is set. Is registered in the general dictionary 121 using the input data as an index (step S709A), and the process returns to step S702 again to start inputting new data of the original data 110 to be subjected to the next LZW encoding from the input file.

【0082】LZW符号器Aは、以上のような動作を、
前記ステップS705で入力カウンタ値が「0」、すな
わち原データの最初のブロックのLZW符号化が全て終
了したと判断するまで行って、原データ110の最初の
ブロックの全データをLZW符号化し、このLZW符号
化により得られた上記原データ110の最初のブロック
の全データの圧縮データA(LZW符号列)をバッファ
150に格納する。
The LZW encoder A performs the above operation,
In step S705, the process is performed until the input counter value is determined to be “0”, that is, it is determined that all LZW encoding of the first block of the original data is completed. The compressed data A (LZW code string) of all data of the first block of the original data 110 obtained by the LZW encoding is stored in the buffer A 150 .

【0083】一方、LZW符号器Bも、LZW符号器A
と並行に、局所辞書131を用いて上述したLZW符号
器Aと同様な処理を行い、原データ110の最初のブロ
ックの全データをLZW符号化し、このLZW符号化に
より得られた上記原データ110の最初のブロックの全
データの圧縮データBをバッファB160に格納する
(ステップS702〜S706,ステップS707B〜
S709B)。
On the other hand, LZW encoder B also has LZW encoder A
In parallel with the above, the same processing as in the above-described LZW encoder A is performed using the local dictionary 131, all data of the first block of the original data 110 are LZW-encoded, and the original data 110 obtained by this LZW encoding is obtained. Is stored in the buffer B160 (steps S702-S706, S707B-
S709B).

【0084】以上のようにして、LZW符号器AとLZ
W符号器Bが、並行処理により原データ110の最初の
ブロックのLZW符号化を終了すると(S705,YE
S)、圧縮率比較器140は、バッファA150に格納
されているLZW符号器Aにより生成された上記圧縮デ
ータAとバッファB160に格納されているLZW符号
器Bにより生成された上記圧縮データBの容量の大きさ
を比較し(ステップS710)、圧縮データAの容量が
圧縮データBの容量より小であれば(ステップS71
0,YES)、MPX170に対し、圧縮データAの方
を選択する旨を選択信号aにより指示する。
As described above, LZW encoder A and LZW encoder A
When the W encoder B completes LZW encoding of the first block of the original data 110 by parallel processing (S705, YE
S), the compression ratio comparator 140 compares the compressed data A generated by the LZW encoder A stored in the buffer A150 with the compressed data B generated by the LZW encoder B stored in the buffer B160. The sizes of the capacities are compared (step S710), and if the capacity of the compressed data A is smaller than the capacity of the compressed data B (step S71).
0, YES), and instructs the MPX 170 to select the compressed data A by the selection signal a.

【0085】MPX170は、この選択信号aを入力す
ると、まず大局辞書121を用いた圧縮データであるこ
とを示すフラグAを出力ファイルに出力した後(ステッ
プS712)、バッファA150に格納されている大局
辞書121を用いた圧縮データAを上記出力ファイルに
選択出力する(ステップS713)。
Upon receiving the selection signal a, the MPX 170 first outputs a flag A indicating that the data is compressed data using the general dictionary 121 to an output file (step S712), and then outputs the general data stored in the buffer A150. The compressed data A using the dictionary 121 is selectively output to the output file (step S713).

【0086】一方、圧縮率比較器140は、上記ステッ
プS710で、圧縮データBの容量が圧縮データA
以下であると判断すると(ステップS710,N
O)、MPX170に対し、圧縮データBの方を選択出
力する旨を選択信号aにより指示する。
[0086] On the other hand, the compression ratio comparator 140, at step S710, the capacity of the compressed data B is determined to be less than capacity <br/> amount of compressed data A (step S710, N
O), the selection signal a instructs the MPX 170 to selectively output the compressed data B.

【0087】MPX170は、この選択信号aを入力す
ると、まず局所辞書131を用いた圧縮データであるこ
とを示すフラグBを上記出力ファイルに出力した後(S
713)、バッファB160に格納されている局所辞書
131を用いて得られた圧縮データBを上記出力ファイ
ルに選択出力する(S714)。
Upon receiving the selection signal a, the MPX 170 first outputs a flag B indicating that the data is compressed data using the local dictionary 131 to the output file (S
713), the compressed data B obtained by using the local dictionary 131 stored in the buffer B 160 is selectively output to the output file (S714).

【0088】このようにして、(フラグ、圧縮データ)
の組から成る最初のブロックの圧縮データが出力され
る。以上の処理が、原データ110の第2ブロック以降
の各ブロックについてブロック単位で行われ、LZW符
号器A並びにLZW符号器Bが、上記該当入力ファイル
内の原データ110の全データについてLZW符号化に
よるデータ圧縮が終了したと判断すると(ステップS7
03,YES)、原データ110の全データのLZW符
号化を終了する。
Thus, (flag, compressed data)
Is output as compressed data of the first block consisting of The above processing is performed for each block after the second block of the original data 110 in units of blocks, and the LZW encoder A and the LZW encoder B perform LZW encoding on all data of the original data 110 in the input file. Is determined to be completed (step S7).
03, YES), the LZW encoding of all data of the original data 110 ends.

【0089】このようにして、原データの各ブロック毎
に大局辞書121を用いたLZW符号器Aによる圧縮デ
ータAと局所辞書131を用いたLZW符号器Bによる
圧縮データBの作成が並行して行われ、各ブロック毎に
圧縮データAまたは圧縮データBのいずれか一方の圧縮
率の高い方の圧縮データがその圧縮に用いられた辞書を
示すフラグ(フラグAまたはフラグB)と共に上記出力
ファイルに格納される。
As described above, for each block of the original data, the compressed data A by the LZW encoder A using the global dictionary 121 and the compressed data B by the LZW encoder B using the local dictionary 131 are created in parallel. For each block, the compressed data having the higher compression ratio of either the compressed data A or the compressed data B is stored in the output file together with a flag (flag A or flag B) indicating the dictionary used for the compression. Is stored.

【0090】したがって、原データ110を、各ブロッ
クのデータの性質に応じて各ブロック毎に最適なLZW
符号化を行い、原データ110を非常に高い圧縮率で効
率よく圧縮することができる。
Accordingly, the original data 110 is converted into an optimal LZW for each block according to the data properties of each block.
By encoding, the original data 110 can be efficiently compressed at a very high compression ratio.

【0091】尚、上記実施例では、バッファA150と
バッファB10に格納されている圧縮データA,Bの
容量を比較して圧縮率の優劣を判断するようにしている
が、LZW符号化A系120並びにLZW符号化B系1
30内に圧縮率を算出する手段を設け、この手段が、圧
縮率比較器160に対し直接に、圧縮データA,Bのそ
れぞれの圧縮率A,Bを出力するような構成にしてもよ
い。
[0091] In the above embodiment, compressed data A stored in the buffer A150 and the buffer B1 6 0, but by comparing the capacity of B so that to determine the relative merits of the compression ratio, LZW coding A System 120 and LZW coded B system 1
A means for calculating the compression ratio may be provided in the unit 30, and this means may be configured to directly output the compression ratios A and B of the compressed data A and B to the compression ratio comparator 160.

【0092】さらに、上記の場合には、多量の入力デー
タから成るブロック単位でデータ圧縮率の比較を行って
いるが、1回のLZW符号化毎に符号化された入力デー
タ列(検索一致文字列)のデータ長の比較を行い、デー
タ長の短い方のLZW符号を、逐次、圧縮データとして
出力していくような構成にしてもよい。
Further, in the above case, the data compression ratio is compared in units of blocks composed of a large amount of input data. However, the input data string (search matching character string) encoded for each LZW encoding is performed. The data length of each column may be compared, and the LZW code having the shorter data length may be sequentially output as compressed data.

【0093】図6は、上記データ符号化方式により原デ
ータ110をブロック単位でLZW符号化する際の大局
辞書121と局所辞書131の使用方法の一例を示す図
である。
FIG. 6 is a diagram showing an example of a method of using the global dictionary 121 and the local dictionary 131 when the original data 110 is subjected to LZW encoding in block units by the data encoding method.

【0094】同図(a)は、上記データ符号化方式によ
り原データ110をブロック単位でLZW符号化してい
く過程での大局辞書121と局所辞書131の登録個数
の変化を示す図であり、横軸がLZW符号化したデータ
数(入力データ数)に、縦軸が大局辞書121及び局所
辞書131の登録個数に対応している。また、縦軸のL
T ,LK の各目盛は、それぞれ、大局辞書121及び局
所辞書131の登録容量を示している。
FIG. 11A is a diagram showing a change in the number of registered general dictionaries 121 and local dictionaries 131 in the process of LZW-encoding the original data 110 in block units according to the data encoding method. the axis LZW encoded number of data (number of input data), and the vertical axis corresponds to the registration number of the global dictionary 121 and local dictionary 1 31. Also, L on the vertical axis
Each scale of T and L K indicates the registration capacity of the global dictionary 121 and the local dictionary 131, respectively.

【0095】また、同図(b)は、同図(a)と同じデ
ータ符号化過程における大局辞書121を用いた場合と
局所辞書131を用いた場合での、各ブロック毎のデー
タ圧縮率の比較を示す図であり、横軸が同図(a)と同
じ入力データ数、縦軸が各ブロックでのデータ圧縮率に
対応している。
FIG. 13B shows the data compression ratio of each block when the global dictionary 121 and the local dictionary 131 are used in the same data encoding process as in FIG. FIG. 7 is a diagram showing a comparison, in which the horizontal axis corresponds to the same number of input data as in FIG. 7A and the vertical axis corresponds to the data compression ratio in each block.

【0096】この図6に示す例では、LZW符号器B
は、局所辞書131への登録個数が各ブロックのLZW
符号化の途中で一杯になった場合には、辞書登録を直ち
に停止する。また、LZW符号器Bは、各ブロックのL
ZW符号化を開始する前に、たえず局所辞書131をク
リア(初期設定)する。
In the example shown in FIG. 6, the LZW encoder B
Indicates that the number of registrations in the local dictionary 131 is LZW of each block.
If it becomes full during encoding, dictionary registration is immediately stopped. Also, the LZW encoder B calculates the L of each block.
Before starting the ZW encoding, the local dictionary 131 is always cleared (initial setting).

【0097】この局所辞書131のクリアは、例えば、
一文字から成る全文字を初期の辞書情報として登録する
初期化処理である。同図に示すように、1ブロック目の
LZW符号化においては、局所辞書131と大局辞書1
21の登録情報は同一であり、しかも局所辞書131の
登録個数が原データ110の1ブロック目のLZW符号
化過程の途中で満杯になるため、1ブロック目の圧縮率
は、大局辞書121を用いて得られるLZW符号器Aの
出力する圧縮データAの方が、局所辞書131を用いて
られるLZW符号器Bの出力する圧縮データBより
も、少しばかり圧縮率が高くなる。
The local dictionary 131 can be cleared, for example, by
This is an initialization process for registering all characters consisting of one character as initial dictionary information. As shown in the figure, in the LZW encoding of the first block, the local dictionary 131 and the global dictionary 1
21 are the same, and the number of registrations in the local dictionary 131 becomes full during the LZW encoding process of the first block of the original data 110. Therefore, the compression ratio of the first block is determined by using the global dictionary 121. The compressed data A output from the LZW encoder A obtained by using the local dictionary 131
The compression ratio is slightly higher than the obtained compressed data B output from the LZW encoder B.

【0098】また、原データ110の2ブロック目及び
3ブロック目のLZW符号化では、大局辞書121を用
いて得られる圧縮データBの圧縮率の方が、局所辞書1
31を用いて得られる圧縮データAよりもさらに圧縮率
が高くなる。しかしながら、原データ110の4ブロッ
ク目のLZW符号化においては、入力データの性質が変
化したため、局所辞書131を用いて得られる圧縮デー
タBの方が大局辞書121を用いて得られる圧縮データ
Aよりも圧縮率が少しばかり高くなる。
In the LZW encoding of the second block and the third block of the original data 110, the compression rate of the compressed data B obtained by using the global dictionary 121 is larger than that of the local dictionary 1
The compression ratio is higher than that of the compressed data A obtained by using No. 31. However, in the LZW encoding of the fourth block of the original data 110, the nature of the input data has changed, so that the compressed data B obtained using the local dictionary 131 is better than the compressed data A obtained using the global dictionary 121. However, the compression ratio is slightly higher.

【0099】したがって、MPX170から出力される
圧縮データ系列は、(フラグA,圧縮データA1 ,フラ
グA,圧縮データA2 ,フラグA,圧縮データA3 ,フ
ラグB,圧縮データB4 ・・・)となる。尚、圧縮デー
タAおよび圧縮データBに付した添字i(i=1,2,
3,4,・・・)は、ブロックiの圧縮データを示す番
号である。
Therefore, the compressed data sequence output from the MPX 170 includes (flag A, compressed data A 1 , flag A, compressed data A 2 , flag A, compressed data A 3 , flag B, compressed data B 4 ... ). Note that a subscript i (i = 1, 2, 2) added to the compressed data A and the compressed data B
3, 4,...) Are numbers indicating the compressed data of the block i.

【0100】このように、図6に示す例では、局所辞書
131の登録個数を各ブロックのLZW符号化の後半で
登録容量が飽和してしまうような小容量に設定し、大局
辞書121の方の登録個数は、複数ブロックにまたがっ
てLZW符号化を行っても登録容量が飽和してしまわな
いような大容量に設定している。ここで、局所辞書13
1の登録容量がブロックのLZW符号化過程の途中で満
杯になった場合の他の対処方法を図7及び図9に示す。
As described above, in the example shown in FIG. 6, the number of registered local dictionaries 131 is set to such a small amount that the registered capacity is saturated in the latter half of LZW encoding of each block. Is set to a large capacity such that the registered capacity does not become saturated even when LZW encoding is performed over a plurality of blocks. Here, the local dictionary 13
FIGS. 7 and 9 show another method of coping with the case where the registered capacity of No. 1 becomes full during the LZW encoding process of the block.

【0101】図7に示す例では、局所辞書131への登
録が一杯になったらば(飽和したならば)、登録文字を
登録する分解成分の木(ツリー:tree)の最下位層
(最下位レベル)の成分及びそれらの成分に(節)に接
続している枝に付けられた文字(図8に示すレベルの場
合には、レベル3に属するX3 ,X9 ,X8 の各成分及
びそれらの成分に接続している枝に付けられた文字)を
削除する枝刈り削除処理または各登録文字の参照頻度を
基に参照回数の少ない登録文字から優先的に削除する処
理を行って、登録用の空スペースを確保し、この空スペ
ースに以後の新規の文字を登録するようにする。尚、分
解成分の木の構成については、前掲した宗像「Ziv−
Lempelのデータ圧縮法」の3.1入力列のインク
リメンタル分解に詳細に説明されている。
In the example shown in FIG. 7, when the registration in the local dictionary 131 is full (if it is saturated), the lowest level (lowest level) of the decomposition component tree (tree) for registering the registration character is registered. Level) and characters attached to the branches connected to the (section) (in the case of the level shown in FIG. 8, each component of X 3 , X 9 , X 8 belonging to level 3 and Pruning deletion processing to delete the characters attached to the branches connected to those components) or processing to preferentially delete the registered characters with a small number of references based on the reference frequency of each registered character, and register An empty space is reserved, and new characters are registered in the empty space. The structure of the decomposition component tree is described in the above-mentioned Munakata “Ziv-
This is described in detail in 3.1, Incremental Decomposition of Input Sequence, in Lempel's Data Compression Method.

【0102】一方、図9に示す例では、局所辞書131
の登録容量が一杯になったときには、LRU(Leastly
Recent Used)方式により、最も古く登録された文字列を
1つ削除して、その変わりに新規の文字列を登録するよ
うにする。
On the other hand, in the example shown in FIG.
LRU (Leastly)
According to the Recent Used method, one of the oldest registered character strings is deleted, and a new character string is registered instead.

【0103】さらに、図10に示す例は、局所辞書13
1が各ブロックのLZW符号化の過程で、決して登録容
量が一杯にならないように(飽和しないように)、局所
辞書131の登録容量を予め十分な大きさに確保してお
くものである。このようにした場合、LZW符号器Bの
データ圧縮率は、上記他の各方式局所辞書131よりも
大抵の場合高くなる。
Further, the example shown in FIG.
In the process of LZW encoding of each block, the registration capacity of the local dictionary 131 is ensured to be sufficiently large in advance so that the registration capacity does not become full (so as not to be saturated). In such a case, the data compression rate of the LZW encoder B is generally higher than that of each of the other system local dictionaries 131.

【0104】さらに、図11に示す例は、ブロックの途
中までしかLZW符号化が進行していない場合でも、局
所辞書131の登録容量が一杯になったら直ちに局所辞
書131をクリアし、その後新たな辞書登録を再開する
ものである。
Further, in the example shown in FIG. 11, even when LZW encoding has progressed only halfway through the block, the local dictionary 131 is cleared immediately when the registration capacity of the local dictionary 131 becomes full, and then a new local dictionary is cleared. This is to restart dictionary registration.

【0105】そして、さらに、図12に示す例は、局所
辞書131の登録容量が一杯になったならば(飽和した
ならば)新たな辞書登録を停止し、その後、データ圧縮
率を監視し続け、データ圧縮率が所定の基準値よりも低
くなったときにはデータ圧縮率が悪化したと判断し、こ
の時点で局所辞書131をクリアし、その後、再び辞書
登録を再開するものである。
Further, in the example shown in FIG. 12, when the registration capacity of the local dictionary 131 becomes full (saturated), the registration of a new dictionary is stopped, and thereafter, the data compression ratio is continuously monitored. When the data compression ratio becomes lower than a predetermined reference value, it is determined that the data compression ratio has deteriorated, the local dictionary 131 is cleared at this time, and then dictionary registration is restarted.

【0106】次に、上記データ符号化システムから出力
される図4に示す構成の圧縮データ系列182を元のデ
ータに復元するデータ復元システムの基本構成を図13
に示す。LZW復元化A系220は、登録容量の大きい
大局辞書221と、この大局辞書221を用いて圧縮デ
ータ182を復元するLZW復元器Aから成る。
Next, FIG. 13 shows a basic configuration of a data decompression system for decompressing the compressed data sequence 182 output from the data encoding system and having the configuration shown in FIG. 4 to original data.
Shown in The LZW decompression A system 220 includes a global dictionary 221 having a large registration capacity and an LZW decompressor A for decompressing the compressed data 182 using the global dictionary 221.

【0107】また、LZW復元化B系230は、登録容
量の小さな局所辞書231と、この局所辞書231を用
いて、圧縮データ12を復元するLZW復元器Bから
成る。
[0107] Further, LZW recovered of B system 230 includes a small local dictionary 231 registration capacity, using the local dictionary 231 consists LZW decompressor B for restoring the compressed data 1 8 2.

【0108】これらLZW復元化系220とLZW復元
化系230は、圧縮データ182の復元を同時に並行し
て行う。上記LZW復元器A並びに上記LZW復元器B
は、それぞれ大局辞書221、局所辞書231を用いて
復元した復元データA、復元データBをMPX(マルチ
プレクサ)250に出力する。
The LZW decompression system 220 and the LZW decompression system 230 simultaneously decompress the compressed data 182 . The LZW reconstructor A and the LZW reconstructor B
Is recovered data A restored respectively, using global dictionary 221, the local dictionary 23 1, and outputs the restored data B to the MPX (multiplexer) 250.

【0109】辞書フラグ判別器240は、圧縮データ系
列180の辞書フラグ181を入力し、この辞書フラグ
181により、現在、LZW復元化A系220とLZW
復元化B系230とで、並行して復元されている圧縮デ
ータ182の作成に用いられた辞書(大局辞書121ま
たは局所辞書131)を判断し、上記現在復元中の圧縮
データ182のLZW符号化に用いられた辞書を指示す
る選択信号dを上記MPX250に出力する。
The dictionary flag discriminator 240 receives the dictionary flag 181 of the compressed data sequence 180, and uses the dictionary flag 181 to determine whether the LZW reconstruction A system 220 and the LZW
The decompression B system 230 determines the dictionary (global dictionary 121 or local dictionary 131) used to create the compressed data 182 which is decompressed in parallel, and performs LZW encoding of the compressed data 182 currently being decompressed. Is output to the MPX 250 described above.

【0110】MPX250は、辞書フラグ判別器240
から入力する選択信号dの指示に応じて、大局辞書12
1が指示されていればLZW復元器Aから出力される復
元データAを、一方局所辞書131が指示されていれば
LZW復元器Bから出力される復元データBを選択出力
する。
The MPX 250 includes a dictionary flag discriminator 240
In accordance with the instruction of the selection signal d input from the
If the instruction 1 is designated, the restoration data A outputted from the LZW restoration unit A is selected, and if the local dictionary 131 is designated, the restoration data B outputted from the LZW restoration unit B is selectively outputted.

【0111】続いて、上記構成のデータ復元システムに
より行われる前記図3に示すデータ符号化システムから
出力される圧縮データ系列180(図4参照)の復元方
法を図14のフローチャートを参照しながら説明する。
Next, a method of decompressing the compressed data sequence 180 (see FIG. 4) output from the data encoding system shown in FIG. 3 performed by the data decompression system having the above configuration will be described with reference to the flowchart of FIG. I do.

【0112】まず、LZW復元器AとLZW復元器B
は、上記データ符号化システムにおける原データ110
の符号化のブロックサイズ(1ブロックのデータ数)を
それぞれが内蔵している入力カウンタに設定する(S8
01)。
First, the LZW decompressor A and the LZW decompressor B
Is the original data 110 in the data encoding system.
Is set in the input counter incorporated therein (S8).
01).

【0113】続いて、辞書フラグ判別器240は、ファ
イル(前記データ符号化システムにより生成された出力
ファイル)から圧縮データ182の先頭に付加された
ータ(第1入力データ)すなわち辞書フラグ181(図
4参照)を読み出す(ステップS802)。
Subsequently, the dictionary flag discriminator 240 outputs data (first input data) added from the file (the output file generated by the data encoding system) to the head of the compressed data 182. That is, the dictionary flag 181 (see FIG. 4) is read (step S802).

【0114】次に、LZW復元器AとLZW復元器B
は、同時に上記ファイルから辞書フラグ181に続く圧
縮データ182の最初のデータを入力し(ステップS8
03)、この入力データが上記ファイルの終了を示す
「EOF」(End of File)であるか否か判別する(ステ
ップS804)。
Next, the LZW decompressor A and the LZW decompressor B
Simultaneously inputs the first data of the compressed data 182 following the dictionary flag 181 from the file (step S8).
03), it is determined whether or not the input data is “EOF” (End of File) indicating the end of the file (step S804).

【0115】そして、LZW復元器AとLZW復元器B
が上記入力データが「EOF」でないと判別すると(ス
テップS804,NO)、辞書フラグ判別器240が上
記先に入力した辞書フラグ181により、上記入力デー
タが大局辞書121または局所辞書131のいずれの辞
書を用いてLZW符号化されたのか判断し、LZW符号
化に用いられた方の該当辞書を指示する選択信号dをM
PX250に出力する。この間、LZW復元器AとLZ
W復元器Bは、上記入力データの復元をそれぞれ大局辞
書221と局所辞書321を用いて並行して行い、それ
ぞれ復元データA,BとしてMPX250に出力する。
Then, the LZW decompressor A and the LZW decompressor B
Determines that the input data is not "EOF" (step S804, NO), the dictionary flag discriminator 240 determines whether the input data is the dictionary of the global dictionary 121 or the local dictionary 131 based on the dictionary flag 181 previously input. Is determined using LZW encoding, and a selection signal d indicating the corresponding dictionary used for LZW encoding is set to M
Output to PX250. During this time, the LZW decompressors A and LZ
The W restorer B restores the input data in parallel using the global dictionary 221 and the local dictionary 321, respectively, and outputs the restored data A and B to the MPX 250, respectively.

【0116】MPX250は上記辞書フラグ判別器24
0から加わる選択信号dに応じて、復元データAまたは
復元データBのいずれか一方の該当するデータを選択出
力する。ところで、LZW復元器AとLZW復元器B
は、復元データが、それぞれの辞書221、231に未
登録であった場合には、(この復元データ、この復元デ
ータに対応するLZW符号)の組をそれぞれ辞書22
1、231に登録する(以上、ステップS805)。
The MPX 250 has the dictionary flag discriminator 24.
According to the selection signal d added from 0, the corresponding data of the restored data A or the restored data B is selectively output. By the way, LZW decompressor A and LZW decompressor B
If the restored data has not been registered in the respective dictionaries 221 and 231, the set of (the restored data and the LZW code corresponding to the restored data) is stored in the dictionary 221, respectively.
1 and 231 (step S805).

【0117】続いて、LZW復元器AとLZW復元器B
は、それぞれ入力カウンタを復元データの文字数分だけ
デクリメントし、それぞれの上記入力カウンタに現在復
元中のブロック(現ブロック)の残りの復元データの文
字数をセットする(S807)。
Subsequently, the LZW decompressor A and the LZW decompressor B
Decrements the input counter by the number of characters of the restored data, and sets the number of characters of the remaining restored data of the block currently being restored (current block) to each of the input counters (S807).

【0118】そして、次にLZW復元器AとLZW復元
器Bは、それぞれの入力カウンタの値が「0」、すなわ
ち、現ブロックの復元が全て終了したか否かを判別する
(ステップS808)。
Then, the LZW decompressor A and the LZW decompressor B determine whether the value of each input counter is "0", that is, whether or not the restoration of the current block has been completed (step S808).

【0119】そして、LZW復元器AとLZW復元器B
は、それぞれの入力カウンタの値が「0」でなく、ま
だ、現ブロックの復元が未終了であると判断すると、
(ステップS808,NO)、再びステップS803に
戻って、前記ファイルから次のデータを入力し現ブロッ
クの残りのデータを復元する処理を繰り返す(ステップ
S803〜S808の繰り返し)。
Then, the LZW decompressor A and the LZW decompressor B
Determines that the value of each input counter is not “0” and that the restoration of the current block has not been completed yet,
(Step S808, NO), the process returns to step S803, and repeats the process of inputting the next data from the file and restoring the remaining data of the current block (repetition of steps S803 to S808).

【0120】そして、LZW復元器AとLZW復元器B
は、上記ステップS808で現ブロックの圧縮データ1
82の全てについてデータの復元が終了したと判断する
と(ステップS808,YES)、LZW復元器A,
B,辞書フラグ判別器240,及びMPX250が再び
上記ステップS801〜S808の処理を行い、LZW
復元器AとLZW復元器Bが上記ステップS804で上
記ファイルから「EOF」を読み出すまで前記ファイル
に格納されている次ブロック以降の残りの全てのブロッ
クの圧縮データを復元する。
Then, the LZW decompressor A and the LZW decompressor B
Is the compressed data 1 of the current block in step S808.
If it is determined that the data restoration has been completed for all of the 82 (step S808, YES), the LZW reconstructor A,
B, the dictionary flag discriminator 240, and the MPX 250 perform the processing of steps S801 to S808 again, and the LZW
Until the decompressor A and the LZW decompressor B read "EOF" from the file in step S804, the compressed data of all the remaining blocks after the next block stored in the file is decompressed.

【0121】そして、LZW復元器AとLXW復元器B
は上記ファイルに格納されている全ブロックの圧縮デー
タ182の復元が終了したと判断すると(ステップS8
04,YES)、圧縮データ182の復元処理を終了す
る。
Then, the LZW decompressor A and the LXW decompressor B
Determines that the decompression of the compressed data 182 of all blocks stored in the file is completed (step S8).
04, YES), the decompression process of the compressed data 182 ends.

【0122】このようにして、上述した前記図5のフロ
ーチャートに示すデータ符号化方式により、ブロック単
位でLZW符号化されて圧縮されたデータを、各ブロッ
クの圧縮データ182の先頭に付加された辞書フラグ1
81を参照しながら、ブロック単位で順次復元する。
In this manner, the data that is LZW-encoded and compressed in block units by the data encoding method shown in the flowchart of FIG. 5 described above is added to the dictionary added to the head of the compressed data 182 of each block. Flag 1
The image data is sequentially restored in block units with reference to 81.

【0123】[0123]

【発明の効果】請求項1及び請求項6記載の第1の発明
によれば、小容量の第1の辞書と大容量の第2の辞書の
容量が異なる2つの辞書を備え、小容量の第1の辞書は
入力データの一定区間毎に初期設定するので、第2の辞
書だけでは対応しにくい入力データの性質の局所的な変
化に対応した辞書情報を第1の辞書に登録でき、この結
果として、第の辞書により入力データの大局的な性質
に適応したLZW符号化を行えると共に、第1の辞書に
より入力データの局所的な性質に対応したLZW符号化
を行うことができるため、文字コードや白黒画像データ
など性質の異なる複数種類のデータが混在している入力
データを、全体的に従来のLZW符号化によるデータ圧
縮よりも高い圧縮でデータ圧縮することが可能になる。
According to the first aspect of the present invention, there are provided two dictionaries in which the capacity of the first dictionary having a small capacity and the capacity of the second dictionary having a large capacity are different from each other. Since the first dictionary is initially set for each fixed section of the input data, dictionary information corresponding to a local change in the property of the input data, which is difficult to handle with the second dictionary alone, can be registered in the first dictionary. as a result, the perform the LZW coding adapted to the global nature of the input data by the second dictionary, it is possible to perform the LZW coding corresponding to the local properties of the input data by the first dictionary, Input data in which a plurality of types of data having different properties such as character codes and black and white image data are mixed can be subjected to data compression at a higher compression than that of the conventional LZW encoding.

【0124】また、請求項7乃至請求項10記載の第2
の発明によれば上記第1の発明と同等の機能を有する第
1及び第2の辞書を備えているので、復元手段は、上記
第1の発明が各圧縮データに付加して出力する各圧縮デ
ータの作成に用いられた辞書を示すフラグを参照するこ
とにより、上記第1の発明により圧縮されたデータを、
該当する辞書を参照かつ更新・登録することにより元の
データに完全に復元することができる。
The second aspect of the present invention is the second aspect of the present invention.
According to the invention, since the first and second dictionaries having the same functions as those of the first invention are provided, the decompression means is provided for each compressed data which the first invention adds to each compressed data and outputs the compressed data. By referring to the flag indicating the dictionary used to create the data, the data compressed according to the first aspect can be
The original data can be completely restored by referring to, updating, and registering the corresponding dictionary.

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

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

【図2】本発明の原理図(その2)である。FIG. 2 is a principle diagram (part 2) of the present invention.

【図3】本発明の一実施例のデータ符号化システムの基
本構成図である。
FIG. 3 is a basic configuration diagram of a data encoding system according to an embodiment of the present invention.

【図4】本発明の圧縮データ系列の構成を説明する図で
ある。
FIG. 4 is a diagram illustrating a configuration of a compressed data sequence according to the present invention.

【図5】本発明のデータ符号化方式(データ圧縮方式)
の一実施例のアルゴリズムを説明するフローチャートで
ある。
FIG. 5 is a data encoding method (data compression method) of the present invention.
5 is a flowchart illustrating an algorithm according to one embodiment.

【図6】大局辞書と局所辞書の使用方法の第1の例を示
す図である。
FIG. 6 is a diagram illustrating a first example of a method of using a global dictionary and a local dictionary.

【図7】局所辞書の使用方法の他の例を示す図(その
1)である。
FIG. 7 is a diagram (part 1) illustrating another example of how to use the local dictionary.

【図8】登録文字を登録する分解成分の木の構成を示す
図である。
FIG. 8 is a diagram illustrating a configuration of a decomposition component tree for registering a registration character.

【図9】局所辞書の使用方法の他の例を示す図(その
2)である。
FIG. 9 is a diagram (part 2) illustrating another example of how to use the local dictionary.

【図10】局所辞書の使用方法の他の例を示す図(その
3)である。
FIG. 10 is a diagram (part 3) illustrating another example of how to use the local dictionary.

【図11】局所辞書の使用方法の他の例を示す図(その
4)である。
FIG. 11 is a diagram (part 4) illustrating another example of how to use the local dictionary.

【図12】局所辞書の使用方法の他の例を示す図(その
5)である。
FIG. 12 is a diagram (part 5) illustrating another example of how to use the local dictionary.

【図13】本発明の一実施例のデータ復元システムの基
本構成図である。
FIG. 13 is a basic configuration diagram of a data restoration system according to an embodiment of the present invention.

【図14】上記データ復元システムにより行われるデー
タ復元方式のアルゴリズムを説明するフローチャートで
ある。
FIG. 14 is a flowchart illustrating an algorithm of a data restoration method performed by the data restoration system.

【図15】ユニバーサル型ジブ・レンペル符号の符号化
の基本概念を説明する図である。
FIG. 15 is a diagram illustrating a basic concept of encoding of a universal type Jib Lempel code.

【図16】LZW符号化のアルゴリズムを説明するフロ
ーチャートである。
FIG. 16 is a flowchart illustrating an algorithm of LZW encoding.

【図17】LZW符号化に用いられる辞書の構成を説明
する図である。
FIG. 17 is a diagram illustrating a configuration of a dictionary used for LZW encoding.

【図18】LZW符号化方法を説明する模式図である。FIG. 18 is a schematic diagram illustrating an LZW encoding method.

【図19】LZW符号の復元アルゴリズムを説明するフ
ローチャートである。
FIG. 19 is a flowchart illustrating an algorithm for restoring an LZW code.

【図20】LZW符号の復元の一具体例を説明するため
の模式図である。
FIG. 20 is a schematic diagram for explaining a specific example of restoration of an LZW code.

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

1,11 第1の辞書 2,12 第2の辞書 3 第1の符号化手段 4 第2の符号化手段 5 圧縮データ出力手段 13 復元手段 1, 11 First dictionary 2, 12 Second dictionary 3 First encoding means 4 Second encoding means 5 Compressed data output means 13 Decompression means

───────────────────────────────────────────────────── フロントページの続き (72)発明者 千葉 広隆 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (56)参考文献 特開 平5−66917(JP,A) 特開 平4−43720(JP,A) 特開 平2−34038(JP,A) 特開 平1−158825(JP,A) 特開 昭62−209948(JP,A) 実開 平2−73876(JP,U) (58)調査した分野(Int.Cl.7,DB名) G06F 5/00 G06T 9/00 H03M 7/30 - 7/46 H04N 1/41 H04N 1/413 ────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Hirotaka Chiba 1015 Kamiodanaka, Nakahara-ku, Kawasaki City, Kanagawa Prefecture Inside Fujitsu Limited (56) References JP-A-5-66917 (JP, A) JP-A-4-43720 (JP, A) JP-A-2-34038 (JP, A) JP-A-1-158825 (JP, A) JP-A-62-209948 (JP, A) JP-A-2-73876 (JP, U) ( 58) Investigated field (Int.Cl. 7 , DB name) G06F 5/00 G06T 9/00 H03M 7/ 30-7/46 H04N 1/41 H04N 1/413

Claims (11)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 ジブ・レンペル符号を用いたユニバーサ
ル符号化によりデータ圧縮するデータ符号化方式におい
て、 入力データがある特定の一定区間にわたってジブ・レン
ペル符号化される毎に初期設定が行われる第1の辞書
(1)と、 前記入力データの連続する複数の前記一定区間にわたる
ジブ・レンペル符号化過程で生成される辞書データを全
て登録できる第2の辞書(2)と、 入力されるデータを前記第1の辞書(1)を用いてジブ
・レンペル符号化すると共に、このジブ・レンペル符号
化過程で生ずる新たな辞書データを前記第1の辞書
(1)に登録する第1の符号化手段(3)と、 該第1の符号化手段(1)に入力されるデータを前記第
2の辞書(2)を用いてジブ・レンペル符号化すると共
に、このジブ・レンペル符号化過程で生ずる新たな辞書
データを前記第2の辞書(2)に登録する第2の符号化
手段(4)と、 前記一定区間毎に、前記第1の符号化手段(3)により
得られたジブ・レンペル符号列と前記第2の符号化手段
(4)により得られたジブ・レンペル符号列のデータ量
を比較し、データ量が少ない方のジブ・レンペル符号列
をこの符号化に用いられた辞書を示すフラグと共に出力
する圧縮データ出力手段(5)と、 を備えたことを特徴とするデータ符号化方式。
In a data encoding method for compressing data by universal encoding using Jib-Lempel code, an initial setting is made each time input data is subjected to Jib-Lempel encoding over a specific fixed section. And a second dictionary (2) capable of registering all dictionary data generated in a Jib-Lempel encoding process over a plurality of continuous intervals of the input data. The first dictionary (1) performs Jib-Lempel encoding on the data to be processed, and new dictionary data generated in the Jib-Lempel encoding process is registered in the first dictionary (1). And Jib-Lempel encoding of data input to the first encoding means (1) using the second dictionary (2). Excessive Second encoding means (4) for registering new dictionary data generated in the process in the second dictionary (2), and the first encoding means (3) obtained for each of the predetermined sections. The data amount of the jib-Lempel code string obtained by the second encoding means (4) is compared with the data amount of the jib-Lempel code string, and the jib-Lempel code string with the smaller data amount is used for this encoding. And a compressed data output means (5) for outputting the compressed data together with a flag indicating the dictionary.
【請求項2】 前記一定区間は、前記第1の辞書(1)
が初期設定されてから前記第2の符号化手段(4)がジ
ブ・レンペル符号化したデータ数が「0」からある特定
の個数になるまでの期間であることを特徴とする請求項
1記載のデータ符号化方式。
2. The method according to claim 1, wherein the certain section includes the first dictionary.
2 is a period from the initial setting to the time when the number of data subjected to the Jib Lempel encoding by the second encoding means (4) becomes from “0” to a specific number. Data encoding method.
【請求項3】 前記一定区間は、前記第1の辞書(1)
が初期設定されてから、その登録容量が一杯になるまで
の期間とすることを特徴とする請求項1記載のデータ符
号化方式。
3. The method according to claim 1, wherein the certain section is the first dictionary.
2. The data encoding method according to claim 1, wherein the period is from the initial setting until the registered capacity becomes full.
【請求項4】 前記一定区間は、前記第1の辞書(1)
の登録容量が一杯になってから、前記第1の符号手段
(3)から出力されるジブ・レンペル符号列の入力デー
タに対する圧縮率がある下限値まで低下するまでの期間
であることを特徴とする請求項1記載のデータ符号化
式。
4. The method according to claim 1, wherein the certain section is the first dictionary.
Is a period from the time when the registered capacity becomes full to the time when the compression ratio for the input data of the Jib-Lempel code string output from the first encoding means (3) decreases to a certain lower limit value. The data encoding expression according to claim 1.
【請求項5】 前記一定区間は、第1の符号化手段
(3)と第2の符号化手段(4)が1個のジブ・レンペ
ル符号を出力する期間であることを特徴とする請求項1
記載のデータ符号化方式。
5. The fixed section is a period in which the first encoding means (3) and the second encoding means (4) output one Jib Lempel code. 1
The described data encoding method.
【請求項6】 前記第1の符号化手段(3)と前記第2
の符号化手段(4)は、並行して同一入力データのジブ
・レンペル符号化を行うことを特徴とする請求項1,
2,3,4または5記載のデータ符号化方式。
6. The first encoding means (3) and the second encoding means (3)
The encoding means (4) performs Jib-Lempel encoding of the same input data in parallel.
2. A data encoding method according to 2, 3, 4 or 5.
【請求項7】 請求項1記載のデータ符号化方式によっ
てジブ・レンペル符号化された圧縮データを復元するデ
ータ復元方式であって、 圧縮データがある特定の一定区間にわたって復元される
毎に初期設定される第1の辞書(11)と、 前記圧縮データの連続する複数の前記一定区間にわたる
復元過程で生成される辞書データを登録できる第2の辞
書(12)と、 前記フラグを参照して、復元すべき圧縮データの圧縮の
際に用いられた辞書が前記第1の辞書(1)または前記
第2の辞書(2)のいずれかであるかを判断して、前記
第1の辞書(11)または前記第2の辞書(12)のい
ずれか一方の辞書を選択し、この選択した辞書を用いて
前記圧縮データを復元すると共に、必要に応じて上記辞
書にこの復元により得られた辞書データを登録する復元
手段(13)と、 を備えたことを特徴とするデータ復元方式。
7. A data restoration method for restoring Jib-Lempel-encoded compressed data according to the data encoding method according to claim 1, wherein initialization is performed each time the compressed data is restored over a specific fixed section. A first dictionary (11) to be registered; a second dictionary (12) capable of registering dictionary data generated in a decompression process over a plurality of continuous sections of the compressed data; and the flag, It is determined whether the dictionary used for compressing the compressed data to be decompressed is either the first dictionary (1) or the second dictionary (2), and the first dictionary (11 ) Or the second dictionary (12) is selected, and the compressed data is restored using the selected dictionary, and the dictionary data obtained by this restoration is added to the dictionary if necessary. Climb Recording means (13) for recording data.
【請求項8】 前記一定区間は、前記第1の辞書(1
1)が初期設定されてから前記復元手段(13)により
復元された復元データのデータ長がある特定の値に等し
くなるまでの期間であることを特徴とする請求項7記載
のデータ復元方式。
8. The first dictionary (1)
8. The data restoration method according to claim 7, wherein 1) is a period from the initial setting to the time when the data length of the restoration data restored by the restoration means (13) becomes equal to a specific value.
【請求項9】 前記一定区間は、前記第1の辞書(1
1)が初期設定されてから、その登録容量が一杯になる
までの期間であることを特徴とする請求項7記載のデー
タ復元方式。
9. The first dictionary (1)
8. The data restoration method according to claim 7, wherein 1) is a period from the initial setting to the time when the registered capacity becomes full.
【請求項10】 前記一定区間は、前記復元手段(1
3)が1つのジブ・レンペル符号を入力してから、この
ジブ・レンペル符号を復元するまでの期間であることを
特徴とする請求項7記載のデータ復元方式。
10. The method according to claim 1, wherein the certain section is provided with the restoration means (1).
8. The data restoration method according to claim 7, wherein 3) is a period from inputting one Jib Lempel code to restoring the Jib Lempel code.
【請求項11】 前記復元手段(13)は、前記第1の
辞書(12)を用いた前記圧縮データの復元と前記第2
の辞書(12)を用いた前記圧縮データの復元を、並行
して同時に行うことを特徴とする請求項7,8,9,ま
たは10記載のデータ復元方式。
11. The decompression means (13) performs decompression of the compressed data using the first dictionary (12) and the second dictionary (12).
11. The data decompression method according to claim 7, wherein the decompression of the compressed data using the dictionary (12) is performed in parallel and simultaneously.
JP31957992A 1992-11-30 1992-11-30 Data encoding method and data restoration method Expired - Fee Related JP3231105B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP31957992A JP3231105B2 (en) 1992-11-30 1992-11-30 Data encoding method and data restoration method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31957992A JP3231105B2 (en) 1992-11-30 1992-11-30 Data encoding method and data restoration method

Publications (2)

Publication Number Publication Date
JPH06168096A JPH06168096A (en) 1994-06-14
JP3231105B2 true JP3231105B2 (en) 2001-11-19

Family

ID=18111845

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31957992A Expired - Fee Related JP3231105B2 (en) 1992-11-30 1992-11-30 Data encoding method and data restoration method

Country Status (1)

Country Link
JP (1) JP3231105B2 (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3277792B2 (en) * 1996-01-31 2002-04-22 株式会社日立製作所 Data compression method and apparatus
JP2002314821A (en) * 2001-04-18 2002-10-25 Ricoh Co Ltd Image compression method, image expansion method, image compression device, and image expansion device
US7206450B2 (en) * 2002-04-25 2007-04-17 Microsoft Corporation Compression of bi-level images with explicit representation of ink clusters
JP5082512B2 (en) * 2007-03-08 2012-11-28 富士ゼロックス株式会社 Information processing apparatus, image processing apparatus, image encoding apparatus, information processing program, image processing program, and image encoding program
JP4881237B2 (en) * 2007-06-29 2012-02-22 株式会社東芝 Screen transfer device and method, and program for image transfer
GB2453174B (en) * 2007-09-28 2011-12-07 Advanced Risc Mach Ltd Techniques for generating a trace stream for a data processing apparatus
WO2009057459A1 (en) 2007-10-30 2009-05-07 Nec Corporation Data compression method
JP2009188995A (en) * 2008-02-08 2009-08-20 Toshiba Corp Image processing apparatus and image processing method
JP4995775B2 (en) * 2008-06-30 2012-08-08 株式会社東芝 Screen transfer apparatus and method, and program for screen transfer
JP5413153B2 (en) * 2009-11-26 2014-02-12 富士通株式会社 Data compression apparatus, data expansion apparatus, data compression program, and data expansion program
JP5808361B2 (en) * 2013-04-08 2015-11-10 日本電信電話株式会社 String compression and decompression system and method
JP5808360B2 (en) * 2013-04-08 2015-11-10 日本電信電話株式会社 String compression and decompression system and method
JP6257221B2 (en) * 2013-08-26 2018-01-10 株式会社日立製作所 Communication apparatus and data transfer control method
CN115858476B (en) * 2022-12-27 2023-12-12 广东南方电力通信有限公司 Efficient storage method for acquiring data from custom forms in web development system

Also Published As

Publication number Publication date
JPH06168096A (en) 1994-06-14

Similar Documents

Publication Publication Date Title
JP3421700B2 (en) Data compression device and decompression device and method thereof
JP3273119B2 (en) Data compression / decompression device
JP3541930B2 (en) Encoding device and decoding device
JP3258552B2 (en) Data compression device and data decompression device
JP3231105B2 (en) Data encoding method and data restoration method
KR20000068018A (en) Data compression and decompression system with immediate dictionary updating interleaved with string search
JP3397431B2 (en) Data compression method and device and data decompression method and device
JPH0682370B2 (en) Character processor
JP3241788B2 (en) Data compression method
JP3350118B2 (en) Data encoding method and data restoration method
JP3241787B2 (en) Data compression method
JP3105598B2 (en) Data compression method using universal code
JPH06161705A (en) Data encoding system and data decoding system
JPH0628149A (en) Method for compressing plural kinds of data
JP3242795B2 (en) Data processing device and data processing method
CN117200805B (en) Compression and decompression method and device with low memory occupation of MCU
JPH05152971A (en) Data compressing/restoring method
JP2823917B2 (en) Data compression method
JP2799228B2 (en) Dictionary initialization method
JP3100206B2 (en) Data compression method
JP3051501B2 (en) Data compression method
JP2952067B2 (en) Data compression method
JP3056268B2 (en) Dictionary registration method for data compression / decompression
JPH0683574A (en) Data compression and restoring system
JP3083329B2 (en) Data compression / 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: 20010904

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

Free format text: PAYMENT UNTIL: 20080914

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20080914

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20090914

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090914

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20100914

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees