JPH07334344A - Data coding device - Google Patents

Data coding device

Info

Publication number
JPH07334344A
JPH07334344A JP12718394A JP12718394A JPH07334344A JP H07334344 A JPH07334344 A JP H07334344A JP 12718394 A JP12718394 A JP 12718394A JP 12718394 A JP12718394 A JP 12718394A JP H07334344 A JPH07334344 A JP H07334344A
Authority
JP
Japan
Prior art keywords
dictionary
data string
data
encoding
code
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.)
Pending
Application number
JP12718394A
Other languages
Japanese (ja)
Inventor
Hidetoshi Hayashida
秀敏 林田
Takeshi Kondo
健 近藤
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP12718394A priority Critical patent/JPH07334344A/en
Publication of JPH07334344A publication Critical patent/JPH07334344A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To simplify the procedure of processing and to deal with the change of appearance frequency by exchanging the order of a dictionary item, to which a code word shorter than a dictionary item corresponding to a source data string is assigned, each time a data string is coded. CONSTITUTION:The data string to be inputted is first transmitted through a control means 6 to an instruction means 4, and a prescribed data string is instructed to a dictionary means 3. At the dictionary means 3, the data strings stored in the dictionary items are retrieved, and a deciding means 5 decides whether or not the relevant data string exists. When the input data string exists at the dictionary item, that input data string is coded as it is while using the code word corresponding to it, and the dictionary is updated by exchanging the order between the dictionary item in the dictionary means 3 corresponding to that data string input and one of dictionary items in the means 3 to which the code word shorter than the former dictionary item is assigned. Thus, coding corresponding to the local data string appearance frequency is enabled.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はデータ圧縮アルゴリズム
に関し、ファイル・アーカイバや分散ファイル・システ
ム、データ通信、音声・画像通信、コンピュータ・ネッ
トワークなどに用いられる各種ファイルのサイズをファ
イル中のデータを利用して圧縮するデータ圧縮アルゴリ
ズムに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data compression algorithm, and uses the size of various files used in a file archiver, distributed file system, data communication, voice / image communication, computer network, etc. The present invention relates to a data compression algorithm for compressing and compressing.

【0002】[0002]

【従来の技術】従来から、メモリサイズの縮小やファイ
ル送受信の時間を短縮する目的で様々な原理のデータ圧
縮アルゴリズムが提案されている。最近ではLZ符号の
出現によって、文字列の1パス処理で済む性能の良い符
号の開発が計算機科学の分野で活発となっている。
2. Description of the Related Art Conventionally, data compression algorithms of various principles have been proposed for the purpose of reducing the memory size and the time for file transmission / reception. Recently, with the advent of LZ codes, the development of codes with good performance that requires only one-pass processing of character strings has become active in the field of computer science.

【0003】そのなかでも1パス処理によってハフマン
符号化を行う動的ハフマン符号化は処理時間と圧縮率の
点で優位性が高く、広く普及している。以下に動的ハフ
マン符号化につき説明する。
Among them, the dynamic Huffman coding which carries out the Huffman coding by the one-pass processing has a great advantage in terms of processing time and compression rate and is widely used. The dynamic Huffman coding will be described below.

【0004】従来の動的ハフマン符号化における動作の
フローチャートを図22、図23に示す。最初、符号木
は未出現データストリング(現在の符号化段階までに現
れていないデータストリング)に対応する葉だけを有す
る木となっている(ステップS501)。符号木に入力
データストリングに対応する葉があるかデータストリン
グの検索が行われる(ステップS502)。最初のデー
タストリングの符号化では未出現データストリングに対
応する葉だけを有する符号木を用いて符号化を行い、2
番目以降のデータストリングの符号化では、前回得られ
た符号木を用いて符号化を行う。入力データストリング
に対応する葉が符号木に存在するときは入力データスト
リングに対応する符号語を用いてそのまま符号化し(ス
テップS503)、入力データストリングに対応する葉
が符号木に存在しないときは新しいデータストリングの
出現を明示するため未出現データの符号語を送り(ステ
ップS504)、データストリングの適当な表現を送り
符号語とする(ステップS505)。そして各文字の生
起確率(未出現文字の出現頻度は常に1とする)を再計
算し(最初のデータストリングでは、文字の出現頻度を
1、未出現文字の出現頻度を1、総文字数を2として、
生起確率を計算)(ステップS506)、新しい符号木
をハフマン符号の構成アルゴリズムによって構成する
(ステップS507)。その後ファイルに処理をしてい
ないデータストリングがあるときはステップS502に
戻り、そうでないときは処理を終了する(ステップS5
08)。
22 and 23 are flowcharts of the operation in the conventional dynamic Huffman coding. Initially, the code tree is a tree that has only leaves corresponding to the non-appearing data strings (data strings that have not appeared until the current encoding stage) (step S501). The data string is searched to see if there is a leaf corresponding to the input data string in the code tree (step S502). In the encoding of the first data string, the encoding is performed using a code tree having only leaves corresponding to the non-appearing data string, and 2
In the encoding of the data string after the th, the encoding is performed using the previously obtained code tree. When the leaf corresponding to the input data string exists in the code tree, it is encoded as it is using the code word corresponding to the input data string (step S503). When the leaf corresponding to the input data string does not exist in the code tree, it is new. In order to clearly indicate the appearance of the data string, the code word of the non-appearing data is sent (step S504), and an appropriate expression of the data string is set as the send code word (step S505). Then, the occurrence probability of each character (the appearance frequency of the non-appearing character is always 1) is recalculated (in the first data string, the appearance frequency of the character is 1, the appearance frequency of the non-appearing character is 1, and the total number of characters is 2). As
The occurrence probability is calculated) (step S506), and a new code tree is constructed by the Huffman code construction algorithm (step S507). After that, if there is an unprocessed data string in the file, the process returns to step S502, and if not, the process ends (step S5).
08).

【0005】[0005]

【発明が解決しようとする課題】しかし上記従来のよう
に、データストリング入力ごとに生起確率を再計算し、
符号木を作りなおすのでは処理手続きが複雑になり、計
算量が増大する。また、符号木は以前に処理を行った全
データの生起確率にもとづいているため局所的なデータ
ストリング出現頻度を反映しにくいという問題点があっ
た。
However, as in the conventional method described above, the occurrence probability is recalculated for each data string input,
Recreating the code tree complicates the processing procedure and increases the amount of calculation. In addition, since the code tree is based on the occurrence probabilities of all the data processed previously, there is a problem that it is difficult to reflect the local data string appearance frequency.

【0006】本発明は上記従来の問題点を解決するため
になされたもので、処理手続きを簡素化し、局所的なデ
ータストリング出現頻度の変化に対応したデータ符号化
装置を提供することを目的としている。
The present invention has been made to solve the above-mentioned conventional problems, and an object thereof is to provide a data encoding apparatus which simplifies the processing procedure and copes with a local change in the appearance frequency of a data string. There is.

【0007】また、データストリングの符号化の度に符
号木を新しく構成し直す必要をなくし、未出現データの
発生を排除することにより処理手続きをさらに簡素化し
たデータ符号化装置を提供することを目的とする。
Further, it is possible to provide a data encoding device which further simplifies the processing procedure by eliminating the need to newly reconstruct the code tree each time the data string is encoded and eliminating the occurrence of non-appearing data. To aim.

【0008】さらに、辞書に記憶されたデータストリン
グの検索を容易にしたデータ符号化装置を提供すること
を目的とする。さらに、小数のデータストリングが高い
生起確率で出現する場合とそうでない場合のそれぞれに
ついて最適な符号化を行うデータ符号化装置を提供する
ことを目的とする。
It is another object of the present invention to provide a data encoding device that facilitates retrieval of data strings stored in a dictionary. It is another object of the present invention to provide a data encoding device that performs optimal encoding for a case where a small number of data strings appear with a high occurrence probability and a case where it does not occur.

【0009】さらに、符号語の極端な冗長化を防ぐデー
タ符号化装置を提供することを目的とする。さらに、辞
書に記憶されたデータストリングの更新をハードウェア
により実現するデータ符号化装置を提供することを目的
とする。
It is another object of the present invention to provide a data coding device which prevents extreme redundancy of codewords. Further, it is another object of the present invention to provide a data encoding device that implements updating of a data string stored in a dictionary by hardware.

【0010】[0010]

【課題を解決するための手段】以上の目的を達成するた
めに本発明のデータ符号化装置は、順次入力されるデー
タストリングを用いて辞書を構成する辞書手段と、前記
データストリングに対して符号化処理を行う符号化手段
と、前記辞書手段に対して所定のデータストリングを指
示する指示手段と、前記指示手段により指示された前記
所定のデータストリングが前記辞書手段に存在するか否
かを判定する判定手段と、前記辞書手段においてデータ
ストリング入力に対する辞書項とそれより短い符号語を
割り当てられている辞書項の一つとの順番を入れ替える
交換手段と、前記辞書手段、前記符号化手段、前記指示
手段、前記判定手段、前記交換手段の制御を行う制御手
段とを備え、順次入力されるデータストリングを1個符
号化するごとに原データストリングに対する辞書手段中
の辞書項と、それより短い符号語を割り当てられている
辞書手段中の辞書項の1つとの順番を入れ替えることに
より辞書の更新を行うようにしたもので、各データスト
リングの生起確率を計算しないことによって処理手続き
を簡素化し、計算量を減少させる構成とした。
In order to achieve the above object, the data coding apparatus of the present invention comprises a dictionary means for forming a dictionary using sequentially input data strings, and a code for the data strings. Encoding means for performing encoding processing, instructing means for instructing a predetermined data string to the dictionary means, and determining whether or not the predetermined data string instructed by the instructing means exists in the dictionary means Determining means, exchanging means for exchanging the order of the dictionary term for the data string input and one of the dictionary terms to which a shorter codeword is assigned in the dictionary means, the dictionary means, the encoding means, and the instruction. Means, the determining means, and a control means for controlling the exchanging means, and each time one sequentially input data string is encoded, the original data string is encoded. The dictionary is updated by exchanging the order of the dictionary terms in the dictionary means for the data string and one of the dictionary terms in the dictionary means to which a shorter codeword is assigned, and the dictionary is updated. By not calculating the occurrence probability, the processing procedure is simplified and the amount of calculation is reduced.

【0011】また、本発明のデータ符号化装置は、順次
入力されるデータストリングに対応する辞書を備える辞
書手段と、前記データストリングに対して符号化処理を
行う符号化手段と、前記辞書手段に対して所定のデータ
ストリングを指示する指示手段と、前記辞書手段におい
てデータストリング入力に対する辞書項とそれより短い
符号語を割り当てられている辞書項の一つとの順番を入
れ替える交換手段と、前記辞書手段、前記符号化手段、
前記指示手段、前記交換手段の制御を行う制御手段とを
備え、順次入力されるデータストリングを1個符号化す
るごとに原データストリングに対する辞書手段中の辞書
項と、それより短い符号語を割り当てられている辞書手
段中の辞書項の1つとの順番を入れ替えることにより辞
書の更新を行うようにしたもので、各データストリング
の生起確率の計算と符号木の再構成を行わないことによ
って処理手続を簡素化し、計算量を減少させる構成とし
た。
Further, the data coding apparatus of the present invention includes a dictionary means having a dictionary corresponding to sequentially input data strings, a coding means for coding the data strings, and the dictionary means. In contrast, an instructing means for instructing a predetermined data string, an exchanging means for exchanging the order of the dictionary term for the data string input and one of the dictionary terms to which a shorter codeword is assigned in the dictionary means, and the dictionary means. , The encoding means,
The instruction means and the control means for controlling the exchange means are provided, and a dictionary term in the dictionary means for the original data string and a code word shorter than that are assigned each time one data string input sequentially is encoded. The dictionary is updated by exchanging the order with one of the dictionary terms in the existing dictionary means, and the processing procedure is performed by not calculating the occurrence probability of each data string and reconstructing the code tree. Is simplified and the amount of calculation is reduced.

【0012】さらに、辞書手段は辞書項手段と辞書検索
手段を備え、指示手段が前記辞書手段の検索を行う際に
前記辞書検索手段を参照して前記辞書項手段の検索を行
うようにしたものである。
Further, the dictionary means comprises a dictionary term means and a dictionary search means, and when the instructing means searches the dictionary means, the dictionary means is referred to search the dictionary term means. Is.

【0013】さらに、符号化手段は複数の符号木を備
え、入力されるデータファイルに応じて使用する符号木
を変えるようにしたものである。さらに、符号化手段は
符号生成手段と冗長化防止手段を備え、前記冗長化防止
手段は符号生成手段が所定のビット数以上の符号語を発
生した場合、特定の符号を付加した原データストリング
を出力することにより符号語の冗長化を防ぐようにした
ものである。
Further, the encoding means is provided with a plurality of code trees, and the code tree to be used is changed according to the input data file. Further, the encoding means includes a code generation means and a redundancy prevention means, and the redundancy prevention means, when the code generation means generates a code word of a predetermined number of bits or more, outputs an original data string to which a specific code is added. The output prevents the codeword from becoming redundant.

【0014】さらに、符号化を4ビットで行うことによ
ってラッチにより辞書手段、辞書検索手段、交換手段を
構成し、テーブル更新をハードウェアを用いて行うよう
にしたものである。
Furthermore, by performing encoding with 4 bits, a dictionary means, a dictionary search means, and an exchange means are configured by a latch, and table updating is performed using hardware.

【0015】[0015]

【作用】以上の構成によって本発明のデータ圧縮アルゴ
リズムでは、順次入力されるデータストリングを1文字
符号化するごとに原データストリングに対する辞書手段
中の辞書項と、それより短い符号語を割り当てられてい
る前記辞書手段中の辞書項の1つとの順番を入れ替える
ことにより辞書の更新を行い、各データストリングの生
起確率を計算しないので、処理手続きを簡素化し、計算
量を減少させることができ、局所的なデータストリング
出現頻度に対応した符号化を行うことができる。
With the above structure, in the data compression algorithm of the present invention, a dictionary term in the dictionary means for the original data string and a code word shorter than that are assigned each time one character string of the sequentially input data string is encoded. The dictionary is updated by replacing the order with one of the dictionary terms in the existing dictionary means, and the occurrence probability of each data string is not calculated, so that the processing procedure can be simplified and the calculation amount can be reduced. It is possible to perform encoding corresponding to the frequency of occurrence of a typical data string.

【0016】また、辞書手段は入力される全てのデータ
ストリングに対応する辞書を備えたものであり、符号化
手段中の符号木は辞書手段中の辞書の初期値に対応する
葉を有する木となっており、符号化の過程を通じて変化
することはないものであると、データストリングの符号
化の度に符号木を新しく構成し直す必要がなくなり、未
出現データの発生を排除することもできるので処理手続
きをさらに簡素化することができる。
Further, the dictionary means is provided with a dictionary corresponding to all the input data strings, and the code tree in the encoding means is a tree having leaves corresponding to the initial value of the dictionary in the dictionary means. Since it does not change during the encoding process, there is no need to reconstruct the code tree each time the data string is encoded, and the occurrence of non-appearing data can be eliminated. The processing procedure can be further simplified.

【0017】さらに、辞書手段が辞書項手段と辞書検索
手段を備えたものであると、指示手段が前記辞書項手段
の検索を行う際に前記辞書項手段の先頭から検索してい
く必要がないため、容易に辞書手段の検索を行うことが
できる。
Further, when the dictionary means comprises the dictionary term means and the dictionary search means, it is not necessary for the instruction means to search from the head of the dictionary term means when searching the dictionary term means. Therefore, the dictionary means can be easily searched.

【0018】さらに、符号化手段が複数の符号木を備
え、入力されるデータファイルに応じて使用する符号木
を変えるものであると、少数のデータストリングが高い
生起確率で出現する場合とそうでない場合のそれぞれに
ついて最適な符号木を用いることができるので、入力フ
ァイルの種類に応じた最適な符号化を行うことができ
る。
Furthermore, if the encoding means has a plurality of code trees and changes the code tree to be used according to the input data file, the case where a small number of data strings appear with a high occurrence probability is not Since an optimal code tree can be used for each case, optimal encoding can be performed according to the type of input file.

【0019】さらに、符号化手段が符号生成手段と冗長
化防止手段を備え、前記冗長化防止手段は符号生成手段
が所定のビット数以上の符号語を発生した場合、特定の
符号を付加した原データストリングを出力するようにす
ると、原データストリングよりビット数の多い出力デー
タが発生するような符号語の冗長化を防ぐことができ
る。
Further, the encoding means includes a code generation means and a redundancy prevention means, and the redundancy prevention means adds an original code to which a specific code is added when the code generation means generates a code word of a predetermined number of bits or more. By outputting the data string, it is possible to prevent the redundancy of the code word, which would generate output data having more bits than the original data string.

【0020】さらに、符号化を4ビットで行い、ラッチ
により前記辞書項手段、前記辞書検索手段、前記交換手
段を構成し、辞書更新をハードウェアを用いて行うよう
にすると、動的符号化を行うために必要な辞書項手段、
辞書検索手段、交換手段の書き換え(読み出し、書き込
み)占有時間を短縮することができる。
Further, if the encoding is performed with 4 bits and the dictionary term means, the dictionary search means, and the exchanging means are configured by latches and the dictionary is updated by using hardware, dynamic encoding is performed. Dictionary term means needed to do,
Rewriting (reading, writing) occupancy time of the dictionary search means and the exchange means can be shortened.

【0021】[0021]

【実施例】【Example】

(実施例1)以下、本発明の第1の実施例について図1
〜図5を参照して説明する。
(Embodiment 1) Hereinafter, a first embodiment of the present invention will be described with reference to FIG.
~ It demonstrates with reference to FIG.

【0022】本実施例のデータ符号化装置1は図1に概
略構成を示しているように、順次入力されるデータスト
リングを用いて辞書を構成する辞書手段3と、前記デー
タストリングに対して符号化処理を行う符号化手段2
と、前記辞書手段3に対して所定のデータストリングを
指示する指示手段4と、前記指示手段4により指示され
た前記所定のデータストリングが前記辞書手段3に存在
するか否かを判定する判定手段5と、前記辞書手段3に
おいてデータストリング入力に対する辞書項とそれより
短い符号語を割り当てられている辞書項の一つとの順番
を入れ替える交換手段7と、前記辞書手段3、前記符号
化手段2、前記指示手段4、前記判定手段5、前記交換
手段7の制御を行う制御手段6とを備える。辞書手段3
は図2に概略構成を示しているように順次入力されるデ
ータストリングを用いた辞書を構成する辞書項手段8
と、辞書項の検索を行うための辞書検索手段9を備え
る。
As shown in the schematic configuration of FIG. 1, the data encoding device 1 of the present embodiment has a dictionary means 3 that forms a dictionary using sequentially input data strings, and a code for the data strings. Encoding means 2 for performing encoding processing
And an instructing means 4 for instructing the dictionary means 3 of a predetermined data string, and a judging means for judging whether or not the predetermined data string instructed by the instructing means 4 exists in the dictionary means 3. 5, exchange means 7 for exchanging the order of the dictionary term for the data string input in the dictionary means 3 and one of the dictionary terms to which a shorter codeword is assigned, the dictionary means 3, the encoding means 2, The control means 6 controls the instruction means 4, the determination means 5, and the exchange means 7. Dictionary means 3
Is a dictionary term means 8 which constitutes a dictionary using sequentially input data strings as shown in the schematic structure of FIG.
And a dictionary search means 9 for searching a dictionary term.

【0023】本実施例におけるデータ符号化装置の動作
を示すフローチャートを図3〜図5に示す。本実施例で
は、最初符号化手段2中の符号木は未出現データストリ
ング(現在の符号化階段までに現れていない文字)に対
応する葉だけを有する木となっている(ステップS10
1)。また、最初、辞書手段3中の辞書項手段8は未出
現データストリングに対応する辞書項のみを備えている
(ステップS102)。入力されるデータストリングは
まず制御手段6を通して指示手段4に送られ、辞書手段
3に所定のデータストリングが指示される(ステップS
103)。辞書手段3では、辞書項手段8に記憶されて
いるデータストリングと辞書検索手段9に記憶されてい
るデータが対応している。辞書手段3では辞書検索手段
9によって辞書項手段8に記憶されているデータストリ
ングの検索が行われ(ステップS104)、該当するデ
ータストリングが存在するか否かは判定手段5によって
判定される(ステップS105)。最初のデータストリ
ングの符号化では未出現データストリングに対応する葉
だけを有する符号木を用いて符号化を行い、2番目以降
のデータストリングの符号化では、前回得られた符号木
を用いて符号化を行う。
Flow charts showing the operation of the data encoding apparatus in this embodiment are shown in FIGS. In the present embodiment, the code tree in the first encoding means 2 is a tree having only leaves corresponding to the non-appearing data string (characters not appearing up to the current encoding step) (step S10).
1). Initially, the dictionary term means 8 in the dictionary means 3 is provided with only the dictionary term corresponding to the non-appearing data string (step S102). The data string to be input is first sent to the instructing means 4 through the control means 6, and the dictionary means 3 is instructed to the predetermined data string (step S).
103). In the dictionary means 3, the data strings stored in the dictionary entry means 8 correspond to the data stored in the dictionary search means 9. In the dictionary means 3, the dictionary searching means 9 searches the data string stored in the dictionary term means 8 (step S104), and the judging means 5 judges whether or not the corresponding data string exists (step S104). S105). The first data string is encoded using a code tree that has only leaves corresponding to the non-occurring data strings, and the second and subsequent data strings are encoded using the previously obtained code tree. To convert.

【0024】入力データストリングが辞書項に存在する
ときは入力データストリングに対応する符号語を用いて
そのまま符号化し(ステップS106)、そのデータス
トリング入力に対する辞書手段3中の辞書項とそれより
短い符号語を割り当てられている辞書手段3中の辞書項
の一つとの順番を入れ替えることにより辞書更新を行う
(ステップS107)。それから2つの辞書項に対応す
る辞書検索手段9のデータを入れ替えることにより辞書
検索手段9の更新を行う(ステップS108)。
When the input data string exists in the dictionary term, the code word corresponding to the input data string is used for encoding as it is (step S106), and the dictionary term in the dictionary means 3 for the data string input and the shorter code. The dictionary is updated by exchanging the order with one of the dictionary terms in the dictionary means 3 to which the word is assigned (step S107). Then, the dictionary search means 9 is updated by replacing the data of the dictionary search means 9 corresponding to the two dictionary terms (step S108).

【0025】入力データストリングが辞書項に存在しな
いときは未出現データの符号語(ステップS109)の
後にデータストリングの適当な表現を並べたものを符号
語とする(ステップS110)。そのあとデータストリ
ングは制御手段6を通して辞書手段3および符号化手段
2に送られ、辞書手段3中の辞書項に記憶され(ステッ
プS111)、辞書検索手段9に対応するデータを記録
する(ステップS112)。
When the input data string does not exist in the dictionary term, the code word is the code word of the non-appearing data (step S109) followed by an appropriate expression of the data string (step S110). After that, the data string is sent to the dictionary means 3 and the encoding means 2 through the control means 6, stored in the dictionary term in the dictionary means 3 (step S111), and the data corresponding to the dictionary search means 9 is recorded (step S112). ).

【0026】それから符号化手段2によって新しい符号
木を構成する(ステップS113)。符号木の構成アル
ゴリズムはハフマン符号の構成アルゴリズムと同じもの
とする。その後ファイルに処理をしていないデータスト
リングがあるときはステップS103に戻り、そうでな
いときは処理を終了する(ステップS114)。
Then, the coding means 2 constructs a new code tree (step S113). The algorithm for constructing the code tree is the same as the algorithm for constructing the Huffman code. After that, if there is an unprocessed data string in the file, the process returns to step S103, and if not, the process ends (step S114).

【0027】これによって、データストリングの符号化
の度に生起確率を計算し直す必要がなくなるので処理手
続きを簡素化し、計算量を減少させることができるし、
局所的なデータストリング出現頻度に対応した符号化を
行うことができる。また辞書手段3は辞書項手段8と辞
書検索手段9を備え、辞書検索手段9を参照して辞書項
手段8の検索を行うため符号化の際に辞書項の先頭から
検索していく必要がなく、処理手続きを簡素化し計算量
を減少させることができる。
This eliminates the need to recalculate the occurrence probability each time the data string is encoded, so that the processing procedure can be simplified and the amount of calculation can be reduced.
It is possible to perform encoding corresponding to the local data string appearance frequency. Further, the dictionary means 3 comprises a dictionary term means 8 and a dictionary search means 9, and since the dictionary term means 8 is searched by referring to the dictionary search means 9, it is necessary to search from the beginning of the dictionary term at the time of encoding. In addition, the processing procedure can be simplified and the calculation amount can be reduced.

【0028】(実施例2)以下、本発明の第2の実施例
について図6〜図9を参照して説明する。本実施例のデ
ータ符号化装置1は図6に概略構成を示しているよう
に、順次入力されるデータストリングに対応する辞書を
備える辞書手段3と、前記データストリングに対して符
号化処理を行う符号化手段2と、前記辞書手段3に対し
て所定のデータストリングを指示する指示手段4と、前
記指示手段3においてデータストリング入力に対する辞
書項とそれより短い符号語を割り当てられている辞書項
の一つとの順番を入れ替える交換手段7と、前記辞書手
段3、前記符号化手段2、前記指示手段4、前記交換手
段7の制御を行う制御手段6とを備える。辞書手段3は
図7に概略構成を示しているように順次入力されるデー
タストリングに対応する辞書を構成する辞書項手段8
と、辞書項の検索を行うための辞書検索手段9を備え
る。
(Second Embodiment) A second embodiment of the present invention will be described below with reference to FIGS. As shown in the schematic configuration of FIG. 6, the data encoding apparatus 1 of the present embodiment performs dictionary processing on a dictionary means 3 having a dictionary corresponding to sequentially input data strings and an encoding process on the data strings. The encoding means 2, the instructing means 4 for instructing the dictionary means 3 of a predetermined data string, the dictionary term for the data string input in the instructing means 3 and the dictionary terms to which shorter code words are assigned. An exchanging means 7 for exchanging the order with one, a dictionary means 3, the encoding means 2, the instructing means 4, and a control means 6 for controlling the exchanging means 7 are provided. The dictionary means 3 has a dictionary term means 8 which forms a dictionary corresponding to the data strings sequentially input as shown in the schematic structure of FIG.
And a dictionary search means 9 for searching a dictionary term.

【0029】本実施例におけるデータ符号化装置の動作
を示すフローチャートを図8〜図9に示す。本実施例で
は、符号化手段2中の符号木は辞書手段3中の辞書項手
段8の初期値に対応する葉を有する木となっており(ス
テップS201)、符号化の過程を通じて変化すること
はない。また、辞書項手段8は入力される全データスト
リングに対応する辞書を最初から備えている(ステップ
S202)。入力されるデータストリングはまず制御手
段6を通して指示手段4に送られ、辞書手段3に所定の
データストリングが指示される(ステップS203)。
辞書手段3では、辞書項手段8に記憶されているデータ
ストリングと辞書検索手段9に記憶されているデータが
対応している。辞書手段3では辞書検索手段9によって
辞書項手段8に記憶されているデータストリングの検索
が行われる(ステップS204)。
Flowcharts showing the operation of the data encoding apparatus in this embodiment are shown in FIGS. In the present embodiment, the code tree in the encoding means 2 is a tree having leaves corresponding to the initial value of the dictionary term means 8 in the dictionary means 3 (step S201), and it changes during the encoding process. There is no. The dictionary entry means 8 is provided with a dictionary corresponding to all the input data strings from the beginning (step S202). The input data string is first sent to the instructing means 4 through the control means 6, and the dictionary means 3 is instructed to the predetermined data string (step S203).
In the dictionary means 3, the data strings stored in the dictionary entry means 8 correspond to the data stored in the dictionary search means 9. In the dictionary means 3, the dictionary retrieval means 9 retrieves the data string stored in the dictionary term means 8 (step S204).

【0030】入力データストリングは入力データストリ
ングに対応する符号語を用いて符号化され(ステップS
205)。そのデータストリング入力に対する辞書項手
段8中のデータとそれより短い符号語を割り当てられて
いる辞書項手段8中のデータの一つとの順番を入れ替え
ることにより辞書更新を行う(ステップS206)。そ
れから2つの辞書項手段8中のデータに対応する辞書検
索手段9のデータを入れ替えることにより辞書検索手段
9の更新を行う(ステップS207)。その後ファイル
に処理をしていないデータストリングがあるときはステ
ップS203に戻り、そうでないときは処理を終了する
(ステップS208)。
The input data string is encoded using the codeword corresponding to the input data string (step S
205). The dictionary is updated by exchanging the order of the data in the dictionary entry means 8 with respect to the data string input and one of the data in the dictionary entry means 8 to which a shorter codeword is assigned (step S206). Then, the dictionary search means 9 is updated by replacing the data of the dictionary search means 9 corresponding to the data in the two dictionary term means 8 (step S207). After that, if there is an unprocessed data string in the file, the process returns to step S203, and if not, the process ends (step S208).

【0031】これによって、データストリングの符号化
の度に生起確率を計算し直す必要がなくなるので処理手
続きを簡素化し、計算量を減少させることができるし、
局所的なデータストリング出現頻度に対応した符号化を
行うことができる。また辞書手段3は辞書項手段8と辞
書検索手段9を備え、辞書検索手段9を参照して辞書項
手段8の検索を行うため符号化の際に辞書項の先頭から
検索していく必要がなく、処理手続きを簡素化し計算量
を減少させることができる。また、データストリングの
符号化の度に符号木を新しく構成し直す必要がなくな
り、未出現データの発生を排除することができるので処
理手続きをさらに簡素化することができる。
This eliminates the need to recalculate the occurrence probability each time the data string is encoded, so that the processing procedure can be simplified and the amount of calculation can be reduced.
It is possible to perform encoding corresponding to the local data string appearance frequency. Further, the dictionary means 3 comprises a dictionary term means 8 and a dictionary search means 9, and since the dictionary term means 8 is searched by referring to the dictionary search means 9, it is necessary to search from the beginning of the dictionary term at the time of encoding. In addition, the processing procedure can be simplified and the calculation amount can be reduced. Further, it is not necessary to reconstruct the code tree every time the data string is encoded, and the occurrence of non-appearing data can be eliminated, so that the processing procedure can be further simplified.

【0032】(実施例3)また、本発明の第3の実施例
について図10〜図15を参照して説明する。第1、第
2の実施例とは符号化手段2が異なっているだけである
ので、この点について詳述し、重視する説明は省略す
る。
(Embodiment 3) A third embodiment of the present invention will be described with reference to FIGS. Since only the encoding means 2 is different from the first and second embodiments, this point will be described in detail, and the explanation with emphasis will be omitted.

【0033】本実施例の符号化装置2は図10に概略構
成を示しているようにデータストリング生起確率密集型
符号木10とデータストリング生起確率離散型符号木1
1の複数の符号木を備える。
The coding apparatus 2 of this embodiment has a data string occurrence probability dense code tree 10 and a data string occurrence probability discrete code tree 1 as shown in the schematic configuration of FIG.
It comprises a plurality of one code trees.

【0034】本実施例のデータ符号化装置の動作を示す
フローチャートを図11〜15に示す。符号化手段2は
最初所定量のデータストリングを符号化するまでは(ス
テップS301)、データストリング生起確率密集型符
号木10を用いる(ステップS302)。符号化を行っ
たデータストリングが所定量に達していればそれまでに
生成した符号語の符号長の合計を求める(ステップS3
03)。生成した符号語の符号長の合計が所定のしきい
値以下であれば後のデータストリングの符号化にデータ
ストリング生起確率密集型符号木10を用い(ステップ
S304)、生成した符号語の符号長の合計が所定のし
きい値以上であれば後のデータストリングの符号化にデ
ータストリング生起確率離散型符号木11を用いる(ス
テップS305)。
11 to 15 are flow charts showing the operation of the data encoding apparatus of this embodiment. The coding means 2 uses the data string occurrence probability dense type coding tree 10 until the coding of a predetermined amount of data strings (step S301) at first (step S302). If the encoded data string has reached a predetermined amount, the sum of the code lengths of the code words generated up to that point is obtained (step S3).
03). If the total code length of the generated code words is less than or equal to a predetermined threshold value, the data string occurrence probability dense type code tree 10 is used for the subsequent coding of the data string (step S304), and the code length of the generated code word is used. Is greater than or equal to a predetermined threshold value, the data string occurrence probability discrete code tree 11 is used for subsequent encoding of the data string (step S305).

【0035】ここで、データストリング生起確率密集型
符号木10はハフマン符号の構成アルゴリズムによって
構成することも符号木型を用いることもでき、生起確率
の高いデータストリングに対して短い符号を与え、生起
確率の低いデータストリングに対して長い符号を与える
ようにすることによって出現回数の高いデータストリン
グの圧縮率を高め、効果的な符号化を行うことができ
る。データストリング生起確率離散型符号木11もアル
ゴリズムによって構成することも符号木型を用いること
もでき、データストリングの生起確率が変化しても符号
長の変化が小さくなるような符号木を構成することによ
って符号長の長い符号の出現を減らすことができ、効果
的な符号化を行うことができる。これによって、少数の
データストリングが高い生起確率で出現する場合とそう
でない場合のそれぞれについて最適な符号木を用いるこ
とができるので、入力ファイルの種類に応じた最適な符
号化を行うことができる。
Here, the data string occurrence probability dense type code tree 10 can be constructed by a Huffman code construction algorithm or a code tree type can be used. A short code is given to a data string having a high occurrence probability, By giving a long code to a data string having a low probability, the compression rate of a data string having a high frequency of occurrence can be increased and effective coding can be performed. The data string occurrence probability discrete type code tree 11 can be configured by an algorithm or a code tree type, and a code tree that reduces the change in code length even if the occurrence probability of the data string changes is configured. With this, it is possible to reduce the appearance of a code having a long code length and perform effective coding. This makes it possible to use the optimum code tree for each of the case where a small number of data strings appear with a high occurrence probability and the case where such a case does not occur, so that the optimum encoding according to the type of the input file can be performed.

【0036】(実施例4)以下、本発明の第4の実施例
について図16〜図20を参照して説明する。第1〜第
3の実施例とは符号化手段2が異なっているだけである
ので、この点について詳述し、重複する説明は省略す
る。
(Embodiment 4) A fourth embodiment of the present invention will be described below with reference to FIGS. Since only the encoding means 2 is different from the first to third embodiments, this point will be described in detail and redundant description will be omitted.

【0037】本実施例における符号化手段2は図16に
概略構成を示すように符号生成手段12と冗長化防止手
段13を備え、冗長化防止手段13は符号生成手段12
が所定のビット数以上の符号語を発生した場合、特定の
符号を付加した原データストリングを出力する。
The coding means 2 in this embodiment comprises a code generation means 12 and a redundancy prevention means 13 as shown in the schematic configuration of FIG.
Generates a code word with a predetermined number of bits or more, the original data string with a specific code added is output.

【0038】本実施例におけるデータ符号化装置の動作
を示すフローチャートを図17〜図20に示す。たとえ
ば、8ビットのデータストリングを符号化する場合、冗
長化防止手段13が起動する符号長のしきい値を8ビッ
トとする。符号化手段2はまず符号生成手段12による
符号化を行い(ステップS401)、符号長が定められ
たしきい値を越えているか判断を行う(ステップS40
2)。8ヒット以上の符号長をもつ符号語が発生した場
合、冗長符号語の符号語を送り(しきい値以上の符号長
をもつ符号語の発生を明示)(ステップS403)、入
力されたデータストリングに何の処理も加えずに出力す
る(ステップS404)。8ビット未満の符号長をもつ
符号語が発生した場合には冗長化防止手段13は起動せ
ず通常の符号化を実施する(ステップS405)。これ
によって、原データストリングよりビット数の多い出力
データが発生するような符号語の冗長化を防ぐことがで
きる。
17 to 20 are flow charts showing the operation of the data encoding apparatus in this embodiment. For example, when an 8-bit data string is encoded, the threshold value of the code length activated by the redundancy prevention unit 13 is set to 8 bits. The coding means 2 first performs coding by the code generation means 12 (step S401), and judges whether the code length exceeds a predetermined threshold value (step S40).
2). When a codeword having a code length of 8 hits or more occurs, a codeword of a redundant codeword is sent (the occurrence of a codeword having a code length of a threshold value or more is clearly indicated) (step S403), and the input data string Is output without any processing (step S404). When a code word having a code length of less than 8 bits is generated, the redundancy prevention means 13 is not activated and normal coding is performed (step S405). As a result, it is possible to prevent the redundancy of the code word, which would generate output data having more bits than the original data string.

【0039】(実施例5)以下、本発明の第5の実施例
について図21を参照して説明する。本実施例における
符号化アルゴリズムは第1〜第4の実施例と同じであ
る。
(Fifth Embodiment) A fifth embodiment of the present invention will be described below with reference to FIG. The encoding algorithm in this embodiment is the same as in the first to fourth embodiments.

【0040】本実施例では4ビットのデータストリング
に対して符号化を行うことによって辞書手段16および
交換手段20をラッチによって構成し、ハードウェアに
よって辞書の更新を行う。交換手段20は辞書項手段交
換手段23(アドレスラッチにより構成)と辞書検索手
段交換手段24(アドレスラッチにより構成)を備え
る。辞書手段16中の辞書項手段21、辞書検索手段2
2はラッチによって構成する。辞書項手段交換手段23
によって辞書項手段21の書き換えを行い、辞書検索手
段交換手段24によって辞書検索手段22の交換を行
う。このことによって動的符号化を行うために必要な書
き換え(読み出し、書き込み)占有時間を短縮すること
ができる。また、ハードウェアにより符号化手段15、
指示手段17、交換手段18、制御手段19をそれぞれ
構成することによって、データ符号化装置14をハード
ウェア化することができる。
In this embodiment, the dictionary means 16 and the exchanging means 20 are constituted by latches by encoding a 4-bit data string, and the dictionary is updated by hardware. The exchanging means 20 comprises a dictionary term exchanging means exchanging means 23 (constituted by an address latch) and a dictionary retrieval means exchanging means 24 (constituted by an address latch). Dictionary term means 21 and dictionary search means 2 in the dictionary means 16
2 is constituted by a latch. Dictionary term exchange means 23
The dictionary term means 21 is rewritten by the, and the dictionary search means 22 is replaced by the dictionary search means exchanging means 24. As a result, the rewriting (reading, writing) occupancy time required for performing dynamic encoding can be shortened. Also, the encoding means 15 is provided by hardware.
By configuring the instruction means 17, the exchange means 18, and the control means 19, respectively, the data encoding device 14 can be implemented as hardware.

【0041】[0041]

【発明の効果】以上のように、本発明のデータ圧縮アル
ゴリズムでは、順次入力されるデータストリングを1文
字符号化するごとに原データストリングに対する辞書項
と、それより短い符号語を割り当てられている辞書項の
1つとの順番を入れ替えることにより辞書の更新を行
い、各データストリングの生起確率を計算しないので処
理手続きを簡素化し、計算量を減少させることができる
し、局所的なデータストリング出現頻度に対応した符号
化を行うことができる。
As described above, in the data compression algorithm of the present invention, a dictionary term for an original data string and a code word shorter than that are assigned every time one character string of a sequentially input data string is encoded. The dictionary is updated by exchanging the order with one of the dictionary terms, and since the occurrence probability of each data string is not calculated, the processing procedure can be simplified, the amount of calculation can be reduced, and the frequency of occurrence of local data strings Can be encoded.

【0042】また、辞書は入力される全てのデータスト
リングに対応する辞書項を備えたものであり、符号木は
辞書の初期値に対応する葉を有しており、符号化の過程
を通じて変化することはないものであると、データスト
リングの符号化の度に符号木を新しく構成し直す必要が
なくなり、未出現データの発生を排除することもできる
ので処理手続をさらに簡素化することができる。
The dictionary has dictionary terms corresponding to all the input data strings, and the code tree has leaves corresponding to the initial values of the dictionary, and changes through the encoding process. If there is nothing, it is not necessary to reconstruct the code tree each time the data string is encoded, and it is possible to eliminate the occurrence of non-appearing data, so that the processing procedure can be further simplified.

【0043】さらに、辞書の検索を行う際に辞書検索テ
ーブルを用いて辞書項検索を行うようにすると、辞書検
索の度ごとに辞書項の先頭から検索していく必要がない
ため容易に辞書の検索を行うことができる。
Further, when the dictionary search is performed using the dictionary search table when searching the dictionary, it is not necessary to search from the beginning of the dictionary for each dictionary search, so that the dictionary can be easily searched. You can search.

【0044】さらに、複数の符号木が存在し、入力され
るデータストリングに応じて使用する符号木を変えるよ
うにすると、少数のデータストリングが高い生起確率で
出現する場合とそうでない場合のそれぞれについて最適
な符号木を用いることができるので、入力ファイルの種
類に応じて最適な符号化を行うことができる。
Furthermore, if there are a plurality of code trees and the code tree to be used is changed according to the input data string, the case where a small number of data strings appear with a high occurrence probability and the case where they do not occur occur respectively. Since the optimal code tree can be used, optimal encoding can be performed according to the type of input file.

【0045】さらに、所定のビット数以上の符号語が発
生した場合には特定の符号を付加した原データストリン
グを出力するようにすると、原データストリングよりビ
ット数の多い出力データが発生するような符号語の冗長
化を防ぐことができる。
Further, when a code word having a predetermined number of bits or more is generated, if an original data string to which a specific code is added is output, output data having more bits than the original data string is generated. Codeword redundancy can be prevented.

【0046】さらに、符号化を4ビットに限定し、ラッ
チにより辞書、辞書検索テーブルを構成し、辞書更新、
辞書検索テーブル更新をハードウェアを用いて行うよう
にすると、動的符号化を行うために必要な辞書、辞書検
索テーブルの書き換え(読み出し、書き込み)占有時間
を短縮することができる。
Further, the encoding is limited to 4 bits, the dictionary and the dictionary search table are constructed by the latch, and the dictionary update,
If the dictionary search table is updated using hardware, it is possible to reduce the time required to rewrite (read, write) the dictionary and the dictionary search table required for performing dynamic encoding.

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

【図1】本発明の第1の実施例のデータ符号化装置を示
す概略構成図である。
FIG. 1 is a schematic configuration diagram showing a data encoding device according to a first embodiment of the present invention.

【図2】本発明の第1の実施例のデータ符号化装置にお
ける辞書手段の概略構成図である。
FIG. 2 is a schematic configuration diagram of a dictionary means in the data encoding device according to the first embodiment of the present invention.

【図3】本発明の第1の実施例のデータ符号化装置の動
作を示すフローチャートである。
FIG. 3 is a flowchart showing an operation of the data encoding device according to the first embodiment of the present invention.

【図4】本発明の第1の実施例のデータ符号化装置の動
作を示すフローチャートである。
FIG. 4 is a flowchart showing an operation of the data encoding device according to the first embodiment of the present invention.

【図5】本発明の第1の実施例のデータ符号化装置の動
作を示すフローチャートである。
FIG. 5 is a flowchart showing the operation of the data encoding device according to the first embodiment of the present invention.

【図6】本発明の第2の実施例のデータ符号化装置を示
す概略構成図である。
FIG. 6 is a schematic configuration diagram showing a data encoding device according to a second embodiment of the present invention.

【図7】本発明の第2の実施例のデータ符号化装置にお
ける辞書手段の概略構成図である。
FIG. 7 is a schematic configuration diagram of dictionary means in the data encoding device according to the second embodiment of the present invention.

【図8】本発明の第2の実施例のデータ符号化装置の動
作を示すフローチャートである。
FIG. 8 is a flowchart showing an operation of the data encoding device according to the second embodiment of the present invention.

【図9】本発明の第2の実施例のデータ符号化装置の動
作を示すフローチャートである。
FIG. 9 is a flowchart showing the operation of the data encoding device according to the second embodiment of the present invention.

【図10】本発明の第3の実施例のデータ符号化装置に
おける符号化手段の概略構成図である。
FIG. 10 is a schematic configuration diagram of a coding means in a data coding apparatus according to a third embodiment of the present invention.

【図11】本発明の第3の実施例のデータ符号化装置の
動作を示すフローチャートである。
FIG. 11 is a flowchart showing an operation of the data encoding device according to the third embodiment of the present invention.

【図12】本発明の第3の実施例のデータ符号化装置の
動作を示すフローチャートである。
FIG. 12 is a flowchart showing an operation of the data encoding device according to the third embodiment of the present invention.

【図13】本発明の第3の実施例のデータ符号化装置の
動作を示すフローチャートである。
FIG. 13 is a flowchart showing the operation of the data encoding device according to the third embodiment of the present invention.

【図14】本発明の第3の実施例のデータ符号化装置の
動作を示すフローチャートである。
FIG. 14 is a flowchart showing an operation of the data encoding device according to the third embodiment of the present invention.

【図15】本発明の第3の実施例のデータ符号化装置の
動作を示すフローチャートである。
FIG. 15 is a flowchart showing an operation of the data encoding device according to the third embodiment of the present invention.

【図16】本発明の第4の実施例のデータ符号化装置に
おける符号化手段の概略構成図である。
FIG. 16 is a schematic configuration diagram of a coding means in a data coding apparatus according to a fourth embodiment of the present invention.

【図17】本発明の第4の実施例のデータ符号化装置の
動作を示すフローチャートである。
FIG. 17 is a flowchart showing an operation of the data encoding device according to the fourth embodiment of the present invention.

【図18】本発明の第4の実施例のデータ符号化装置の
動作を示すフローチャートである。
FIG. 18 is a flowchart showing an operation of the data encoding device according to the fourth embodiment of the present invention.

【図19】本発明の第4の実施例のデータ符号化装置の
動作を示すフローチャートである。
FIG. 19 is a flowchart showing an operation of the data encoding device according to the fourth embodiment of the present invention.

【図20】本発明の第4の実施例のデータ符号化装置の
動作を示すフローチャートである。
FIG. 20 is a flowchart showing an operation of the data encoding device according to the fourth embodiment of the present invention.

【図21】本発明の第5の実施例のデータ符号化装置の
概略構成図である。
FIG. 21 is a schematic configuration diagram of a data encoding device according to a fifth embodiment of the present invention.

【図22】従来の動的ハフマン手法を用いたデータ符号
化装置の動作を示すフローチャートである。
FIG. 22 is a flowchart showing the operation of a conventional data encoding device using the dynamic Huffman method.

【図23】従来の動的ハフマン手法を用いたデータ符号
化装置の動作を示すフローチャートである。
FIG. 23 is a flowchart showing the operation of a conventional data encoding device using the dynamic Huffman method.

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

1、14 データ符号化装置 2、15 符号化手段 3、16 辞書手段 4、17 指示手段 5、18 判定手段 6、19 制御手段 7、20 交換手段 8、21 辞書項手段 9、22 辞書検索手段 10 データストリング生起確率密集型符号木 11 データストリング生起確率離散型符号木 12 符号生成手段 13 冗長化防止手段 23 辞書項手段交換手段 24 辞書検索手段交換手段 1, 14 Data Encoding Device 2, 15 Encoding Means 3, 16 Dictionary Means 4, 17 Instructing Means 5, 18 Judging Means 6, 19 Control Means 7, 20 Exchange Means 8, 21 Dictionary Term Means 9, 22 Dictionary Search Means 10 Data String Occurrence Probability Dense Code Tree 11 Data String Occurrence Probability Discrete Code Tree 12 Code Generation Means 13 Redundancy Prevention Means 23 Dictionary Term Means Exchange Means 24 Dictionary Search Means Exchange Means

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 順次入力されるデータストリングを用い
て辞書を構成する辞書手段と、前記データストリングに
対して符号化処理を行う符号化手段と、前記辞書手段に
対して所定のデータストリングを支持する指示手段と、
前記指示手段により指示された前記所定のデータストリ
ングが前記辞書手段に存在するか否かを判定する判定手
段と、前記辞書手段においてデータストリング入力に対
する辞書項とそれより短い符号語を割り当てられている
辞書項の一つとの順番を入れ替える交換手段と、前記辞
書手段、前記符号化手段、前記指示手段、前記判定手
段、前記交換手段の制御を行う制御手段とを備え、順次
入力されるデータストリングを1個符号化するごとに原
データストリングに対する辞書手段中の辞書項と、それ
より短い符号語を割り当てられている辞書手段中の辞書
項の1つとの順番を入れ替えることにより辞書更新を行
うようにしたことを特徴とするデータ符号化装置。
1. A dictionary means for forming a dictionary using sequentially input data strings, an encoding means for performing an encoding process on the data strings, and a predetermined data string for the dictionary means. Instruction means to
Determination means for determining whether or not the predetermined data string instructed by the instructing means exists in the dictionary means, and a dictionary term for a data string input and a code word shorter than that are assigned in the dictionary means. An exchange means for changing the order of one of the dictionary terms, a dictionary means, the encoding means, the instructing means, the judging means, and a control means for controlling the exchange means are provided, and a data string to be sequentially input is provided. Each time one encoding is performed, the dictionary is updated by exchanging the order of the dictionary terms in the dictionary means for the original data string and one of the dictionary terms in the code means to which a shorter codeword is assigned. A data encoding device characterized by the above.
【請求項2】 順次入力されるデータストリングに対応
する辞書を備える辞書手段と、前記データストリングに
対して符号化処理を行う符号化手段と、前記辞書手段に
対して所定のデータストリングを指示する指示手段と、
前記辞書手段においてデータストリング入力に対する辞
書項とそれより短い符号語を割り当てられている辞書項
の一つとの順番を入れ替える交換手段と、前記辞書手
段、前記符号化手段、前記指示手段、前記交換手段の制
御を行う制御手段とを備え、順次入力されるデータスト
リングを1個符号化するごとに原データストリングに対
する辞書手段中の辞書項と、それより短い符号語を割り
当てられている辞書手段中の辞書項の1つとの順番を入
れ替えることにより辞書更新を行うようにしたことを特
徴とするデータ符号化装置。
2. A dictionary means having a dictionary corresponding to sequentially input data strings, an encoding means for performing an encoding process on the data strings, and an instruction of a predetermined data string to the dictionary means. Instruction means,
Exchange means for exchanging the order of the dictionary term for the data string input and one of the dictionary terms to which a shorter codeword is assigned in the dictionary means, the dictionary means, the encoding means, the instructing means, and the exchanging means. Of the dictionary means for the original data string and the dictionary means to which a shorter code word is assigned each time one data string that is sequentially input is encoded. A data encoding device characterized in that the dictionary is updated by changing the order of one of the dictionary terms.
【請求項3】 辞書手段は辞書検索手段を備え、指示手
段が前記辞書手段の検索を行う際前記辞書検索手段を参
照して前記辞書手段の検索を行うことを特徴とする請求
項1または2記載のデータ符号化装置。
3. The dictionary means comprises a dictionary search means, and when the instruction means searches the dictionary means, the dictionary means is referred to to search the dictionary means. The described data encoding device.
【請求項4】 符号化手段が複数の符号木を備え、入力
されるデータファイルに応じて使用する符号木を変える
ことを特徴とする請求項1〜3のいずれかに記載のデー
タ符号化装置。
4. The data encoding device according to claim 1, wherein the encoding means comprises a plurality of code trees, and the code tree to be used is changed according to an input data file. .
【請求項5】 符号化手段は冗長化防止手段を備え、前
記冗長化防止手段は所定のビット数以上の符号語が発生
した場合、特定の符号を付加した原データストリングを
出力することを特徴とする請求項1〜4のいずれかに記
載のデータ符号化装置。
5. The encoding means comprises a redundancy prevention means, and the redundancy prevention means outputs an original data string to which a specific code is added when a code word having a predetermined number of bits or more is generated. The data encoding device according to any one of claims 1 to 4.
【請求項6】 符号化を4ビットで行うことによってラ
ッチにより制御手段、辞書手段、辞書検索手段、指示手
段、交換手段を構成し、テーブル更新をハードウェアを
用いて行うようにした請求項1〜5のいずれかに記載の
データ符号化装置。
6. A control means, a dictionary means, a dictionary search means, an instruction means, and an exchange means are constituted by a latch by performing encoding with 4 bits, and table updating is performed using hardware. The data encoding device according to any one of 1 to 5.
JP12718394A 1994-06-09 1994-06-09 Data coding device Pending JPH07334344A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12718394A JPH07334344A (en) 1994-06-09 1994-06-09 Data coding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12718394A JPH07334344A (en) 1994-06-09 1994-06-09 Data coding device

Publications (1)

Publication Number Publication Date
JPH07334344A true JPH07334344A (en) 1995-12-22

Family

ID=14953736

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12718394A Pending JPH07334344A (en) 1994-06-09 1994-06-09 Data coding device

Country Status (1)

Country Link
JP (1) JPH07334344A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011507450A (en) * 2007-12-20 2011-03-03 タンドベルク・テレコム・エイ・エス Variable length coding method and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011507450A (en) * 2007-12-20 2011-03-03 タンドベルク・テレコム・エイ・エス Variable length coding method and apparatus
US8306347B2 (en) 2007-12-20 2012-11-06 Cisco Technology, Inc. Variable length coding (VLC) method and device

Similar Documents

Publication Publication Date Title
US6549148B2 (en) Encoding and decoding apparatus using context
USRE41152E1 (en) Lempel-Ziv data compression technique utilizing a dictionary pre-filled with frequent letter combinations, words and/or phrases
US6624762B1 (en) Hardware-based, LZW data compression co-processor
JP2979106B2 (en) Data compression
JPH04502377A (en) data compression
JPH0779262B2 (en) Encoding method of compressed data
JP3083730B2 (en) System and method for compressing data information
JPH0888568A (en) Reversible code encoding method for data
JPS6356726B2 (en)
JPH07225668A (en) Method of data column compression
US6721753B1 (en) File processing method, data processing apparatus, and storage medium
JP2004194343A (en) System and method for path compression optimization in pipeline type hardware bitmap type multi-bit trie algorithm network search engine
JP3611319B2 (en) Method and apparatus for reducing the time required for data compression
JP2021145281A (en) Compression device, and decompression device and method
JPH07334344A (en) Data coding device
JPH10261969A (en) Data compression method and its device
US6415061B1 (en) Method of updating dictionaries in a data transmission system using data compression
US7580429B1 (en) System and methods for improving data compression
JP2940948B2 (en) Data compression method
JP2001136075A (en) Data compression/decompression device and storage medium with data compression/decompression program recorded thereon
JP3132774B2 (en) Data compression / decompression device
JP3053656B2 (en) Dictionary registration method in data compression
Huang et al. Windowed Huffman coding algorithm with size adaptation
JP3708318B2 (en) Data compression / decompression apparatus and data compression / decompression method
JP3384844B2 (en) Data compression method and apparatus and data decompression method and apparatus