JPH0773013A - Data compressing method, data restoring method, and information processor - Google Patents

Data compressing method, data restoring method, and information processor

Info

Publication number
JPH0773013A
JPH0773013A JP6158099A JP15809994A JPH0773013A JP H0773013 A JPH0773013 A JP H0773013A JP 6158099 A JP6158099 A JP 6158099A JP 15809994 A JP15809994 A JP 15809994A JP H0773013 A JPH0773013 A JP H0773013A
Authority
JP
Japan
Prior art keywords
data
dictionary
compressed
string
registration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP6158099A
Other languages
Japanese (ja)
Other versions
JP3132293B2 (en
Inventor
Ryuji Omoto
隆二 大本
Hikonosuke Uei
彦之介 上井
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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
Priority to JP15809994A priority Critical patent/JP3132293B2/en
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to KR1019940035931A priority patent/KR100260827B1/en
Priority to CN94120709.9A priority patent/CN1099766C/en
Priority to SG1996002756A priority patent/SG52323A1/en
Priority to DE69433620T priority patent/DE69433620T2/en
Priority to EP94309663A priority patent/EP0687995B1/en
Priority to US08/362,019 priority patent/US5646617A/en
Priority to TW83112037A priority patent/TW297969B/zh
Publication of JPH0773013A publication Critical patent/JPH0773013A/en
Application granted granted Critical
Publication of JP3132293B2 publication Critical patent/JP3132293B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Document Processing Apparatus (AREA)

Abstract

PURPOSE:To provide a data compressing method, a data restoring method, and an information processor in which the compression rate is high and the restoration processing speed is high and only required characters are freely restored. CONSTITUTION:A dictionary is used where register data strings are registered in relation to register numbers, and two or more combinations of data strings are replaced with a pertinent register number to compress data. The dictionary is generated and updated in steps A1 and A2, and it is judged whether the dictionary is most suitable or not in a step A3. In this case, the dictionary is updated by the increment decomposition method, the additive increment decomposition method, or the like. When the most suitable dictionary is generated, the dictionary is outputted as the final static dictionary for restoration, and data is compressed by this static dictionary, and the compressed data string is outputted as the final compressed data for restoration in steps A4 and A5.

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 method using a dictionary in which a registration data string is registered in association with a registration number, a data recovery method for recovering compressed data, and an information processing apparatus.

【0002】[0002]

【従来の技術】プリンタ等の情報処理装置では最近、種
々の印字サイズのビットマップフォントやアウトライン
フォントを供給することで付加価値を高め、さらにどの
印字サイズにおいても高印字品質を維持しようとする要
求が高まっている。そこで、プリンタ等の分野では最
近、これらフォントデータからなる大量の情報を効率よ
く記憶させるためのデータ圧縮技術が注目されるように
なっている。
2. Description of the Related Art Recently, in information processing apparatuses such as printers, there is a demand to increase the added value by supplying bitmap fonts and outline fonts of various print sizes and to maintain high print quality at any print size. Is increasing. Therefore, in the field of printers and the like, recently, a data compression technique for efficiently storing a large amount of information composed of these font data has attracted attention.

【0003】大量の情報をできるだけ少ない容量で記憶
あるいは転送するためのデータ圧縮の従来技術として
は、ハフマン符号のように固定長ビットのデータを可変
長ビットのコードに変換する技術や、いわゆるLempel-Z
iv特許(米国特許第4464650 号明細書)やLZW特許
(米国特許第4558302 号明細書)のように過去に現れた
データ列とこれから圧縮しようとしているデータ列との
一致を利用して圧縮を行う技術等が知られている。
As a conventional technique of data compression for storing or transferring a large amount of information with a capacity as small as possible, a technique of converting fixed-length bit data into a variable-length bit code such as Huffman code, or so-called Lempel- Z
iv The compression is performed by using the matching between the data string that has appeared in the past and the data string that is about to be compressed, such as the patent (US Pat. No. 4,464,650) and the LZW patent (US Pat. No. 4,558,302) Techniques are known.

【0004】しかし、これらの従来技術は、いわゆる動
的辞書を使用して行うデータ圧縮方法である。即ち、圧
縮すべき対象データを解析し、出現頻度等を調べながら
データを辞書構造の形で登録し、この辞書を用いて同時
にデータを圧縮していく方法である。この場合、辞書は
リアルタイムでどんどん変わって行くのが特徴である。
この動的辞書によるデータ圧縮では、圧縮処理が行われ
た対象データだけが生成物として残るが、データを復元
する際は圧縮時の履歴データの特性を調べ、再び辞書を
作成し直しながら次のデータを復元して行かねばならな
い。従って、圧縮された対象データの最初から順に処理
を行って行かなければならないという問題がある。
However, these conventional techniques are data compression methods performed by using a so-called dynamic dictionary. That is, it is a method of analyzing target data to be compressed, registering the data in a dictionary structure while checking the appearance frequency, and simultaneously compressing the data using this dictionary. In this case, the feature of the dictionary is that it changes rapidly in real time.
In this data compression by the dynamic dictionary, only the target data that has been compressed remains as a product, but when restoring the data, the characteristics of the history data at the time of compression are checked, and the dictionary You have to restore the data. Therefore, there is a problem that the compressed target data must be processed sequentially from the beginning.

【0005】さて、プリンタ等におけるフォントデータ
の圧縮では、圧縮されたフォントデータはプリンタある
いはホストコンピュータ側の記憶装置に格納される。そ
して、印字の際には、記憶装置の中から必要な圧縮され
たフォントデータを取り出し、この圧縮されたフォント
データを通常のデータに復元して印字データを形成す
る。従って、この様な条件においてデータ圧縮を用いる
場合、必要とされるのは記憶装置に格納されているデー
タを如何に早く復元し、印字データを形成するかであ
る。
When compressing font data in a printer or the like, the compressed font data is stored in the printer or the storage device on the host computer side. Then, at the time of printing, necessary compressed font data is taken out from the storage device, and the compressed font data is restored to normal data to form print data. Therefore, when data compression is used under such conditions, what is needed is how quickly the data stored in the storage device is restored to form print data.

【0006】また、プリンタ等においてフォントデータ
を圧縮する際に重要となるもう一つのポイントは、どの
ような印字データ(文字)をどの順番でも出力できると
いう自在性を持たせることである。つまり、プリンタ等
においては記憶されているデータに対してランダムにア
クセスし、ランダムに印字データを形成できることが要
求される。
[0006] Another important point when compressing font data in a printer or the like is to have the flexibility to output any print data (character) in any order. That is, printers and the like are required to be able to randomly access stored data and form print data at random.

【0007】[0007]

【発明が解決しようとする課題】ハフマン符号等の圧縮
方法よりも一般に圧縮率が高いとされるLempel-ZivやL
ZWなどのデータ圧縮方法は、今後の圧縮技術の主流に
なると思われる。しかし、その一方で、これらの圧縮技
術は動的辞書を用いたデータ圧縮であるためにデータを
復元する際も過去のデータ特性を調べ、更新していかね
ばならず、復元に時間がかかるという問題がある。
[Problems to be Solved by the Invention] Lempel-Ziv and L, which are generally considered to have a higher compression rate than compression methods such as Huffman code
Data compression methods such as ZW are expected to become the mainstream of future compression technology. However, on the other hand, since these compression techniques use data compression using a dynamic dictionary, it is necessary to check and update the past data characteristics when restoring data, and it takes time to restore. There's a problem.

【0008】また、Lempel-ZivやLZWなどのデータ圧
縮方法は復元の際には、圧縮データの最初から順にデー
タを復元せねばならず、必要な印字データのみを必要な
ときに自由に取り出すことはできないという問題があ
る。
Further, in the data compression method such as Lempel-Ziv and LZW, at the time of decompression, the data must be decompressed in order from the beginning of the compressed data, and only necessary print data can be freely taken out when necessary. There is a problem that you can not.

【0009】また、LZW等で用いられている増分分解
法と呼ばれるデータ圧縮方法では、辞書に登録できるデ
ータ列の個数を1づつしか増やしてゆくことができない
ため、例えば同じデータ列が連続する場合には、データ
圧縮率をいまいち高めることができないという問題があ
った。
In addition, in the data compression method called the incremental decomposition method used in LZW and the like, the number of data strings that can be registered in the dictionary can be increased only by one, so that, for example, when the same data string continues. Had a problem that the data compression rate could not be improved.

【0010】本発明は、以上ののような課題を解決する
ためになされたものであり、その目的とするところは、
Lempel-ZivやLZWのデータ圧縮方法のような高圧縮率
を維持しつつ、それでいて復元の処理を比較的短い時間
で済ませ、かつ必要なデータ列のみを自由に復元可能に
するデータ圧縮方法、圧縮されたデータ列を復元できる
データ復元方法及び情報処理装置を提供することにあ
る。
The present invention has been made to solve the above problems, and its purpose is to:
A data compression method, such as Lempel-Ziv or LZW data compression method, which maintains a high compression rate, yet can perform the decompression process in a relatively short time, and can freely decompress only the necessary data string. An object of the present invention is to provide a data restoration method and an information processing device capable of restoring a generated data string.

【0011】また、本発明の他の目的は、増分分解法よ
りもさらに圧縮率の高い方法を創出することにより、圧
縮されたデータ列とその際に生成された辞書の格納のた
めに必要な記憶容量を少なくすることができるデータ圧
縮方法、圧縮されたデータ列を復元できるデータ復元方
法及び情報処理装置を提供することにある。
Further, another object of the present invention is to store a compressed data string and a dictionary generated at that time by creating a method having a higher compression rate than the incremental decomposition method. An object of the present invention is to provide a data compression method that can reduce the storage capacity, a data decompression method that can decompress a compressed data string, and an information processing device.

【0012】[0012]

【課題を解決するための手段及び作用】上記課題を解決
するために、請求項1の発明は、登録番号に関連づけて
登録データ列を登録できる辞書を使用しデータ列の2以
上の組み合わせを該登録番号に置き換えることでデータ
圧縮を行うデータ圧縮方法であって、圧縮対象であるデ
ータ列のデータ圧縮に最適な辞書が生成されるまで辞書
を更新し、最適な辞書が生成された段階で該辞書を最終
的な復元用の静的辞書として出力するとともに、該静的
辞書により圧縮対象であるデータ列のデータ圧縮を行
い、圧縮されたデータ列を最終的な復元用の圧縮データ
として出力することを特徴とする。
In order to solve the above-mentioned problems, the invention of claim 1 uses a dictionary capable of registering a registration data string in association with a registration number and uses two or more combinations of data strings. A data compression method for compressing data by substituting a registration number. The dictionary is updated until the optimum dictionary for data compression of the data string to be compressed is generated, and when the optimum dictionary is generated, the dictionary is updated. The dictionary is output as a final static dictionary for decompression, the data string to be compressed is compressed by the static dictionary, and the compressed data string is output as final decompressed compressed data. It is characterized by

【0013】請求項1の発明によれば、辞書には、登録
番号に関連づけて登録データ列が登録される。そして、
データ列の2以上の組み合わせを該登録番号に置き換え
ることでデータ圧縮が行われる。このようにデータ圧縮
を行えば、復元の際に該登録番号により上記登録データ
列を読み出すことにより元のデータ列を復元することが
可能となる。この場合、辞書は、圧縮対象であるデータ
列のデータ圧縮に最適な辞書が生成されるまで、更新さ
れる。即ち、例えば圧縮データのデータ量、辞書のデー
タ量等が最適になるまで辞書が更新されることになる。
そして、最適な辞書が生成された段階で、該辞書が最終
的な復元用の静的辞書として出力される。また、該静的
辞書により圧縮対象であるデータ列のデータ圧縮が行わ
れ、圧縮されたデータ列が最終的な復元用の圧縮データ
として出力される。そして、出力された最終的な静的辞
書、圧縮データは、例えば記憶装置、記憶媒体等に格納
され、プリンタ、コンピュータ等の情報処理装置により
復元され、元のデータ列が復元されることになる。この
ように本発明によれば、最適な辞書が生成されるまで辞
書の更新が行われ、この最適な辞書を静的な辞書として
この静的辞書によりデータ圧縮が行われる。従って、出
力される静的辞書と圧縮データのデータ量を最適なもの
とすることができる。更に、出力されるまでの辞書は静
的辞書である必要がないため、例えばデータ圧縮率の非
常に高い動的辞書を用いたデータ圧縮アルゴリズム等に
より辞書の更新、データ圧縮を行うことが可能となる。
これにより、最終的な圧縮データのデータ圧縮率を非常
に高めることが可能となる。一方、出力された辞書は静
的辞書となるため、必要なデータ列をこの静的辞書を用
いて自在に復元することも可能となる。
According to the invention of claim 1, a registration data string is registered in the dictionary in association with the registration number. And
Data compression is performed by replacing two or more combinations of data strings with the registration numbers. When the data compression is performed in this way, the original data string can be restored by reading the registered data string with the registration number at the time of decompression. In this case, the dictionary is updated until the optimal dictionary for data compression of the data string to be compressed is generated. That is, for example, the dictionary is updated until the amount of compressed data, the amount of dictionary data, and the like are optimized.
Then, when the optimum dictionary is generated, the dictionary is output as the final static dictionary for restoration. Further, the static dictionary performs data compression of the data string to be compressed, and the compressed data string is output as final compressed data for decompression. Then, the final static dictionary and compressed data that have been output are stored in, for example, a storage device, a storage medium, etc., and restored by an information processing device such as a printer or a computer, so that the original data string is restored. . As described above, according to the present invention, the dictionary is updated until the optimum dictionary is generated, and the static dictionary is used as the static dictionary to perform data compression by the static dictionary. Therefore, the data amounts of the static dictionary and the compressed data that are output can be optimized. Furthermore, since the dictionary until output does not have to be a static dictionary, it is possible to update and compress the dictionary with a data compression algorithm that uses a dynamic dictionary with a very high data compression rate. Become.
This makes it possible to greatly increase the data compression rate of the final compressed data. On the other hand, since the output dictionary becomes a static dictionary, it is possible to freely restore a necessary data string using this static dictionary.

【0014】また、請求項2の発明は、請求項1におい
て、前記最適な辞書が生成されるまでの前記辞書の更新
が、組み合わせ個数の多いデータ列の組み合わせを優先
的に登録することにより生成された辞書から使用頻度の
低い登録データ列の登録を辞書の登録数が所定数になる
まで削除することにより行われることを特徴とする。
According to a second aspect of the present invention, in the first aspect, the dictionary is updated until the optimal dictionary is generated by preferentially registering a combination of data strings having a large number of combinations. It is characterized in that registration of a registration data string that is used less frequently is deleted from the created dictionary until the number of registrations in the dictionary reaches a predetermined number.

【0015】請求項2の発明によれば、組み合わせ個数
の多いデータ列の組み合わせを優先的に登録することに
より辞書が生成される。このような辞書を生成させるた
めの手法としては、例えばスライド辞書と呼ばれる手法
を利用することができる。そして、このスライド辞書手
法を利用する場合には、スライド辞書手法により過去の
データ列と対象となるデータ列との間の最長一致データ
列を探し出し、この最長一致データ列を辞書に登録する
ことで辞書を生成することになる。これにより、組み合
わせ個数の多いデータ列の組み合わせが優先的に登録さ
れた辞書を生成することが可能となる。そして、このよ
うな辞書を使用することにより、組み合わせ個数の多い
データ列の組み合わせが優先的に辞書の登録番号に置き
換えられることになるため、データの圧縮率を最適なも
のとすることができる。一方、このようにして生成され
た辞書はその登録数が非常に多くなる場合がある。そこ
で、この生成された辞書から使用頻度の低い登録データ
列の登録を削除することで辞書の更新を行い、辞書の登
録数が所定数になった段階で更新を終了すれば、圧縮率
が良い、いいかえればデータ量の少ない最適な辞書を生
成することが可能となる。
According to the second aspect of the present invention, the dictionary is generated by preferentially registering the combinations of the data strings having a large number of combinations. As a method for generating such a dictionary, for example, a method called a slide dictionary can be used. When using this slide dictionary method, the longest matching data string between the past data string and the target data string is searched for by the slide dictionary method, and this longest matching data string is registered in the dictionary. Will create a dictionary. As a result, it is possible to generate a dictionary in which a combination of data strings having a large number of combinations is preferentially registered. By using such a dictionary, the combination of the data strings having a large number of combinations is preferentially replaced by the registration number of the dictionary, so that the data compression rate can be optimized. On the other hand, the dictionary generated in this way may have a very large number of registrations. Therefore, the dictionary is updated by deleting the registration of the registration data string that is rarely used from the generated dictionary, and the compression rate is good if the update is terminated when the number of registered dictionary reaches a predetermined number. In other words, it is possible to generate an optimal dictionary with a small amount of data.

【0016】また、請求項3の発明は、請求項1におい
て、前記最適な辞書が生成されるまでの前記辞書の更新
が、出現確率が高いデータ列の組み合わせを優先的に登
録することにより生成された辞書から使用頻度の低い登
録データ列の登録を辞書の登録数が所定数になるまで削
除することにより行われることを特徴とする。
According to the invention of claim 3, in claim 1, the update of the dictionary until the optimum dictionary is generated is performed by preferentially registering a combination of data strings having a high appearance probability. It is characterized in that registration of a registration data string that is used less frequently is deleted from the created dictionary until the number of registrations in the dictionary reaches a predetermined number.

【0017】請求項3の発明によれば、出現確率の高い
データ列の組み合わせを優先的に登録することにより辞
書が生成される。このデータ列の組み合わせの出現確率
は、例えば、圧縮対象となる全データ列の出現確率を調
べ、この出現確率から求めることができる。そして、こ
のようにして生成された辞書を用いることにより、出現
確率の高いデータ列の組み合わせが優先的に登録番号に
置き換えられることになるため、データ圧縮率を最適な
ものとすることができる。そして、生成された辞書から
使用頻度の低い登録データ列の登録を削除することで辞
書の更新を行い、辞書の登録数が所定数になった段階で
更新を終了すれば、データ量の少ない最適な辞書を生成
することが可能となる。
According to the third aspect of the present invention, the dictionary is generated by preferentially registering a combination of data strings having a high appearance probability. The appearance probability of this combination of data strings can be obtained, for example, by examining the appearance probabilities of all data strings to be compressed, and from this appearance probability. By using the dictionary generated in this way, the combination of data strings having a high appearance probability is preferentially replaced with the registration number, so that the data compression rate can be optimized. Then, the dictionary is updated by deleting the registration of the infrequently used registration data string from the generated dictionary, and if the update is terminated when the number of registered dictionary reaches a predetermined number, the optimal amount of data is optimized. It is possible to generate a different dictionary.

【0018】また、請求項4の発明は、請求項1におい
て、前記最適な辞書が生成されるまでの前記辞書の更新
が、データ圧縮の際に辞書が動的に変化するデータ圧縮
アルゴリズムにより辞書を更新しながら圧縮対象となる
全てのデータ列に対するデータ圧縮の処理を行い、該処
理により更新された辞書を用いて再び前記データ圧縮ア
ルゴリズムにより辞書を更新しながら圧縮対象となる全
てのデータ列に対するデータ圧縮の処理を行い、データ
圧縮率が最適になるまで前記処理を繰り返すことにより
行われることを特徴とする。
According to a fourth aspect of the present invention, in the first aspect, the dictionary is updated by the data compression algorithm in which the dictionary dynamically changes during data compression until the optimum dictionary is generated. While performing the data compression process on all the data strings to be compressed, and using the dictionary updated by the process to update the dictionary again by the data compression algorithm for all the data strings to be compressed. It is characterized in that a data compression process is performed and the above process is repeated until the data compression rate becomes optimum.

【0019】請求項4の発明によれば、データ圧縮の際
に辞書が動的に変化するデータ圧縮アルゴリズム、例え
ば増分分解アルゴリズム、加増分解アルゴリズム等によ
り辞書を更新しながら全圧縮対象データ列に対するデー
タ圧縮の処理が行われる。そして、次に、この処理によ
り更新された辞書を用いて再び前記データ圧縮アルゴリ
ズムにより辞書を更新しながら全圧縮対象データ列に対
するデータ圧縮の処理が行われる。そして、この処理を
データ圧縮が最適になるまで繰り返すことにより、最適
な辞書が生成されることになる。本発明によれば、デー
タ圧縮率の高い動的辞書を用いたデータ圧縮アルゴリズ
ムによりデータ圧縮がなされ、しかもデータ圧縮率が最
適な段階で辞書の更新が終了するため、データ圧縮率を
非常に高めることが可能となる。一方、出力された辞書
は静的辞書となるため、必要なデータ列をこの静的辞書
を用いて自在に復元することも可能となる。
According to the fourth aspect of the invention, the data for all the data strings to be compressed is updated while updating the dictionary by a data compression algorithm in which the dictionary dynamically changes at the time of data compression, such as an incremental decomposition algorithm or an incremental decomposition algorithm. The compression process is performed. Then, while the dictionary updated by this process is used to update the dictionary again by the data compression algorithm, the data compression process is performed on all the compression target data strings. Then, this process is repeated until the data compression becomes optimum, so that the optimum dictionary is generated. According to the present invention, data compression is performed by a data compression algorithm that uses a dynamic dictionary with a high data compression rate, and the dictionary is updated at the stage where the data compression rate is optimum, so the data compression rate is greatly increased. It becomes possible. On the other hand, since the output dictionary becomes a static dictionary, it is possible to freely restore a necessary data string using this static dictionary.

【0020】また、請求項5の発明は、登録番号に関連
づけて登録データ列を登録できる辞書を使用しデータ列
の2以上の組み合わせを該登録番号に置き換えることで
データ圧縮を行うデータ圧縮方法であって、(A)圧縮
対象であるデータ列から所定数のデータ列を取り出し所
定数のバッファを有する作業領域に格納する工程と、
(B)前記作業領域内の隣り合うバッファに格納される
データ列の組み合わせが辞書に登録されているか否かを
解析し、辞書に登録されている場合には、該データ列の
組み合わせを辞書における前記登録番号に置き換えると
ともに置き換えにより生じた空きバッファを埋めるよう
にデータ列を作業領域内でシフトさせ、その結果作業領
域の終端に生じた空きバッファに続きのデータ列を取り
込み、再び作業領域内の隣り合うバッファに格納される
データ列の組み合わせが辞書に登録されているか否かを
解析する工程と、(C)上記工程(B)の解析により作
業領域内の隣り合うバッファに格納されるデータ列の組
み合わせのいずれもが辞書に登録されていないと判断さ
れた場合には、作業領域内の先頭から1番目、2番目の
バッファに格納されるデータ列の組み合わせを辞書に登
録するとともに1番目のデータ列を消去し、消去により
生じた空きバッファを埋めるようにデータ列を作業領域
内でシフトさせ、その結果作業領域の終端に生じた空き
バッファに続きのデータ列を取り込む工程とを含み、圧
縮の対象となる全てのデータ列が前記作業領域内に格納
されるまで前記工程(B)、(C)を繰り返すことを特
徴とする。
Further, the invention of claim 5 is a data compression method for performing data compression by using a dictionary capable of registering a registration data string in association with a registration number and replacing two or more combinations of data strings with the registration number. And (A) a step of extracting a predetermined number of data strings from the data string to be compressed and storing them in a work area having a predetermined number of buffers;
(B) It is analyzed whether or not a combination of data strings stored in adjacent buffers in the work area is registered in the dictionary, and if the combination is registered in the dictionary, the combination of the data strings in the dictionary is analyzed. The data string is shifted in the work area so as to fill the empty buffer created by the replacement as well as the registration number, and as a result, the subsequent data string is fetched in the empty buffer created at the end of the work area, and again in the working area. A step of analyzing whether or not a combination of data strings stored in the adjacent buffers is registered in the dictionary, and (C) a data string stored in the adjacent buffers in the work area by the analysis of the step (B). If it is determined that none of the combinations of are registered in the dictionary, they are stored in the first and second buffers from the beginning in the work area. The combination of the data strings to be registered is registered in the dictionary, the first data string is deleted, the data string is shifted in the work area so as to fill the empty buffer created by the deletion, and as a result, the empty space created at the end of the work area A step of fetching a subsequent data string in the buffer, and repeating the steps (B) and (C) until all the data strings to be compressed are stored in the working area.

【0021】請求項5の発明によれば、作業領域内の隣
り合うバッファに格納されるデータ列の組み合わせが辞
書に登録されているか否かが解析され、登録されている
場合には辞書の登録番号に置き換えられる。そして、そ
の結果生じた空きバッファに続きのデータ列を取り込
み、再びデータ列の組み合わせが辞書に登録されている
か否かが解析される。そして、データ列の組み合わせが
辞書に登録されていないと判断されると、先頭から1番
目、2番目のデータ列の組み合わせが登録され、その結
果生じた空きバッファに続きのデータ列が取り込まれ
る。そして、これらの処理が、全てのデータ列が作業領
域内に格納されるまで繰り返されることでデータ圧縮が
行われる。このように本発明によれば、所定容量の作業
用領域を設け、注目しているデータ列と同じデータ列が
作業用領域に存在する場合は辞書を用いた置き換え処理
が行われるようになっている。従って、特に同一のデー
タ列を圧縮処理する場合に、辞書の登録数を従来の増分
分解法と比べて非常に少なくすることができるととも
に、該辞書の登録番号により置き換えられて圧縮が施さ
れた圧縮データ自体も、従来の増分分解法に比べて非常
に少ないデータ量とすることができる。
According to the invention of claim 5, it is analyzed whether or not the combination of the data strings stored in the adjacent buffers in the work area is registered in the dictionary, and if registered, the dictionary is registered. Will be replaced by a number. Then, the subsequent data string is fetched into the resulting empty buffer, and it is analyzed again whether or not the combination of the data strings is registered in the dictionary. Then, when it is determined that the combination of the data strings is not registered in the dictionary, the combination of the first and second data strings from the beginning is registered, and the subsequent data string is loaded into the resulting empty buffer. Data compression is performed by repeating these processes until all the data strings are stored in the work area. As described above, according to the present invention, the work area having the predetermined capacity is provided, and when the same data row as the data row of interest exists in the work area, the replacement process using the dictionary is performed. There is. Therefore, particularly when the same data string is compressed, the number of registered dictionaries can be made extremely smaller than that of the conventional incremental decomposition method, and the dictionaries are replaced by the registered numbers of the dictionaries and compressed. The compressed data itself can have a very small data amount as compared with the conventional incremental decomposition method.

【0022】また、請求項6の発明は、請求項5におい
て、圧縮の対象となる全てのデータ列に対して処理が行
われるまでの前記工程(B)、(C)の繰り返しを1回
のパスとした場合に、前回のパスで更新された辞書を用
いて現在のパスにおけるデータ圧縮を行うデータ圧縮方
法であって、現在のパスにおける前記工程(B)、
(C)の繰り返し回数が前回のパスにおける繰り返し回
数以下の場合には次のパスに移行し、現在のパスにおけ
る前記工程(B)、(C)の繰り返し回数が前回のパス
における繰り返し回数よりも大きい場合には前回のパス
で更新された辞書を最終的な復元用の静的辞書として出
力するとともに、該静的辞書により1回のパスのデータ
圧縮を行い、圧縮されたデータ列を最終的な復元用の圧
縮データとして出力することを特徴とする。
According to the invention of claim 6, in claim 5, the steps (B) and (C) are repeated once until all the data strings to be compressed are processed. A data compression method for compressing data in the current path using the dictionary updated in the previous path when the path is used, and the step (B) in the current path,
If the number of repetitions in (C) is less than or equal to the number of repetitions in the previous pass, the process moves to the next pass, and the number of repetitions in steps (B) and (C) in the current pass is greater than the number of repetitions in the previous pass. If it is larger, the dictionary updated in the previous pass is output as the final static dictionary for decompression, and the static dictionary compresses the data in one pass to obtain the final compressed data string. It is output as compressed data for various decompression.

【0023】請求項6の発明によれば、現在のパスにお
ける処理の繰り返し回数と前回のパスの処理の繰り返し
回数を比較することで、データ圧縮率が最適になったか
否かが判断される。そして、最適なデータ圧縮率になっ
た段階で該辞書を最終的な静的辞書とし、該静的辞書及
び該静的辞書により圧縮されたデータが出力される。従
って、圧縮率の非常に高い加増分解アルゴリズムにより
データ圧縮が可能となりデータ圧縮率が非常に高められ
るとともに、出力された辞書は静的辞書となるため、必
要なデータ列をこの静的辞書を用いて自在に復元するこ
とも可能となる。
According to the sixth aspect of the present invention, it is judged whether or not the data compression rate has become optimum by comparing the number of times the process is repeated in the current pass with the number of times the process is performed in the previous pass. Then, when the optimum data compression rate is reached, the dictionary is set as the final static dictionary, and the static dictionary and the data compressed by the static dictionary are output. Therefore, the data compression is possible by the additive decomposition algorithm with a very high compression rate, and the data compression rate is greatly improved, and the output dictionary becomes a static dictionary. It is also possible to restore freely.

【0024】また、請求項7の発明は、請求項1乃至6
のいずれかにおいて、前記辞書には登録番号、登録デー
タ列と共に使用頻度情報が記憶され、使用頻度の低い登
録データ列を順次削除する工程を含むことを特徴とす
る。
Further, the invention of claim 7 is based on claims 1 to 6.
In any one of the above items, the dictionary stores the registration number and the registration data string as well as the usage frequency information, and includes the step of sequentially deleting the registration data string having a low usage frequency.

【0025】請求項7の発明によれば、使用頻度の低い
登録データ列の登録を順次削除する工程が含まれる。従
って、辞書の登録可能数に限界がある場合等に、辞書の
データ量を最適なサイズとすることが可能となる。
According to the invention of claim 7, there is included a step of sequentially deleting the registrations of the registration data string which is not frequently used. Therefore, when there is a limit to the number of dictionaries that can be registered, the data amount of the dictionaries can be set to the optimum size.

【0026】また、請求項8の発明は、請求項7におい
て、前記使用頻度の低い登録データ列の削除が、辞書に
登録されている登録データ列の使用頻度数を順次減らし
てゆき、初めに使用頻度数が所定数以下になった登録デ
ータ列から優先して削除することにより行われることを
特徴とする。
Further, in the invention of claim 8, in claim 7, the deletion of the registration data string having a low frequency of use gradually reduces the number of times of use of the registration data string registered in the dictionary. It is characterized in that it is performed by preferentially deleting a registered data string whose frequency of use has become a predetermined number or less.

【0027】請求項8の発明によれば、辞書に登録され
ている登録データ列の使用頻度数を順次減らしてゆき、
初めに使用頻度数が所定数以下になった登録データ列か
ら優先して削除される。これにより、辞書の登録可能数
に限界がある場合等に、辞書のデータ量を最適なサイズ
とすることが可能となる。しかも、初めに使用頻度が所
定数以下になった登録データ列が優先的に削除されるた
め、辞書に使用頻度の高い登録データ列を残すことがで
き、最適な辞書を生成できる。
According to the invention of claim 8, the number of frequencies of use of the registered data string registered in the dictionary is gradually reduced,
Initially, the registered data sequence in which the frequency of use has become equal to or less than the predetermined number is preferentially deleted. As a result, when the number of dictionaries that can be registered is limited, the amount of data in the dictionary can be optimized. In addition, since the registered data string whose usage frequency has become equal to or less than the predetermined number is preferentially deleted, it is possible to leave the registered data string having a high usage frequency in the dictionary and generate an optimal dictionary.

【0028】また、請求項9の発明は、請求項1乃至8
のいずれかにおいて、圧縮の対象となるデータ列が文字
の印字の際に必要なフォントデータであることを特徴と
する。
Further, the invention of claim 9 relates to claims 1 to 8.
In any of the above, the data string to be compressed is the font data necessary for printing characters.

【0029】請求項9の発明によれば、文字印字の際に
必要なフォントデータが圧縮対象となる。このようなフ
ォントデータとしては、ビットマップフォントデータ、
アウトラインフォントデータ等が考えられる。ビットマ
ップフォントデータを圧縮する場合には、例えば縦方
向、横方向に並んだ所定数単位(例えば1バイト単位、
1ワード単位)のドットデータを圧縮対象とすることが
できる。また、アウトラインフォントデータを圧縮する
場合には、例えば文字の輪郭を構成する各点の属性情
報、各点のベクトル座標を制御するための情報等を圧縮
対象とすることができる。
According to the ninth aspect of the invention, the font data required for character printing is to be compressed. As such font data, bitmap font data,
Outline font data, etc. can be considered. When compressing bitmap font data, for example, a predetermined number of units arranged in the vertical direction and the horizontal direction (for example, 1 byte unit,
The dot data of 1 word unit) can be the compression target. Further, when the outline font data is compressed, for example, attribute information of each point forming the outline of the character, information for controlling vector coordinates of each point, or the like can be a compression target.

【0030】また、請求項10の発明は、請求項9にお
いて、前記フォントデータの中の一部のみが前記圧縮の
対象となるデータ列となり、他の一部が他のデータ圧縮
方法によりデータ圧縮されることを特徴とする。
Further, in the invention of claim 10, in claim 9, only a part of the font data is a data string to be compressed, and the other part is data compressed by another data compression method. It is characterized by being done.

【0031】請求項10の発明によれば、フォントデー
タを構成するデータの特性に応じて、一部のデータが静
的辞書、増分分解アルゴリズム、加増分解アルゴリズム
等を利用したデータ圧縮方法で圧縮され、他の一部が他
の圧縮方法、例えばハフマン符号手法により圧縮され
る。このように、データの特性に応じて、適用する圧縮
方法を換えることで、データの圧縮率を更に高めること
が可能となる。
According to the tenth aspect of the present invention, a part of the data is compressed by a data compression method using a static dictionary, an incremental decomposition algorithm, an incremental decomposition algorithm, etc., according to the characteristics of the data forming the font data. , The other part is compressed by another compression method, for example, the Huffman coding method. In this way, by changing the compression method to be applied according to the characteristics of the data, it is possible to further increase the data compression rate.

【0032】また、請求項11の発明は、請求項9又は
10のいずれかにおいて、共通の字体を有する前記文字
に対しては共通の前記辞書を用いてデータ圧縮が行われ
ることを特徴とする。
The invention of claim 11 is characterized in that in any one of claims 9 and 10, data compression is performed for the characters having a common font by using the common dictionary. .

【0033】請求項11の発明によれば、共通の字体を
有する文字に対しては、共通の辞書を用いてデータ圧縮
が行われる。例えば、明朝体の文字に対しては、全て明
朝体専用の辞書を用いて辞書の更新、データ圧縮を行
い、最終的な静的辞書、圧縮データを得る。また、ゴシ
ックの文字列に対しては、全てゴシック専用の辞書を用
いて辞書の更新、データ圧縮を行い、最終的な静的辞
書、圧縮データを得る。このように字体の各々について
辞書を共通化することで、データを効率よく圧縮するこ
とが可能となる。
According to the eleventh aspect of the present invention, data compression is performed for characters having a common font using a common dictionary. For example, for the characters in Mincho type, all the dictionaries dedicated to Mincho type are used to update the dictionary and compress the data to obtain the final static dictionary and compressed data. For Gothic character strings, a dictionary dedicated to Gothic is used for all dictionary updates and data compression to obtain the final static dictionary and compressed data. By using a common dictionary for each font in this way, data can be efficiently compressed.

【0034】また、請求項12の発明は、請求項1乃至
8のいずれかにおいて、圧縮の対象となるデータ列が文
字列であることを特徴とする。
The invention of claim 12 is characterized in that, in any of claims 1 to 8, the data string to be compressed is a character string.

【0035】請求項12の発明によれば、文字列データ
が圧縮対象となる。これにより、例えば文字の記憶に必
要な容量等を節約することができる。
According to the twelfth aspect of the invention, the character string data is to be compressed. As a result, it is possible to save, for example, the capacity required for storing characters.

【0036】また、請求項13の発明は、請求項1乃至
12のいずれかにおいて、最終的に生成された辞書に含
まれる登録番号と登録データ列の情報とから、前記登録
データ列を復元専用のデータ形式に変換した復元専用登
録データ列と該復元専用登録データ列のデータ長と該復
元専用登録データ列の開始アドレスの情報とを含む復元
専用の辞書が生成されることを特徴とする。
According to the thirteenth aspect of the present invention, in any one of the first to twelfth aspects, the registration data string is exclusively used for restoration from the registration number and the information of the registration data string included in the finally generated dictionary. A restore-only dictionary is generated that includes the restore-only registered data string converted into the data format of, the data length of the restore-only registered data string, and the start address information of the restore-only registered data string.

【0037】請求項13の発明によれば、復元専用登録
データ列と、この復元専用登録データ列のデータ長と、
この復元専用登録データ列の開始アドレスの情報とを含
む復元専用の辞書が生成される。そして、復元の際に
は、この復元専用辞書を用いてデータの復元が行われ
る。即ち、前記開始アドレスで指定される位置から前記
データ長で指定される長さの前記復元専用登録データ列
を読み出すことで辞書からデータを読み出し、復元処理
が行われる。この場合、復元専用登録データ列は、復元
専用のデータ形式に変換されている。従って、通常の辞
書を用いる場合よりも、非常に速く復元処理を行うこと
が可能となる。
According to the thirteenth aspect of the present invention, the restore-only registration data string, the data length of this restore-only registration data string,
A restoration-only dictionary including the start address information of the restoration-only registration data string is generated. Then, at the time of restoration, the restoration of data is performed using this restoration dedicated dictionary. That is, by reading the restoration-dedicated registration data string having the length designated by the data length from the position designated by the start address, the data is read from the dictionary and the restoration processing is performed. In this case, the restore-only registration data string is converted into a restore-only data format. Therefore, the restoration process can be performed much faster than when using a normal dictionary.

【0038】また、請求項14の発明は、請求項1乃至
13のいずれかのデータ圧縮方法により生成された圧縮
データと最終的な辞書とを用いて、該データ圧縮方法に
応じた復元処理により圧縮対象となったデータ列を復元
することを特徴とする。
According to a fourteenth aspect of the present invention, the compressed data generated by the data compression method according to any one of the first to thirteenth aspects and the final dictionary are used to perform decompression processing according to the data compression method. The feature is that the data string that is the compression target is restored.

【0039】請求項14の発明によれば、上記データ圧
縮方法により生成された圧縮データと最終的な辞書とを
用いて元のデータ列が復元される。これにより、この復
元されたデータ列を用いて所定の処理、例えば文字の印
字等の処理を行うことができる。
According to the fourteenth aspect of the present invention, the original data string is restored using the compressed data generated by the above data compression method and the final dictionary. As a result, it is possible to perform a predetermined process, for example, a process such as character printing, using this restored data string.

【0040】また、請求項15の発明は、請求項1乃至
13のいずれかのデータ圧縮方法により生成された圧縮
データと最終的な辞書とを用いて、該データ圧縮方法に
応じた復元処理により圧縮対象となったデータ列を復元
する手段を含むことを特徴とする。
According to a fifteenth aspect of the present invention, the compressed data generated by the data compression method according to any one of the first to thirteenth aspects and the final dictionary are used to perform decompression processing according to the data compression method. It is characterized in that it includes means for decompressing a data string that is a compression target.

【0041】請求項15の発明によれば、上記データ圧
縮方法により生成された圧縮データと最終的な辞書を用
いて、復元手段により元のデータ列が復元される。そし
て、この復元手段は、例えば、コンピュータ、プリンタ
等の情報処理装置に内蔵させることができる。
According to the fifteenth aspect of the present invention, the original data string is restored by the restoring means by using the compressed data generated by the data compression method and the final dictionary. The restoring means can be incorporated in an information processing device such as a computer or a printer.

【0042】[0042]

【実施例】以下、本発明の最適な実施例について説明す
る。なお、以下の第1、第2の実施例では、説明を簡単
にするためにデータ列として主に文字列を圧縮する場合
を例にとり説明を行う。しかし、本発明におけるデータ
列には、このような文字列のみならず例えばフォントデ
ータを構成するためのバイト列、ワード列等のあらゆる
種類のデータ列が含まれる。
EXAMPLES The best examples of the present invention will be described below. In addition, in the following first and second embodiments, a case where a character string is mainly compressed as a data string is described as an example for the sake of simplicity. However, the data string in the present invention includes not only such a character string but also any kind of data string such as a byte string and a word string for forming font data.

【0043】1.第1の実施例 図1には、本実施例のデータ圧縮方法を説明するための
フローチャートが示される。本実施例のデータ圧縮方法
では、登録番号に関連づけて登録データ列を登録できる
辞書が使用される。そして、データ列の2以上の組み合
わせをこの登録番号に置き換えることでデータ圧縮が行
われることになる。まず、圧縮対象である全てのデータ
列(例えば文字列)から辞書が生成され(ステップA
1)、データ圧縮に最適な辞書が生成されるまで辞書の
更新が繰り返される(ステップA2、A3)。そして、
最適な辞書が生成された段階でこの辞書を最終的な復元
用の静的辞書とし、この静的辞書により圧縮対象である
データ列のデータ圧縮が行われる(ステップA4)。そ
して、これにより圧縮された最終的な復元用の圧縮デー
タ及び最終的な復元用の静的辞書が出力され、マスクR
OM、EEPROM等の記憶装置、記憶媒体に格納され
る。そして、この記憶装置等に格納された静的辞書及び
圧縮データを用いて、プリンタあるいはホストコンピュ
ータ等の情報処理装置内においてデータの復元処理が行
われることになる。
1. First Embodiment FIG. 1 shows a flowchart for explaining the data compression method of this embodiment. In the data compression method of this embodiment, a dictionary that can register a registration data string in association with a registration number is used. Then, data compression is performed by replacing two or more combinations of data strings with this registration number. First, a dictionary is generated from all the data strings (for example, character strings) to be compressed (step A
1) The dictionary update is repeated until the optimum dictionary for data compression is generated (steps A2 and A3). And
When the optimum dictionary is generated, this dictionary is used as the final static dictionary for decompression, and the data string to be compressed is compressed by this static dictionary (step A4). Then, the compressed data for final decompression and the static dictionary for final decompression that are thus compressed are output, and the mask R
It is stored in a storage device or storage medium such as OM and EEPROM. Then, using the static dictionary and the compressed data stored in this storage device or the like, data restoration processing is performed in an information processing device such as a printer or a host computer.

【0044】なお、辞書を生成・更新してゆき、どの段
階でデータ圧縮に最適な辞書とするかを決める手法とし
ては、後述するように種々の手法が考えられる。
As a method of generating / updating a dictionary and deciding at which stage the dictionary is optimum for data compression, various methods can be considered as described later.

【0045】図2には、本実施例のデータ圧縮方法が使
用されるデータ圧縮装置12の構成の一例が示される。
圧縮対象である全データ列11は、まず辞書生成・更新
手段13に入力され、これにより辞書の生成・更新が行
われる。そして、データ圧縮に最適な辞書が生成された
段階で、該辞書は静的辞書14として静的辞書保持手段
15に保持される。そして、この保持された最適の静的
辞書14は、静的辞書出力手段16により外部の記憶手
段(図示せず)へと出力される一方、データ圧縮手段1
7において全データ列11をデータ圧縮するのに利用さ
れる。このデータ圧縮は、データ列の2以上の組み合わ
せを辞書の登録番号に置き換えることで行われる。そし
て、この結果得られた圧縮データ19は、圧縮データ出
力手段18により外部の記憶手段へと出力されることに
なる。
FIG. 2 shows an example of the configuration of the data compression device 12 in which the data compression method of this embodiment is used.
The entire data string 11 to be compressed is first input to the dictionary creating / updating means 13, and the dictionary is created / updated thereby. Then, when a dictionary optimal for data compression is generated, the dictionary is held in the static dictionary holding means 15 as the static dictionary 14. Then, the held optimum static dictionary 14 is output to the external storage means (not shown) by the static dictionary output means 16 while the data compression means 1 is output.
7 is used for data compression of the entire data string 11. This data compression is performed by replacing two or more combinations of data strings with registration numbers in the dictionary. Then, the compressed data 19 obtained as a result is output to the external storage means by the compressed data output means 18.

【0046】次に、本実施例における辞書の構成につい
て説明する。例えば、 ”static_string_dictionar
y” というデータ列(文字列)を圧縮する場合を考える。こ
の場合に辞書に、 ”st”、”at”、”ic”、”_”、”st”、”
ring_d”、”ic”、”tionary” の様に8個のデータ列の組み合わせが登録されていたと
する。この場合には、これらのデータ列の組み合わせは
例えば下記に示すように登録番号に関連づけて登録され
ている。 0:st 1:at 2:ic 3:_ 4:ring_d 5:tionary すると、”static_string_dictio
nary”というデータ列は、これらの登録番号によ
り、 0、1、2、3、0、4、2、5 というように置き換えることが可能となり、これにより
データが圧縮されることになる。
Next, the structure of the dictionary in this embodiment will be described. For example, "static_string_dictionar
Consider a case where a data string (character string) "y" is compressed. In this case, "st", "at", "ic", "_", "st", "
Assume that a combination of eight data strings such as "ring_d", "ic", and "tionary" has been registered. In this case, the combination of these data strings is associated with a registration number as shown below, for example. Registered: 0: st 1: at 2: ic 3 :: 4: ring_d 5: tionary Then, "static_string_dictio"
The data string "nary" can be replaced by 0, 1, 2, 3, 0, 4, 2, 5 by these registration numbers, and the data is compressed by this.

【0047】次に、最適な辞書を生成するための種々の
手法について説明する。本実施例では、最終的には静的
辞書と圧縮データの2つが出力され、これらが記憶装置
に格納される。従って、記憶装置の使用容量を節約する
ためには、最終的な静的辞書、圧縮データのデータ量を
減らす必要があり、これらのデータ量を少なくできる辞
書を最適な辞書ということができる。即ち、最適な辞書
とするためには、辞書自体のデータ量を小さくできるこ
とが望ましく、あるいは、圧縮データのデータ量を小さ
くできることが望ましい。このために、本実施例では例
えば以下の第1〜第4の手法を用いている。なお、以下
ではデータ列として文字列を例に取り説明する。
Next, various techniques for generating an optimum dictionary will be described. In this embodiment, finally, two of the static dictionary and the compressed data are output, and these are stored in the storage device. Therefore, in order to save the used capacity of the storage device, it is necessary to reduce the data amount of the final static dictionary and compressed data, and a dictionary that can reduce the data amount can be called an optimum dictionary. That is, in order to obtain an optimal dictionary, it is desirable that the data amount of the dictionary itself can be reduced, or that the compressed data amount can be reduced. Therefore, in this embodiment, for example, the following first to fourth methods are used. In the following, a character string will be described as an example of the data string.

【0048】(A)最適な辞書を得るための第1の手法 この手法では、スライド辞書と呼ぶ手法を利用し、組み
合わせ個数の多いデータ列の組み合わせを優先的に登録
することにより辞書を生成する。そして、生成された辞
書の登録数を使用頻度情報に基づいて順次削除してゆく
ことで最適な辞書を得る。
(A) First Method for Obtaining Optimal Dictionary In this method, a method called a slide dictionary is used, and a dictionary is generated by preferentially registering combinations of data strings having a large number of combinations. . Then, the optimum dictionary is obtained by sequentially deleting the number of created dictionary registrations based on the usage frequency information.

【0049】まず、スライド辞書と呼ぶ手法について図
3(A)〜(E)を用いて説明する。この手法では、圧
縮対象となる全文字列41を最初から順に対象文字列4
3として作業領域であるメモリ空間上に記憶させてゆ
く。そして、過去の文字列42(最初から対象文字列4
3の前まで)に該対象文字列43と同じ文字列がなかっ
たかを調べる。そして、過去に同じ文字列がなかったな
ら、該対象文字列43の最初の1文字を対象文字列43
から過去の文字列42へと移す(スライドする)。一
方、もし過去に同じ文字列があったなら、次の文字列も
一致するかを調べ、これを繰り返すことにより過去の文
字列42と対象文字列43との間の最長一致文字列(文
字列の組み合わせ個数の最も多いもの)を見つけ出す。
First, a method called a slide dictionary will be described with reference to FIGS. In this method, all the character strings 41 to be compressed are targeted for the target character string 4 in order from the beginning.
3 is stored in the memory space which is the work area. Then, the past character string 42 (target character string 4 from the beginning
It is checked whether there is no same character string as the target character string 43 before 3). If there is no same character string in the past, the first character of the target character string 43 is replaced with the target character string 43.
To the past character string 42 (slide). On the other hand, if there is the same character string in the past, it is checked whether the next character string also matches, and by repeating this, the longest matching character string (character string between the past character string 42 and the target character string 43 (character string The one with the largest number of combinations).

【0050】例えば、圧縮対象となる文字列がABCA
BCDEFであった場合を考える。この場合は、まずA
が対象文字列43となるが、過去に同じ文字列はないた
め、Aは過去の文字列42であるスライド辞書に移され
る(図3(B)参照)。そして、B、Cについても過去
に同じ文字列がないためスライド辞書に移される(図3
(C)参照)。そして、次にAが対象文字列43となる
が、この場合にはAはスライド辞書内にあるため、次の
Bが一致するか否かが調べられる(図3(D)参照)。
そして、この場合は一致するため、次にCが一致するか
否かが調べられる(図3(E)参照)。そして、次にD
が一致するか否かが調べられるが、Dはスライド辞書内
にない。そこで、この場合はABCが最長一致文字列と
される。
For example, if the character string to be compressed is ABCA
Consider the case of BCDEF. In this case, first A
Becomes the target character string 43, but since there is no same character string in the past, A is moved to the slide dictionary which is the past character string 42 (see FIG. 3B). Since B and C do not have the same character string in the past, they are moved to the slide dictionary (FIG. 3).
(See (C)). Then, A becomes the target character string 43 next. In this case, since A is in the slide dictionary, it is checked whether the next B matches (see FIG. 3D).
Then, in this case, since they match, whether or not C matches next is checked (see FIG. 3E). And then D
Are checked for a match, but D is not in the slide dictionary. Therefore, in this case, ABC is the longest matching character string.

【0051】さて、スライド辞書と呼ばれる手法では、
このように最長一致文字列ABCを見つけ出すことによ
り、例えばABCABCDEFという文字列を「A]、
「B」、「C]、「3つ前と3文字同じ」、「D」、
「E」、「F]に圧縮する。具体的には、一致が無い場
合には、その文字列を「一致無しフラッグ=1及びその
文字コード」により表し、一致があった場合には、その
最長一致文字列を「一致無しフラッグ=0及び一致場所
及び一致長」で表すことによりデータ圧縮を行う。
Now, in the method called slide dictionary,
In this way, by finding the longest matching character string ABC, for example, the character string ABCABCDDEF is "A",
"B", "C", "the same as the last three characters", "D",
Compress to “E” and “F.” Specifically, when there is no match, the character string is represented by “no match flag = 1 and its character code”, and when there is a match, Data compression is performed by representing the longest match character string with "no match flag = 0, match location, and match length".

【0052】しかし、本実施例においては、スライド辞
書の手法を、実際のデータ圧縮に利用するのではなく、
圧縮対象文字列の中の最長一致文字列を見つけ出すため
にのみ利用している。そして、本実施例では、最長一致
文字列が見つけ出されると、この最長一致文字列を登録
番号に関連づけて辞書に登録する。上記例では、ABC
が辞書に登録されることになる。このようにして、全て
の圧縮対象文字列の中で2回以上現れる最長一致文字が
見つけ出され、これらが辞書に登録されることになる。
これにより、組む合わせ個数の多い文字列が優先的に辞
書に登録されることになる。
However, in the present embodiment, the slide dictionary method is not used for actual data compression, but
It is used only to find the longest matching string in the string to be compressed. In this embodiment, when the longest matching character string is found, the longest matching character string is registered in the dictionary in association with the registration number. In the above example, ABC
Will be registered in the dictionary. In this way, the longest matching character that appears twice or more in all the compression target character strings is found, and these are registered in the dictionary.
As a result, a character string having a large number of combinations will be preferentially registered in the dictionary.

【0053】なお、スライド辞書手法を用いる場合は過
去の文字列をメモリに記憶しておく必要がある。しか
し、図3(A)に示すようにメモリの容量は有限であり
メモリに記憶できる範囲は有限である。従って、この場
合には過去の文字列42の中においてメモリに記憶でき
る範囲内のものだけがスライド辞書になる。
When the slide dictionary method is used, it is necessary to store past character strings in the memory. However, as shown in FIG. 3A, the capacity of the memory is finite and the range that can be stored in the memory is finite. Therefore, in this case, only the past character string 42 within the range that can be stored in the memory becomes the slide dictionary.

【0054】図4には、スライド辞書手法を利用して最
適な辞書を得る手法を説明するためのフロチャートが示
される。図4に示すように、まず、スライド辞書手法を
用いて圧縮対象文字列の中で2回以上現れる最長一致文
字が見つけ出され、これらを辞書に登録することで辞書
が生成される(ステップB1)。次に、生成された辞書
を用いて、全ての圧縮対象文字列の中から辞書登録文字
列と最長に一致する文字列の組み合わせを見つけ出し、
見つけ出した時点でその登録文字列の使用頻度を1つず
つ増やす(ステップB2)。例えば圧縮対象文字列がA
BCDEFで、登録文字列がABとABCであった場合
は、登録文字列ABCの使用頻度が1つ増やされる。
FIG. 4 shows a flowchart for explaining a method for obtaining an optimum dictionary by using the slide dictionary method. As shown in FIG. 4, the longest matching character that appears twice or more in the compression target character string is first found by using the slide dictionary method, and the dictionary is created by registering these in the dictionary (step B1). ). Next, using the generated dictionary, find a combination of the dictionary registration character string and the longest matching character string from all the compression target character strings,
When found, the frequency of use of the registered character string is increased by one (step B2). For example, the compression target character string is A
In BCDEF, when the registered character strings are AB and ABC, the frequency of use of the registered character string ABC is increased by one.

【0055】このようにして使用頻度を計算した後、次
に、使用頻度の少ない登録文字列から順に例えば100
個程度の登録を削除する(ステップB3)。この場合、
例えば辞書への登録可能数が、4096−256=38
40個であった場合には、全登録数が3840個未満に
ならないように登録の削除を行う。具体的には、例えば
削除前の辞書への全登録数が3900個であった場合に
は60個のみを削除する。
After the frequency of use is calculated in this manner, the registered character string with the lowest frequency of use is next calculated, for example, 100.
The registration of about individual items is deleted (step B3). in this case,
For example, the number that can be registered in the dictionary is 4096-256 = 38.
If the number is 40, the registration is deleted so that the total number of registrations does not fall below 3840. Specifically, for example, when the total number of registrations in the dictionary before deletion is 3,900, only 60 are deleted.

【0056】次に、全登録数が、3840個(所定数)
以下か否かが判断され(ステップB4)、3840個よ
り多い場合には、ステップB2に戻り再度使用頻度が計
算され、ステップB3で100個程度の登録が削除され
る。このようにしてステップB2〜B4を繰り返し、辞
書の登録数を順次少しずつ減らしてゆく。そして、登録
数が3840個となった時点でステップB5に移行す
る。上記のように辞書には例えば3840個登録できる
ため、登録数が3840個となったところで、その辞書
は最適な辞書とされることになる。
Next, the total number of registrations is 3840 (predetermined number).
It is determined whether or not the number is below (step B4). If the number is more than 3840, the process returns to step B2, the usage frequency is calculated again, and about 100 registrations are deleted at step B3. In this way, steps B2 to B4 are repeated, and the number of registered dictionary is gradually decreased little by little. Then, when the number of registrations reaches 3840, the process proceeds to step B5. Since, for example, 3840 can be registered in the dictionary as described above, when the number of registrations reaches 3840, the dictionary becomes an optimum dictionary.

【0057】最後に、この最適な辞書を静的な辞書と
し、この静的辞書により全圧縮対象文字列を圧縮し、最
終的な静的辞書と圧縮データを出力することになる(ス
テップB5、B6)。
Finally, this optimal dictionary is used as a static dictionary, all the character strings to be compressed are compressed by this static dictionary, and the final static dictionary and compressed data are output (step B5, B6).

【0058】(B)最適な辞書を得るための第2の手法 この手法では、出現確率の高い文字列の組み合わせを優
先的に登録することで辞書を生成する。そして、生成さ
れた辞書の登録数を使用頻度情報に基づいて順次削除し
てゆくことで最適な辞書を得る。
(B) Second Method for Obtaining Optimal Dictionary In this method, a dictionary is generated by preferentially registering a combination of character strings having a high appearance probability. Then, the optimum dictionary is obtained by sequentially deleting the number of created dictionary registrations based on the usage frequency information.

【0059】まず、圧縮対象となる全文字列を例えば1
回解析することで各文字列の出現確率を計算する。その
後、この出現確率に基づいて、文字列の組み合わせの出
現確率を求める。
First, all character strings to be compressed are, for example, 1
The occurrence probability of each character string is calculated by performing analysis twice. Then, based on this appearance probability, the appearance probability of the combination of character strings is obtained.

【0060】例えば、上記の解析・計算により、a、
b、c、dの出現確率が、 a;50% b;20% c;10% d; 5% と求まったとする。すると、文字列の組み合わせaa等
の出現確率は、 aa;25% aaa;12.5% ab;10% ba;10% ac;5% ca;5% aab;5% aba;5% baa;5% ad;2.5% ‥‥‥ と計算される。但し、これは文字列間の出現確率に相関
関係が無いと仮定した場合の予想値となるものである。
For example, by the above analysis / calculation, a,
It is assumed that the appearance probabilities of b, c, and d are obtained as a; 50% b; 20% c; 10% d; 5%. Then, the occurrence probability of the combination aa of the character strings is: aa; 25% aaa; 12.5% ab; 10% ba; 10% ac; 5% ca; 5% aab; 5% aba; 5% baa; 5 % Ad; 2.5% is calculated. However, this is an expected value when it is assumed that there is no correlation between the appearance probabilities between the character strings.

【0061】このようにして、文字列の組み合わせの出
現確率を求めた後、この出現確率の高い文字列の組み合
わせから優先的に登録することで辞書を生成する。次
に、例えば図4のステップB2〜B4と同様の手法によ
り、使用頻度の少ない文字列の登録を、辞書の登録が所
定数例えば3840個になるまで削除し、最適な辞書を
生成する。そして、ステップB5、B6と同様の手法に
より、最終的な静的辞書とこれにより圧縮された圧縮デ
ータを出力することになる。以上の手法によれば、初め
の解析が1回の走査で完了できるという利点がある。
In this way, after obtaining the appearance probabilities of the character string combinations, the dictionary is generated by preferentially registering the character string combinations having the high appearance probability. Next, for example, by a method similar to steps B2 to B4 of FIG. 4, the registration of the character string that is less frequently used is deleted until the predetermined number of dictionary registrations, for example 3840, are generated, and an optimum dictionary is generated. Then, the final static dictionary and the compressed data compressed thereby are output by the same method as in steps B5 and B6. According to the above method, there is an advantage that the first analysis can be completed by one scanning.

【0062】(C)最適な辞書を得るための第3の手法 この手法では、増分分解アルゴリズムを利用して最適な
辞書を得る。増分分解アルゴリズムの詳細については、
後述の第2の実施例において加増分解アルゴリズムの対
比において説明する。
(C) Third Method for Obtaining Optimal Dictionary In this method, an optimal dictionary is obtained by using an incremental decomposition algorithm. For more information on the incremental decomposition algorithm,
This will be described in comparison with the additive decomposition algorithm in the second embodiment described later.

【0063】図5には、増分分解アルゴリズムを利用し
て、最適な辞書を得る手法を説明するためのフローチャ
ートが示される。この手法では、まず、辞書の初期化を
行う(ステップC1)。これにより辞書の登録番号0〜
255にだけ登録文字列が登録された状態になる。具体
的には0〜255にはアスキーコードの文字が記憶され
る。次に、圧縮データの出力回数を表すNUM0がNU
M0=0に設定される(ステップC2)。その後、増分
分解アルゴリズムを用いて辞書を更新しながら全圧縮対
象文字列に対するデータ圧縮を行い、圧縮データを出力
すべき時に上記のNUM0の値を1ずつ増やす(ステッ
プC3)。この際、圧縮データ自体は外部に出力しな
い。ステップC3の処理は辞書の更新を目的とする処理
だからである。
FIG. 5 is a flow chart for explaining a method of obtaining an optimum dictionary by using the incremental decomposition algorithm. In this method, first, the dictionary is initialized (step C1). With this, the dictionary registration number 0
The registration character string is registered only in 255. Specifically, the ASCII code characters are stored in 0 to 255. Next, NUM0, which represents the number of times compressed data is output, is NU.
It is set to M0 = 0 (step C2). Then, the dictionary is updated using the incremental decomposition algorithm to perform data compression on all the compression target character strings, and when the compressed data should be output, the value of NUM0 is incremented by 1 (step C3). At this time, the compressed data itself is not output to the outside. This is because the processing in step C3 is intended for updating the dictionary.

【0064】次に、NUM1がNUM1=0に設定され
る(ステップC4)。その後、ステップC3で最終的に
得られた辞書を用いて、ステップC3と同様の処理を行
う。即ち、増分分解アルゴリズムを用いて辞書を更新し
ながら全圧縮対象文字列に対するデータ圧縮を行い、圧
縮データを出力すべき時に上記のNUM1の値を1ずつ
増やす(ステップC5)。そして、この際にも圧縮デー
タ自体は外部に出力しない。
Next, NUM1 is set to NUM1 = 0 (step C4). After that, the same processing as in step C3 is performed using the dictionary finally obtained in step C3. That is, data compression is performed on all compression target character strings while updating the dictionary using the incremental decomposition algorithm, and when the compressed data is to be output, the value of NUM1 is incremented by 1 (step C5). Also in this case, the compressed data itself is not output to the outside.

【0065】次に、NUM1>NUM0か否かが判断さ
れる(ステップC6)。これによりステップC5の処理
によりデータ圧縮率が最適になったか否か、即ち最適な
辞書になったか否かが判断される。そして、NUM1≦
NUM0ならば、まだ最適な辞書ではないとして、NU
M0=NUM1とされ(ステップC7)、ステップC
4、C5の処理が繰り返される。NUM0、NUM1は
圧縮データの出力回数を表し、これが少ないということ
は圧縮データのデータ量も少ないことを意味する。従っ
て、NUM1≦NUM0ということは、ステップC5の
処理でデータ圧縮率が向上したことを意味する。このた
め、この場合には、更にステップC4、C5の処理が繰
り返されることになるわけである。そして、ステップC
6で、NUM1>NUM0となった場合に、データ圧縮
に最適な辞書になったと判断される。
Next, it is determined whether or not NUM1> NUM0 (step C6). As a result, it is determined whether or not the data compression rate has been optimized by the processing of step C5, that is, whether or not the dictionary has been optimized. And NUM1 ≦
If it is NUM0, it is not the best dictionary yet, and NU
M0 = NUM1 is set (step C7), and step C
The processes of 4 and C5 are repeated. NUM0 and NUM1 represent the number of times the compressed data is output, and a small number thereof means that the data amount of the compressed data is also small. Therefore, NUM1 ≦ NUM0 means that the data compression rate is improved in the process of step C5. Therefore, in this case, the processes of steps C4 and C5 are repeated. And step C
If NUM1> NUM0 in step 6, it is determined that the dictionary is optimal for data compression.

【0066】次に、この最適な辞書を静的な辞書とし、
この静的辞書により全圧縮対象文字列が圧縮される(ス
テップC8)。但し、このデータ圧縮の際には、辞書の
更新は行われない。そして、最後に、最終的な静的辞書
と、これにより圧縮された圧縮データが出力されること
になる(ステップC9)。
Next, this optimal dictionary is set as a static dictionary,
All the compression target character strings are compressed by this static dictionary (step C8). However, the dictionary is not updated during this data compression. Then, finally, the final static dictionary and the compressed data thus compressed are output (step C9).

【0067】図6には、以上の処理を視覚的に表したも
のが示される。全圧縮対象文字列21はまず1回目の解
析を受け、これにより暫定的な辞書22が作成される
(この辞書は動的な辞書である)。次に再び全圧縮対象
文字列21は2回目の解析を受け、更新版1の辞書23
が作成される。さらに同様にして更新版2の辞書24が
作成される。このようにして辞書の更新を繰り返し、デ
ータの圧縮率を判定し最適な辞書が得られた段階で、こ
れを決定版の静的辞書25とする。そして、この静的辞
書25により全圧縮対象文字列21の圧縮を再び行う。
但し、この際には、静的辞書25は静的なままであり、
辞書の更新は行わない。そして、この静的辞書25と圧
縮されたデータが外部に出力され、記憶装置に格納され
ることになる。
FIG. 6 shows a visual representation of the above processing. All the compression target character strings 21 are first analyzed, and a temporary dictionary 22 is created by this (this dictionary is a dynamic dictionary). Next, the entire compression target character string 21 is again subjected to the second analysis, and the dictionary 23 of the updated version 1
Is created. Further, similarly, the dictionary 24 of the updated version 2 is created. In this way, the dictionary is repeatedly updated, and when the data compression rate is determined and the optimum dictionary is obtained, this is set as the final static dictionary 25. Then, the static dictionary 25 is used to compress all the compression target character strings 21 again.
However, at this time, the static dictionary 25 remains static,
The dictionary is not updated. Then, the static dictionary 25 and the compressed data are output to the outside and stored in the storage device.

【0068】また、図5、図6に示す手法と、LZWと
の主な相違は以下の通りである。即ち、LZWでは、デ
ータ圧縮後に最終的には圧縮データだけが生成物として
出力され、辞書は動的な辞書であり出力されない。LZ
Wは、電話回線を通じたデータ通信に利用されるデータ
圧縮手法であり、送信側はLZWにより圧縮データを出
力し、受信側がこれを復元する。そして、この復元の際
には、圧縮データの特性を解析し、圧縮データから再び
動的辞書を作成し直しながらデータを復元してゆく必要
がある。従って、圧縮データの最初から順に処理を行っ
ていかなければならなく、復元速度が遅く、また必要な
データ列にランダムにアクセスし復元することはできな
い。従って、LZWにより圧縮されたデータをプリンタ
等のフォントデータに利用することは困難である。
The main differences between the method shown in FIGS. 5 and 6 and LZW are as follows. That is, in LZW, only compressed data is finally output as a product after data compression, and the dictionary is a dynamic dictionary and is not output. LZ
W is a data compression method used for data communication through a telephone line. The transmission side outputs compressed data by LZW, and the reception side restores it. At the time of this restoration, it is necessary to analyze the characteristics of the compressed data and restore the data while recreating the dynamic dictionary from the compressed data. Therefore, the compressed data must be processed sequentially from the beginning, the restoration speed is slow, and a required data string cannot be randomly accessed and restored. Therefore, it is difficult to use the data compressed by LZW for font data of a printer or the like.

【0069】これに対して、図5、図6に示す手法で
は、LZWと異なり、最終的には圧縮データ、静的辞書
の2つが出力される。従って、データの復元をする場合
も再度辞書を作成し直す必要が無いため復元速度が速
い。また、静的辞書を用いているため、圧縮データの中
の所望のデータ列にランダムにアクセスすることもでき
る。なお、このように、復元速度が速い、データ列にラ
ンダムにアクセスできるという利点は、この第3の手法
のみならず前述の第1、第2の手法及び後述の第4の手
法においても得ることができる利点である。
On the other hand, in the method shown in FIGS. 5 and 6, unlike LZW, finally, two data, compressed data and static dictionary, are output. Therefore, even when data is restored, there is no need to recreate the dictionary, so the restoration speed is high. Further, since the static dictionary is used, it is possible to randomly access a desired data string in the compressed data. In addition, the advantage that the restoration speed is fast and the data string can be randomly accessed is obtained not only by the third method but also by the first and second methods described above and the fourth method described later. This is an advantage.

【0070】(D)最適な辞書を得るための第4の手法 この手法では、加増分解アルゴリズムを利用して最適な
辞書を得る。加増分解アルゴリズムについては第2の実
施例において詳述する。しかし、処理の流れ自体は、ス
テップC3、C5でのデータ圧縮が加増分解アルゴリズ
ムにより行われる他は、図5とほぼ同様である。
(D) Fourth Method for Obtaining Optimal Dictionary In this method, the optimal dictionary is obtained using the additive decomposition algorithm. The additive decomposition algorithm will be described in detail in the second embodiment. However, the flow of the process itself is almost the same as that of FIG. 5 except that the data compression in steps C3 and C5 is performed by the additive decomposition algorithm.

【0071】上記の第3の手法では、増分分解アルゴリ
ズムを用いてデータ圧縮が行われるため高圧縮率の圧縮
データを得ることができるが、1文字づつ登録する工程
が存在するため、処理速度は決して早いとは言えず、ま
た、加増分解アルゴリズムと比べると圧縮率は高くな
い。従って、圧縮率を高くする場合には、この加増分解
アルゴリズムを利用する第4の手法を採用することが望
ましい。
In the third method described above, since the data is compressed using the incremental decomposition algorithm, compressed data with a high compression rate can be obtained, but since there is a step of registering each character, the processing speed is high. It is by no means fast, and the compression ratio is not high compared to the additive decomposition algorithm. Therefore, when increasing the compression rate, it is desirable to adopt the fourth method using this additive decomposition algorithm.

【0072】なお、以上の第1〜第4の手法において、
圧縮データは固定ビット長のコードとして出力される。
このコードは、例えば12ビットであったり、16ビッ
トの1ワードであったりする。そして、16ビットの1
ワードとした場合には処理速度が改善されるというメリ
ットを持つ反面、圧縮率は12ビットの場合よりも落ち
るというデメリットを持つ。
In the above first to fourth methods,
The compressed data is output as a fixed bit length code.
This code is, for example, 12 bits or 1 word of 16 bits. And 16-bit 1
The word has a merit that the processing speed is improved, but has a demerit that the compression rate is lower than that of the case of 12 bits.

【0073】以上のように、本実施例によれば、最適な
静的辞書を作成するために、使用頻度に基づいて辞書登
録を削除したり、圧縮時に複数回データを走査する必要
があり、処理時間は長くはなる。しかし、これはユーザ
にとっては全く問題とならない。つまり、圧縮処理を行
うのはデータを例えば書換不可能な記憶装置、記憶媒体
(ROMなど)に書き込む際に必要なものであり、これ
は圧縮後の復元時の処理時間には何ら影響するものでは
ないからである。具体的に言えば、ユーザが、該圧縮方
法により圧縮されたデータを格納した記憶媒体を搭載し
たプリンタを使って印字を行う場合、メーカ側が圧縮デ
ータを作成する時間は多くかかるが、ユーザが印字をさ
せたい場合に行われる復元処理の速度は特に遅くなるこ
とはないからである。
As described above, according to the present embodiment, in order to create the optimum static dictionary, it is necessary to delete the dictionary registration based on the frequency of use or scan the data a plurality of times during compression. Processing time becomes longer. However, this is not a problem for the user. In other words, the compression process is necessary when writing data to, for example, a non-rewritable storage device or storage medium (ROM, etc.), which has no effect on the processing time at the time of restoration after compression. Because not. Specifically, when a user prints using a printer equipped with a storage medium that stores data compressed by the compression method, it takes a lot of time for the manufacturer to create the compressed data, but the user prints the compressed data. This is because the speed of the restoration process that is performed when it is desired to perform is not particularly slow.

【0074】2.第2の実施例 (A)加増分解法 図7には、本第2の実施例で使用されるデータ圧縮方法
(以下、加増分解法あるいは加増分解アルゴリズムと呼
ぶ)を模式的に説明する図が示される。
2. Second Embodiment (A) Additive Decomposition Method FIG. 7 is a diagram schematically illustrating a data compression method (hereinafter referred to as an additive decomposition method or an additive decomposition algorithm) used in the second embodiment. Shown.

【0075】圧縮対象である文字列データ1は、まず作
業用記憶手段である作業用バッファ2にデータの最初の
部分から格納されていく。次に、該作業用バッファ2中
の文字列で辞書3に登録されている文字列が存在しない
かどうかを比較し、存在すれば該辞書3の情報を更新す
ると共に該作業用バッファ2中の文字列を登録番号で置
き換え、該作業用バッファ2に次の対象文字列を追加す
る。一方、登録されている文字列が存在しなければ該作
業用バッファ2中の先頭の2文字を該辞書3に登録し、
先頭の1文字を圧縮データ4として出力する。そして、
該作業用バッファ2に次の対象文字列を追加し、再び該
作業用バッファ2中の文字列で辞書3に登録されている
文字列が存在しないかどうかを比較する。以上の処理を
繰り返すことでデータの圧縮を行う。
The character string data 1 to be compressed is first stored in the work buffer 2 which is the work storage means from the first portion of the data. Next, it is compared whether the character string registered in the dictionary 3 does not exist among the character strings in the working buffer 2, and if there is, the information in the dictionary 3 is updated and the character string in the working buffer 2 is updated. The character string is replaced with the registration number, and the next target character string is added to the work buffer 2. On the other hand, if there is no registered character string, the first two characters in the work buffer 2 are registered in the dictionary 3,
The first character is output as compressed data 4. And
The next target character string is added to the work buffer 2, and it is again compared whether or not the character string in the work buffer 2 registered in the dictionary 3 exists. Data is compressed by repeating the above processing.

【0076】次に、加増分解法を用いて次に示す文字列
データを圧縮対象として処理し、静的辞書と圧縮データ
を得る場合について詳しく説明する。ここで、圧縮対象
となる文字列データは、 「ABCEBCHA、BBCCDBCH、ABCABE
HD、ABBCGABK‥‥」 である。ただし、ここでは書換可能な記憶素子で構成さ
れる辞書の0 〜255 番までには、アスキーコードの文字
データが登録されているとする。また、作業用記憶手段
には、16バイトの容量のバッファを用意したとする。
Next, the case where the following character string data is processed as a compression target by using the additive decomposition method to obtain a static dictionary and compressed data will be described in detail. Here, the character string data to be compressed is "ABCEBCHA, BBCCDCBCH, ABCABE".
HD, ABBCGABK ... ". However, here, it is assumed that ASCII code character data is registered in the numbers 0 to 255 of the dictionary composed of rewritable storage elements. Further, it is assumed that a buffer having a capacity of 16 bytes is prepared in the working storage means.

【0077】(1)最初に、圧縮対象である文字列デー
タの先頭から作業用バッファの容量分(16バイト)の
データを取り込む。すると、作業用バッファ中の文字列
は「ABCEBCHA、BBCCDBCH」になる。こ
こで、各文字はそれぞれ1バイトで表わされる数値デー
タであり、これは前述のようにアスキーコード表に従
う。例えば、" A" は65、”B”は66、”C”は67であ
る。
(1) First, data of the capacity of the working buffer (16 bytes) is fetched from the beginning of the character string data to be compressed. Then, the character string in the working buffer becomes "ABCEBCHA, BBCCBCH". Here, each character is numerical data represented by 1 byte, which follows the ASCII code table as described above. For example, "A" is 65, "B" is 66, and "C" is 67.

【0078】(2)次に、この作業用バッファ中に既に
辞書に登録されている2文字以上の文字列(文字列の組
み合わせ)が存在するかどうかを調べる。しかし、その
ような文字列は登録されていないので、辞書の例えば25
6 番目に先頭の2文字" AB" を、長さは2(文字
分)、データ欄には65+66 (" A" と" B" のアスキー
コード)として登録し、この"256" 番の使用頻度を1回
とする。更に、作業用バッファ中の先頭の1文字" A"
の登録番号”65”を圧縮データとして出力し、作業用バ
ッファ上では消去する。そして、これにより生じた作業
用バッファ上の空欄の1バイトを埋めるようにそれ以降
の文字列をすべて先頭方向にシフトさせ、その結果生じ
る作業用バッファの終端の空白の1バイトには対象の文
字列データの続きから1文字分" A" を取り込む。する
と、作業用バッファの文字列は「BCEBCHAB、B
CCDBCHA」になる。
(2) Next, it is checked whether or not there is a character string (combination of character strings) of two or more characters already registered in the dictionary in this work buffer. However, since such a character string is not registered, for example 25
Register the first two characters "AB" at the 6th position as 2 (characters) in length, and 65 + 66 (ASCII code of "A" and "B") in the data field. Use once. In addition, the first character "A" in the work buffer
The registration number “65” of is output as compressed data and deleted in the work buffer. Then, all the subsequent character strings are shifted toward the beginning so as to fill the blank 1 byte in the work buffer generated by this, and the target character is stored in the resulting blank 1 byte at the end of the work buffer. "A" for one character is fetched from the continuation of the column data. Then, the character string in the working buffer is "BCEBCHAB, B
CCDBCHA ".

【0079】(3)次に、再びこの作業用バッファ中に
既に辞書に登録されている2文字以上の文字列が存在す
るかどうかを調べる。すると、作業用バッファの7、8
文字目に" AB" の文字列が存在しているので、2バイ
ト分の該文字列" AB" を256 の文字に置き換え、辞書
の"256" 番の文字列の使用頻度を2回に更新する。この
置き換えにより作業用バッファには1バイトの空欄が生
じるので、これを埋めるようにそれ以降の文字列をすべ
て先頭方向にシフトさせ、その結果生じる作業用バッフ
ァの終端の空白の1バイトには対象の文字列データの続
きから1文字分" B" を取り込む。すると、作業用バッ
ファ中の文字列は「BCEBCH256 B、CCDBCH
AB」になる。
(3) Next, it is again checked whether or not there is a character string of two or more characters already registered in the dictionary in this work buffer. Then, working buffers 7 and 8
Since the character string "AB" exists in the first character, the character string "AB" for 2 bytes is replaced with 256 characters, and the usage frequency of the character string "256" in the dictionary is updated twice. To do. This replacement creates a blank space of 1 byte in the work buffer, so all the subsequent character strings are shifted toward the beginning so as to fill this blank space, and the resulting blank 1 byte at the end of the work buffer is the target. "B" for one character is fetched from the continuation of the character string data of. Then, the character string in the working buffer is "BCEBCH256B, CCDBCH
It becomes "AB".

【0080】(4)再びこの作業用バッファ中に既に辞
書に登録されている2文字以上の文字列が存在するかど
うかを調べる。すると、作業用バッファの15、16文字目
に"AB" の文字列が存在しているので、2バイト分の
該文字列" AB" を256 の文字に置き換え、辞書の"25
6" 番の文字列の使用頻度を3回に更新する。この置き
換えにより作業用バッファには1バイトの空欄が生じる
ので、これを埋めるようにそれ以降の文字列をすべて先
頭方向にシフトさせ、その結果生じる作業用バッファの
終端の空白の1バイトには対象の文字列データの続きか
ら1文字分" C"を取り込む。すると、作業用バッファ
中の文字列は「BCEBCH256 B、CCDBCH256
C」になる。
(4) It is again checked whether or not there is a character string of two or more characters already registered in the dictionary in this work buffer. Then, since the character string "AB" exists in the 15th and 16th characters of the working buffer, the character string "AB" for 2 bytes is replaced with 256 characters, and "25" in the dictionary
Updates the frequency of use of the 6 "string to 3 times. This replacement creates a blank space of 1 byte in the working buffer. To fill this, shift all subsequent strings to the beginning, As a result, one character "C" is fetched from the continuation of the target character string data into the blank 1 byte at the end of the working buffer, and the character string in the working buffer becomes "BCEBCH256 B, CCDBCH256.
C ”.

【0081】(5)再びこの作業用バッファ中に既に辞
書に登録されている2文字以上の文字列が存在するかど
うかを調べる。しかし、そのような文字列は登録されて
いないので、辞書の例えば257 番目に先頭の2文字" B
C" を、長さは2(文字分)、データ欄には66+67 とし
て登録し、この"257" 番の使用頻度を1回とする。さら
に、作業用バッファ中の先頭の1文字" B" の登録番
号"66"を圧縮データとして出力し、作業用バッファ上で
は消去し、これにより生じた作業用バッファ上の空欄の
1バイトを埋めるようにそれ以降の文字列をすべて先頭
方向にシフトさせ、その結果生じる作業用バッファの終
端の空白の1バイトには対象の文字列データの続きから
1文字分" A" を取り込む。すると、作業用バッファの
文字列は「CEBCH256 BC、CDBCH256 CA」
になる。
(5) It is again checked whether or not there is a character string of two or more characters already registered in the dictionary in this work buffer. However, since such a character string has not been registered, the first two characters "B
C "is registered as 2 (characters) in length and 66 + 67 in the data field, and the frequency of use of this" 257 "is once. In addition, the first character in the work buffer is" The registration number "66" of B "is output as compressed data, erased in the work buffer, and all the subsequent character strings are moved toward the beginning so as to fill the empty 1 byte in the work buffer. The character string "A" from the continuation of the target character string data is fetched into the blank 1 byte at the end of the work buffer resulting from the shift, and the character string in the work buffer becomes "CEBCH256 BC, CDBCH256 CA. "
become.

【0082】(6)再びこの作業用バッファ中に既に辞
書に登録されている2文字以上の文字列が存在するかど
うかを調べる。すると、作業用バッファの3 、4 文字
目、7、8 文字目、および11、12文字目に" BC" の文
字列が存在しているので、合計6バイト分の該文字列"
BC" をそれぞれ257 の文字に置き換え、辞書の"257"
番の文字列の使用頻度を4回に更新する。この置き換え
により作業用バッファには3バイトの空欄が生じるの
で、これを埋めるようにそれ以降の文字列をすべて先頭
方向にシフトさせ、その結果生じる作業用バッファの終
端の空白の3バイトには対象の文字列データの続きから
3文字分" BEH" を取り込む。すると、作業用バッフ
ァ中の文字列は「CE257 H256257CD、257 H256 C
ABEH」になる。
(6) It is again checked whether or not there is a character string of two or more characters already registered in the dictionary in this work buffer. Then, since the character string of "BC" exists at the 3rd, 4th, 7th, 8th, and 11th and 12th characters of the working buffer, the character string of 6 bytes in total "
Replace "BC" with 257 characters each, "257" in the dictionary
Update the frequency of use of the string No. to 4 times. This replacement creates a 3-byte blank in the work buffer, so all the subsequent character strings are shifted toward the beginning so as to fill this space, and the resulting blank 3 bytes at the end of the work buffer are affected. "BEH" for 3 characters is taken in from the continuation of the character string data of. Then, the character string in the work buffer is "CE257 H256257CD, 257 H256 C
ABEH ”.

【0083】(7)再びこの作業用バッファ中に既に辞
書に登録されている2文字以上の文字列が存在するかど
うかを調べる。すると、作業用バッファの13、14文字目
に"AB" の文字列が存在しているので、2バイト分の
該文字列" AB" を256 の文字に置き換え、辞書の"25
6" 番の文字列の使用頻度を4回に更新する。この置き
換えにより作業用バッファには1バイトの空欄が生じる
ので、これを埋めるようにそれ以降の文字列をすべて先
頭方向にシフトさせ、その結果生じる作業用バッファの
終端の空白の1バイトには対象の文字列データの続きか
ら1文字分" D"を取り込む。すると、作業用バッファ
中の文字列は「CE257 H256257CD、257 H256 C25
6 EHD」になる。
(7) It is again checked whether or not there is a character string of two or more characters already registered in the dictionary in this work buffer. Then, since the character string "AB" exists at the 13th and 14th characters of the working buffer, the character string "AB" of 2 bytes is replaced with 256 characters, and "25" of the dictionary is used.
Updates the frequency of use of the 6 "string to 4 times. This replacement creates a 1-byte blank in the working buffer. To fill this, shift all subsequent strings to the beginning, The resulting blank 1 byte at the end of the working buffer contains "D" for one character from the continuation of the target character string data, and the character string in the working buffer is "CE257 H256257CD, 257 H256 C25.
6 EHD ”.

【0084】(8)再びこの作業用バッファ中に既に辞
書に登録されている2文字以上の文字列が存在するかど
うかを調べる。しかし、そのような文字列は登録されて
いないので、辞書の例えば258 番目に先頭の2文字" C
E" を、長さは2(文字分)、データ欄には67+69 とし
て登録し、この"258" 番の使用頻度を1回とする。さら
に、作業用バッファ中の先頭の1文字" C" の登録番
号"67"を圧縮データとして出力し、作業用バッファ上で
は消去し、これにより生じた作業用バッファ上の空欄の
1バイトを埋めるようにそれ以降の文字列をすべて先頭
方向にシフトさせ、その結果生じる作業用バッファの終
端の空白の1バイトには対象の文字列データの続きから
1文字分" A" を取り込む。すると、作業用バッファの
文字列は「E257 H256257CD257 、H256 C256 EH
DA」になる。
(8) It is again checked whether or not there is a character string of two or more characters already registered in the dictionary in this work buffer. However, since such a character string is not registered, the first two characters "C
E "is registered as 2 (characters) in length and 67 + 69 in the data field, and the usage frequency of this" 258 "is once. In addition, the first character in the work buffer is" The registration number "67" of C "is output as compressed data, erased in the work buffer, and all the subsequent character strings are moved toward the beginning so as to fill the blank 1 byte in the work buffer. The character string "A" from the continuation of the target character string data is taken into the blank 1 byte at the end of the work buffer resulting from the shift, and the character string in the work buffer becomes "E257 H256257CD257, H256 C256. EH
DA ”.

【0085】(9)再びこの作業用バッファ中に既に辞
書に登録されている2文字以上の文字列が存在するかど
うかを調べる。しかし、そのような文字列は登録されて
いないので、辞書の例えば259 番目に先頭の2文字" E
257"を、長さは2(文字分)、データ欄には69+257とし
て登録し、この"259" 番の使用頻度を1回とする。更
に、作業用バッファ中の先頭の1文字" E" の登録番
号"69"を圧縮データとして出力し、作業用バッファ上で
は消去し、これにより生じた作業用バッファ上の空欄の
1バイトを埋めるようにそれ以降の文字列をすべて先頭
方向にシフトさせ、その結果生じる作業用バッファの終
端の空白の1バイトには対象の文字列データの続きから
1文字分" B" を取り込む。すると、作業用バッファの
文字列は「257 H256257CD257 、H256 C256 EHD
AB」になる。
(9) It is again checked whether or not there is a character string of two or more characters already registered in the dictionary in this work buffer. However, since such a character string is not registered, the first two characters "E
257 "is registered as 2 (characters) in length and 69 + 257 in the data field, and the usage frequency of this" 259 "is once. In addition, the first character in the work buffer is" The registration number "69" of E "is output as compressed data, erased in the work buffer, and all the subsequent character strings are moved toward the beginning so as to fill the blank 1 byte in the work buffer caused by this. The character string "B" is fetched from the continuation of the target character string data into the blank 1 byte at the end of the work buffer resulting from the shift, and the character string of the work buffer is "257 H256257CD257, H256 C256. EHD
It becomes "AB".

【0086】(10)再びこの作業用バッファ中に既に
辞書に登録されている2文字以上の文字列が存在するか
どうかを調べる。すると、作業用バッファの15、16文字
目に" AB" の文字列が存在しているので、2バイト分
の該文字列" AB" を256 の文字に置き換え、辞書の"2
56" 番の文字列の使用頻度を4回に更新する。この置き
換えにより作業用バッファには1バイトの空欄が生じる
ので、これを埋めるようにそれ以降の文字列をすべて先
頭方向にシフトさせ、その結果生じる作業用バッファの
終端の空白の1バイトには対象の文字列データの続きか
ら1文字分" B" を取り込む。すると、作業用バッファ
中の文字列は「257 H256257CD257 、H256 C256 E
HD256 B」になる。
(10) It is again checked whether or not there is a character string of two or more characters already registered in the dictionary in this work buffer. Then, since the character string "AB" exists in the 15th and 16th characters of the working buffer, the character string "AB" for 2 bytes is replaced with 256 characters, and "2" in the dictionary is used.
Update the frequency of use of the 56 "string to 4 times. This replacement creates a 1-byte blank in the work buffer. To fill this, shift all the subsequent strings to the beginning, The resulting blank 1 byte at the end of the working buffer is "B" for one character from the continuation of the target character string data.Then, the character string in the working buffer is "257 H256257CD257, H256 C256 E
HD256 B ”.

【0087】(11)再びこの作業用バッファ中に既に
辞書に登録されている2文字以上の文字列が存在するか
どうかを調べる。しかし、そのような文字列は登録され
ていないので、辞書の例えば260 番目に先頭の2文字"2
57H" を、長さは2(文字分)、データ欄には257+72と
して登録し、この"260" 番の使用頻度を1回とする。更
に、作業用バッファ中の先頭の1文字"257" を圧縮デー
タとして出力し、作業用バッファ上では消去し、これに
より生じた作業用バッファ上の空欄の1バイトを埋める
ようにそれ以降の文字列をすべて先頭方向にシフトさ
せ、その結果生じる作業用バッファの終端の空白の1バ
イトには対象の文字列データの続きから1文字分" C"
を取り込む。すると、作業用バッファの文字列は「H25
6257CD257 H、256 C256 EHD256 BC」になる。
(11) It is again checked whether or not there is a character string of two or more characters already registered in the dictionary in this work buffer. However, since such a character string is not registered, the first two characters "2
57H "is registered as 2 (characters) in length and 257 + 72 in the data field, and the usage frequency of this" 260 "is once. Furthermore, the first character in the work buffer is" Outputs "257" as compressed data, erases it in the work buffer, shifts all subsequent character strings toward the beginning so as to fill the blank 1 byte in the work buffer, which results One character "C" from the continuation of the target character string data in the blank 1 byte at the end of the work buffer
Take in. Then, the character string in the working buffer is "H25
6257CD257 H, 256 C256 EHD256 BC ”.

【0088】(12)再びこの作業用バッファ中に既に
辞書に登録されている2文字以上の文字列が存在するか
どうかを調べる。すると、作業用バッファの7 、8 文字
目に"257H" の文字列が、15、16文字目に" BC" の文
字列が、それぞれ存在しているので、合計4バイト分の
該文字列"257H" を260 に、該" BC" を257 に置き換
え、辞書の"260" の使用頻度を2 回に"257" の使用頻度
を5回に更新する。この置き換えにより作業用バッファ
には2バイトの空欄が生じるので、これを埋めるように
それ以降の文字列をすべて先頭方向にシフトさせ、その
結果生じる作業用バッファの終端の空白の2バイトには
対象の文字列データの続きから2文字分" GA" を取り
込む。すると、作業用バッファ中の文字列は「H256257
CD260256C、256 EHD256257GA」になる。
(12) It is again checked whether or not there is a character string of two or more characters already registered in the dictionary in this work buffer. Then, since the character string of "257H" exists in the 7th and 8th characters of the working buffer and the character string of "BC" exists in the 15th and 16th characters, respectively, the character string of 4 bytes in total. 257H "is replaced with 260, and" BC "is replaced with 257, and the frequency of use of" 260 "in the dictionary is updated twice and the frequency of use of" 257 "is updated five times. This replacement creates a 2-byte blank in the work buffer, so all the subsequent character strings are shifted toward the beginning so as to fill this blank space, and the resulting blank 2 bytes at the end of the work buffer are affected. "GA" for 2 characters is taken in from the continuation of the character string data of. Then, the character string in the work buffer is "H256257".
CD260256C, 256 EHD256257GA ".

【0089】(13)再びこの作業用バッファ中に既に
辞書に登録されている2文字以上の文字列が存在するか
どうかを調べる。しかし、そのような文字列は登録され
ていないので、辞書の例えば261 番目に先頭の2文字"
H256"を、長さは3(文字分)、データ欄には72+256と
して登録し、この"261" 番の使用頻度を1回とする。更
に、作業用バッファ中の先頭の1文字" H" の登録番
号"72"を圧縮データとして出力し、作業用バッファ上で
は消去し、これにより生じた作業用バッファ上の空欄の
1バイトを埋めるようにそれ以降の文字列をすべて先頭
方向にシフトさせ、その結果生じる作業用バッファの終
端の空白の1バイトには対象の文字列データの続きから
1文字分" B" を取り込む。すると、作業用バッファの
文字列は「256257CD260256C256 、EHD256257GA
B」になる。
(13) It is again checked whether or not there is a character string of two or more characters already registered in the dictionary in this work buffer. However, since such a character string is not registered, the first two characters "
H256 "is registered as 3 (characters) in length and 72 + 256 in the data field, and the usage frequency of this" 261 "is once. Furthermore, the first character in the work buffer" The registration number "72" of H "is output as compressed data, erased in the work buffer, and all the subsequent character strings are moved toward the beginning so as to fill the blank 1 byte in the work buffer. The character string "B" is fetched from the continuation of the target character string data into the blank 1 byte at the end of the work buffer resulting from the shift.
B ”.

【0090】(14)再びこの作業用バッファ中に既に
辞書に登録されている2文字以上の文字列が存在するか
どうかを調べる。しかし、そのような文字列は登録され
ていないので、辞書の例えば262 番目に先頭の2文字"2
56257"を、長さは4(文字分)、データ欄には256+257
として登録し、この"262" 番の使用頻度を1回とする。
更に、作業用バッファ中の先頭の1文字"256" を圧縮デ
ータとして出力し、作業用バッファ上では消去し、これ
により生じた作業用バッファ上の空欄の1バイトを埋め
るようにそれ以降の文字列をすべて先頭方向にシフトさ
せ、その結果生じる作業用バッファの終端の空白の1バ
イトには対象の文字列データの続きから1文字分" K"
を取り込む。すると、作業用バッファの文字列は「257
CD260256C256 E、HD256257GABK」になる。
(14) It is again checked whether or not there is a character string of two or more characters already registered in the dictionary in this work buffer. However, since such a character string is not registered, the first two characters "2
56257 ", length is 4 (characters), data field is 256 + 257
, And the usage frequency of this "262" is once.
In addition, the first character "256" in the work buffer is output as compressed data, erased in the work buffer, and the subsequent characters are filled so as to fill the empty 1 byte in the work buffer. All columns are shifted toward the beginning, and the resulting blank 1 byte at the end of the work buffer is one character "K" from the continuation of the target character string data.
Take in. Then, the character string of the work buffer is "257
CD260256C256 E, HD256257GABK ".

【0091】(15)再びこの作業用バッファ中に既に
辞書に登録されている2文字以上の文字列が存在するか
どうかを調べる。すると、作業用バッファの11、12文字
目に"256257"の文字列が存在しているので、該"256257"
を262 に置き換え、辞書の"262" の使用頻度を2 回に更
新する。この置き換えにより作業用バッファには1バイ
トの空欄が生じるので、これを埋めるようにそれ以降の
文字列をすべて先頭方向にシフトさせ、その結果生じる
作業用バッファの終端の空白の1バイトには対象の文字
列データの続きから1文字を取り込む。すると、作業用
バッファ中の文字列は「257 CD260256C256 E、HD
262 GABK・」になる。
(15) It is again checked whether or not there is a character string of two or more characters already registered in the dictionary in this work buffer. Then, since the character string "256257" exists in the 11th and 12th characters of the work buffer, the "256257"
Replaces 262 with 262 and updates the dictionary "262" usage frequency to twice. This replacement creates a blank space of 1 byte in the work buffer, so all the subsequent character strings are shifted toward the beginning so as to fill this blank space, and the resulting blank 1 byte at the end of the work buffer is the target. 1 character is fetched from the continuation of the character string data of. Then, the character string in the working buffer is "257 CD260256C256 E, HD
262 GABK. "

【0092】このように本実施例の加増分解法によれ
ば、作業用バッファの文字列の長さを常に一定に保つよ
うに圧縮対象の文字列データから順次データを取り込む
ようになっている。そして、該作業用バッファ内の先頭
からの相隣り合う文字列の組み合わせが辞書に登録され
ていればこれを辞書の登録番号に置き換えることで圧縮
を実行する。更に、この文字列の組み合わせが作業用バ
ッファの中に含まれていればこれをも辞書の登録番号に
置き換えることでさらに圧縮を実行している。従って、
従来の増分分解法の場合よりも圧縮データのデータ量が
削減され、結果的に圧縮データを少ない記憶容量で格納
することが可能となる。なお、圧縮データは、作業用バ
ッファ内の先頭からの相隣り合う文字列の組み合わせが
辞書に登録されていない場合に、該文字列の組み合わせ
を辞書登録した後に、出力されることになる。
As described above, according to the additive decomposition method of this embodiment, data is sequentially fetched from the character string data to be compressed so that the length of the character string in the working buffer is always kept constant. Then, if a combination of adjacent character strings from the beginning in the work buffer is registered in the dictionary, this is replaced with the registration number of the dictionary to perform compression. Further, if this combination of character strings is contained in the work buffer, it is also replaced with the registration number of the dictionary to perform further compression. Therefore,
The data amount of the compressed data is reduced as compared with the case of the conventional incremental decomposition method, and as a result, the compressed data can be stored with a small storage capacity. It should be noted that the compressed data will be output after the combination of the character strings is registered in the dictionary when the combination of the adjacent character strings from the beginning in the work buffer is not registered in the dictionary.

【0093】以上の処理をツリー構造を用いて模式的に
表わすと図8(A)のようになる。図8(A)では、上
記の説明に用いた(1)〜(15)に合わせて番号を付
している。但し、(1)、(10)、(12)、(1
5)については図8(A)には示していない。
The above processing is schematically shown using a tree structure as shown in FIG. In FIG. 8 (A), the numbers are assigned according to (1) to (15) used in the above description. However, (1), (10), (12), (1
5) is not shown in FIG.

【0094】例えば、”AB”を辞書登録し、”A”を
出力する上記(2)の工程は、図8(A)において以下
のように表現される。即ち、図8(A)において、上矢
印の先に”AB”とすることで辞書登録することを表現
する。また、下矢印の先に”A”とすることで該文字を
圧縮データとして出力することを表現する。更に、これ
らの上矢印、下矢印の近くに工程の番号”2”を付すこ
とで、当該処理が工程(2)の処理であることを表現す
る。
For example, the step (2) of registering "AB" in the dictionary and outputting "A" is expressed as follows in FIG. 8A. That is, in FIG. 8A, the dictionary registration is expressed by setting "AB" at the tip of the up arrow. Also, the character "A" is added to the end of the down arrow to express that the character is output as compressed data. Further, by adding a process number "2" near these up and down arrows, it is expressed that the process is the process (2).

【0095】また、上記(3)の工程のように辞書に登
録されている文字”AB”を作業用バッファ中に見つ
け、これを登録番号で置き換える場合は、該置き換える
べき文字列の上を括り、そこに該処理が行われる工程の
番号”3”を付している。
When the character "AB" registered in the dictionary is found in the work buffer and replaced by the registration number as in the step (3) above, the character string to be replaced is grouped over the character string to be replaced. , The process number "3" is added to the process.

【0096】因みに本実施例の場合、圧縮済みの出力デ
ータは以下のようになる。 「A、B、C、E、257 、H、256 、257 、C、・・
・」 また、辞書には結局次のような文字列が登録されること
になる。 0 〜255 アスキーコード 256 AB 257 BC 258 CE 259 E257 260 257 H 261 H256 262 256 257 ‥ ‥‥‥ (B)増分分解法 次に、前記の例と同じ以下の文字列データを従来の増分
分解法を用いた方法により処理し、辞書と圧縮データを
得る場合について説明する。ただし、ここでも辞書には
最初からアスキーコードの文字を0 〜255 番に登録して
いたとする。 「ABCEBCHA、BBCCDBCH、ABCABE
HD、ABBCGABK‥‥」 (1)送られてくる文字列は上記に示した加増分解法の
ように、一定のバイト分づつ作業用バッファに一旦格納
されることはなく、先頭部分の必要最低限の文字列のみ
が作業用バッファに取り込まれる。そこで、この作業用
バッファ中の1文字目" A" が辞書に登録されているか
どうかを調べる。すると、該" A" は辞書の65番目に登
録されているので、その使用頻度のカウント数を1にす
る。
Incidentally, in the case of the present embodiment, the compressed output data is as follows. "A, B, C, E, 257, H, 256, 257, C, ...
.. Also, the following character strings will be registered in the dictionary. 0 to 255 ASCII code 256 AB 257 BC 258 CE 259 E257 260 257 H 261 H256 262 256 257 (B) Incremental decomposition method Next, the same character string data as the above example is converted into the conventional incremental decomposition method. A case where the dictionary and the compressed data are obtained by processing by the method using is described. However, here again, it is assumed that the ASCII code characters 0 to 255 are registered in the dictionary from the beginning. "ABCEBCHA, BBCCDBCH, ABCABE
HD, ABBCGABK ... "(1) The character string sent is not once stored in the work buffer in fixed bytes, as in the additive decomposition method described above, but the minimum required for the beginning part. Only the character string of is taken into the working buffer. Therefore, it is checked whether or not the first character "A" in this work buffer is registered in the dictionary. Then, since the "A" is registered at the 65th position in the dictionary, the count number of its use frequency is set to 1.

【0097】(2)次に、2文字目" B" を加え、この
作業用バッファ中の文字" AB" が辞書に登録されてい
るかどうかを調べる。しかし、2文字以上の文字列で辞
書にすでに登録されているものは見つからない。そこ
で、先頭の2文字" AB" を番号の256 番目に、長さは
2(文字分)、データ欄には65+66 として登録し、辞書
の"256" の使用頻度を1回と記す。次に、作業用バッフ
ァ中の先頭の該" A" を圧縮データとして出力し、次は
対象となる文字列データの2文字目" B" から注目す
る。
(2) Next, the second character "B" is added, and it is checked whether or not the character "AB" in this work buffer is registered in the dictionary. However, a character string of two or more characters already registered in the dictionary cannot be found. Therefore, the first two characters "AB" are registered in the 256th position of the number, the length is 2 (characters), and 65 + 66 is registered in the data field, and the usage frequency of "256" in the dictionary is described as once. Next, the leading "A" in the working buffer is output as compressed data, and next, attention is paid to the second character "B" of the target character string data.

【0098】(3)新しい1文字目" B" が辞書に登録
されているかどうかを調べる。すると、該" B" は辞書
の66番目に登録されているので、その使用頻度のカウン
ト数を1にする。
(3) Check if the new first character "B" is registered in the dictionary. Then, since the "B" is registered at the 66th position in the dictionary, the count number of its use frequency is set to 1.

【0099】(4)次に、新しい2文字目" C" を加
え、この作業用バッファ中の文字" BC" が辞書に登録
されているかどうかを調べる。しかし、また2文字以上
の文字列で辞書にすでに登録されている文字列は見つか
らない。そこで、先頭の2文字" BC" を番号の257 番
目に、長さは2(文字分)、データ欄には66+67 として
登録し、辞書の"257" の使用頻度を1回と記す。次に、
作業用バッファ中の先頭の該" B" を 圧縮データとし
て出力し、次は対象の文字列データの3文字目"C" か
ら注目する。
(4) Next, a new second character "C" is added to check whether or not the character "BC" in this working buffer is registered in the dictionary. However, a character string that is already registered in the dictionary with a character string of two or more characters cannot be found. Therefore, the first two characters "BC" are registered as the 257th number, the length is 2 (characters), and 66 + 67 is registered in the data field, and the usage frequency of "257" in the dictionary is once. next,
The leading "B" in the work buffer is output as compressed data, and next, attention is paid from the third character "C" of the target character string data.

【0100】(5)これと同様の操作が最初から4文字
目のEまで続き、" EB" が登録されたあと、作業用バ
ッファ中の新しい1文字目" B" が辞書に登録されてい
るかどうかを調べる。しかし、該" B" は辞書の66番目
に登録されているので、その使用頻度のカウント数を今
度は2にする。
(5) Whether the same operation as above continues from the beginning up to the fourth character E, "EB" is registered, and then the new first character "B" in the working buffer is registered in the dictionary. Find out. However, since the "B" is registered at the 66th position in the dictionary, the count number of its use frequency is set to 2 this time.

【0101】(6)次に、新しい2文字目" C" を加
え、この作業用バッファ中の文字列"BC" が辞書に登
録されているかどうかを調べる。すると今度は、辞書
の"257"番目に" BC" の文字が登録されているので、
その使用頻度を2回と記し、さらに新しい3文字目を加
えた文字列" BCH" が辞書に登録されているかどうか
を調べる。
(6) Next, a new second character "C" is added to check whether or not the character string "BC" in this working buffer is registered in the dictionary. Then, since the character "BC" is registered at the "257" th position in the dictionary,
The frequency of use is described as twice, and it is checked whether or not the character string "BCH" to which a new third character is added is registered in the dictionary.

【0102】(7)すると、これは登録されていないの
で、この2文字列" BCH" を番号の260 番目に、長さ
は3(文字分)、データ欄には257+72として登録し、辞
書の"260" の使用頻度を1回と記す。次に、先頭の" B
C" の登録番号"257" を圧縮データとして出力し、次は
対象の文字列データの7文字目" H" から注目する。
(7) Then, this is not registered, so register this 2 character string "BCH" as the 260th number, the length is 3 (characters), and 257 + 72 in the data field, The usage frequency of "260" in the dictionary is described as once. Next, at the beginning "B
The registration number "257" of C "is output as compressed data, and next, attention is given to the seventh character" H "of the target character string data.

【0103】図9には、以上の増分分解法の動作を説明
するためのフロチャートを参考として示す。
FIG. 9 shows, as a reference, a flow chart for explaining the operation of the above incremental decomposition method.

【0104】このようにして増分分解法は行われてゆく
が、本実施例の加増分解法との大きな違いは処理対象の
文字列データを先頭から1文字づつ取り込み、辞書との
一致を見て行くことである。
Although the incremental decomposition method is performed in this way, the major difference from the incremental decomposition method of the present embodiment is that the character string data to be processed is fetched one character at a time from the beginning, and the agreement with the dictionary is checked. Is to go.

【0105】以上の処理を図8(A)の例と同様にツリ
ー構造を用いて模式的に表わすと図8(B)のようにな
る。ただし、図中の1〜8の番号は上記の工程の説明で
用いられた番号には沿っていない。ここで、例えば、”
AB”を辞書登録し、”A”を出力する1の工程では、
上矢印の先に”AB”とすることで辞書登録を表すこと
とし、下矢印の先に”A”とすることで該文字を圧縮デ
ータとして出力することを表すこととする。
The above processing is schematically shown in FIG. 8B using a tree structure as in the example of FIG. 8A. However, the numbers 1 to 8 in the figure do not follow the numbers used in the above description of the steps. Here, for example,
In the first step of registering "AB" in the dictionary and outputting "A",
The word "AB" at the tip of the up arrow indicates dictionary registration, and the character "A" at the tip of the down arrow indicates that the character is output as compressed data.

【0106】さて、図8(B)から理解されるように、
従来の増分分解法では、図8(A)の(3)の工程のよ
うに辞書に登録されている文字”AB”を作業用バッフ
ァ中の先頭以外の途中に見つけ、これを登録番号で置き
換える工程は有り得ない。有り得るのは、図8(B)の
5の工程のように、ただ辞書に登録してある文字列の右
側に新しい1文字を加え、その上を括ることで新しい文
字列を作り出すことのみである。
Now, as can be understood from FIG. 8 (B),
In the conventional incremental decomposition method, the character "AB" registered in the dictionary is found somewhere other than the beginning in the working buffer and replaced with the registration number, as in step (3) of FIG. 8A. There can be no process. All that is possible is to add a new character to the right side of the character string registered in the dictionary and wrap it up to create a new character string, as in step 5 of FIG. 8 (B). .

【0107】因みに、この増分分解法による圧縮済みの
出力データは以下のようになる。 「A、B、C、E、257 、H、256 、257 、C、D、25
7 、H、256 、・・・」 また、辞書には結局次のような文字列が登録されること
になる。 0 〜255 アスキーコード 256 AB 257 BC 258 CE 259 EB 260 257 H 261 HA 262 256 B 263 257 C 264 CD 265 DB 266 260 A ‥ ‥‥‥ 図8(A)と図8(B)を比較した場合、例に示す範囲
においては出力される圧縮データは同じものとなるが、
辞書に登録される文字列は確実に異なっており、注目す
る文字列が圧縮対象の文字列データの後に行くほど違い
がでてくる。
Incidentally, the compressed output data by this incremental decomposition method is as follows. "A, B, C, E, 257, H, 256, 257, C, D, 25
7, H, 256, ... ”In addition, the following character strings are eventually registered in the dictionary. 0 to 255 ASCII code 256 AB 257 BC 258 CE 259 EB 260 257 H 261 HA 262 256 B 263 257 C 264 CD 265 DB 266 260 A ... When comparing FIG. 8 (A) and FIG. 8 (B) , In the range shown in the example, the output compressed data is the same,
The character strings registered in the dictionary are definitely different, and the more the target character string goes after the character string data to be compressed, the more different the character string becomes.

【0108】このように、従来の増分分解法では1文字
づつしか増やしていけないために特に図10(A)、
(B)で示すような同じ文字列が連続する文字列データ
については、本実施例の加増分解法とは大きな違いが生
じ、加増分解法の方が少ない記憶容量で記憶することが
可能になる。
As described above, since the conventional incremental decomposition method can increase only one character at a time, in particular, as shown in FIG.
Regarding character string data in which the same character string is continuous as shown in (B), there is a big difference from the additive decomposition method of the present embodiment, and the additive decomposition method can be stored with a smaller storage capacity. .

【0109】図10(A)には、本実施例の加増分解法
により連続する文字列を圧縮する場合が示され、図10
(B)には増分分解法により連続する文字列を圧縮する
場合が示される。図10(B)の増分分解法の場合、辞
書にはA,AA,AAA,AAAA,AAAAA,AA
AAAA,…の順で登録が行われていくため、Aの文字
16バイト分を圧縮処理するのに16回の出力と17回の辞書
登録を行わなければならない。一方、図10(A)の本
実施例の加増分解法の場合、辞書にはA,AA,AAA
A,AAAAAAAA,AAAAAAAAAAAAAA
AA,…の順で登録が行われていくため、Aの文字16バ
イト分を圧縮処理するのにわずか5回の出力と6回の辞
書登録を行うだけで済むことになる。
FIG. 10A shows the case where a continuous character string is compressed by the additive decomposition method of this embodiment.
(B) shows a case where consecutive character strings are compressed by the incremental decomposition method. In the case of the incremental decomposition method of FIG. 10 (B), the dictionary contains A, AA, AAA, AAAA, AAAAA, AA.
Since registration is performed in the order of AAAA, ...
To compress 16 bytes, 16 outputs and 17 dictionary entries must be done. On the other hand, in the case of the additive decomposition method of this embodiment shown in FIG. 10A, the dictionary contains A, AA, and AAA.
A, AAAAAAAA, AAAAAAAAAAAAAAA
Since the registration is performed in the order of AA, ..., Only the output of 5 times and the dictionary registration of 6 times are required to compress the 16-byte character of A.

【0110】このように、同じ文字が連続する文字列デ
ータの場合は、本実施例の加増分解法の効果は明らかで
あり、その圧縮率は従来の増分分解法と比べて非常に高
くなる。これは言い替えれば、同じ量の文字列データを
処理するのに少ない出力回数で済むことを意味する。そ
して、出力時における文字列は必ず辞書の登録番号の固
定長バイトに置き換えられて出力されるため、少ない出
力回数は少ないバイト数を示し、圧縮データが少ないと
いうことを意味することになる。
As described above, in the case of character string data in which the same characters are continuous, the effect of the additive decomposition method of this embodiment is clear, and the compression rate thereof is much higher than that of the conventional incremental decomposition method. In other words, this means that the same number of output times is required to process the same amount of character string data. Since the character string at the time of output is always replaced with the fixed length byte of the registration number of the dictionary and is output, the small number of times of output indicates a small number of bytes, which means that the compressed data is small.

【0111】(C)最適な辞書の生成 以上説明した加増分解法による処理は、前述の図6と同
様に、全圧縮対象文字列に対して複数回行われ、これに
より文字列データを最も効率よく圧縮できる最適な辞書
が生成される。以下、この辞書の最適化処理について図
11、図12を用いて説明する。
(C) Generation of Optimal Dictionary Like the above-mentioned FIG. 6, the processing by the additive decomposition method described above is performed a plurality of times for all character strings to be compressed, which makes the character string data most efficient. The optimal dictionary that can be compressed well is generated. The dictionary optimization process will be described below with reference to FIGS. 11 and 12.

【0112】図11のフロチャートは、辞書を最適化す
るために加増分解法により行われる1回のパスの処理が
示される。ここで、1回のパスとは、全ての文字列が作
業バッファに格納され全ての文字列に対して処理が行わ
れるまでをいう。図11では、まず、NUM=0とされ
る(ステップE1)。次に、buf1、buf2(作業
バッファ内の1番目、2番目)に格納される文字列の組
み合わせ(即ちAB)が辞書に登録されているか否かが
調べられる(ステップE2)。登録されていると判断さ
れた場合には、このbuf1、buf2に格納される文
字列の組み合わせを辞書の登録番号に置き換え、この置
き換えにより空きが生じたbuf16に次の文字列(即
ちB)を格納する(ステップE3)。その後、ステップ
E2に戻り、再度buf1、buf2の文字列の組み合
わせが辞書に登録されていないか否かが調べられる。
The flow chart of FIG. 11 shows the processing of one pass performed by the additive decomposition method for optimizing the dictionary. Here, one pass means that all the character strings are stored in the work buffer and all the character strings are processed. In FIG. 11, first, NUM = 0 is set (step E1). Next, it is checked whether or not the combination (that is, AB) of the character strings stored in buf1 and buf2 (first and second in the work buffer) is registered in the dictionary (step E2). When it is determined that the character string is registered, the combination of the character strings stored in buf1 and buf2 is replaced with the registration number of the dictionary, and the next character string (that is, B) is added to the buf16 in which a space is created by this replacement. Store (step E3). Then, the process returns to step E2, and it is checked again whether or not the combination of the character strings buf1 and buf2 is registered in the dictionary.

【0113】一方、ステップE2で、buf1、buf
2の文字列の組み合わせが辞書に登録されていないと判
断された場合は、今度はbuf2、buf3の文字列の
組み合わせが辞書に登録されていないか否かが調べられ
る(ステップE4)。そして、登録されている場合はス
テップE5に移行し、その後、またステップE2に戻
る。登録されていない場合は、次のステップに移行す
る。
On the other hand, in step E2, buf1, buf
When it is determined that the combination of the character strings of 2 is not registered in the dictionary, it is checked whether or not the combination of the character strings of buf2 and buf3 is registered in the dictionary (step E4). If it is registered, the process proceeds to step E5 and then returns to step E2. If not registered, move to the next step.

【0114】このようにしてbuf15、buf16の
文字列の組み合わせまで調べてゆき(ステップE8)、
この文字列の組み合わせが登録されていない場合は、今
回のパスが最終パスか否かが最終パスフラッグにより調
べられる(ステップE10)。そして、最終パスでない
場合には、ステップE11に移行し、buf1、buf
2の文字列の組み合わせを新たに辞書に登録する。そし
て、buf1に格納される文字列を消去するとともに作
業バッファ内の文字列を左にシフトし、これにより生じ
た空きを埋めるようにbuf16に次の文字列を格納す
る。更に、NUM=NUM+1とし、NUMの値を1つ
増やし、その後、ステップE2に戻る。一方、ステップ
E10で最終パスであると判断された場合には、buf
1の文字列を圧縮データとして外部に出力し、buf1
の文字列を消して1文字左にずらし、空いたbuf16
に次の文字列を入れることになる(ステップE12)。
Thus, the combination of the character strings buf15 and buf16 is checked (step E8),
If this combination of character strings is not registered, it is checked by the final path flag whether the current path is the final path (step E10). If it is not the final pass, the process proceeds to step E11, where buf1 and buf are set.
A combination of two character strings is newly registered in the dictionary. Then, the character string stored in buf1 is erased, the character string in the work buffer is shifted to the left, and the next character string is stored in buf16 so as to fill the space created thereby. Further, NUM = NUM + 1 is set, the value of NUM is incremented by 1, and then the process returns to step E2. On the other hand, if the final pass is determined in step E10, buf
The character string of 1 is output to the outside as compressed data, and buf1
Erase the character string of and shift to the left by one character, and empty buf16
The next character string will be put in (step E12).

【0115】なお、図11では、例えばステップE8、
E9の後、ステップE2に戻っているが、本発明では必
ずしもステップE2にまで戻る必要はない。即ち、この
場合には、置き換わる文字列はbuf15、buf16
に格納される文字列のみなので、これにより判断に影響
が出るステップE6にまで戻れば十分である。このこと
はステップE6等の他のステップでも同様である。
In FIG. 11, for example, step E8,
After E9, the process returns to step E2, but it is not always necessary to return to step E2 in the present invention. That is, in this case, the replacement character strings are buf15 and buf16.
Since it is only the character string stored in, it suffices to return to step E6, which affects the determination. This also applies to other steps such as step E6.

【0116】以上の処理を繰り返し、全圧縮対象文字列
が作業バッファに格納され1回目のパスが終わると、図
12に示すようにNUM2=NUMに設定される(ステ
ップF2)。ここで、NUMは、図11のステップE1
1を通る毎に1ずつ増やされるもので、圧縮データの出
力回数を表すものに相当する(実際には、ステップE1
1、E12に示すように、最終パスになるまでは圧縮デ
ータは外部に出力されない)。
When the above processing is repeated and all the character strings to be compressed are stored in the work buffer and the first pass ends, NUM2 = NUM is set as shown in FIG. 12 (step F2). Here, NUM is the step E1 in FIG.
It is incremented by 1 each time it passes 1, and corresponds to the number of times the compressed data is output (actually, step E1
As indicated by 1 and E12, the compressed data is not output until the final pass).

【0117】次に、ステップF3に示すように、2回目
のパスが行われる。この2回目のパスでは、1回目のパ
スで更新された辞書が使用され、これにより辞書が成熟
化されてゆく。この2回目のパスは、1回目のパスと同
様に、図11に示す処理により全圧縮対象文字列に対し
て行われる。次に、ステップF4で、NUM>NUM2
か否かが判断される。NUM≦NUM2の場合は、ステ
ップF3における圧縮データ出力回数NUMの方がステ
ップF1における圧縮データ出力回数NUM2よりも小
さいことを意味し、データの圧縮率が向上したことを意
味する。従って、この場合には、ステップF2に戻り、
最適な辞書が得られるまで処理が繰り返されることにな
る。そして、NUM>NUM2となると、最適な辞書が
生成されたと判断され、最終パスフラッグ=1に設定さ
れ(ステップF5)、最終パスの圧縮動作が行われる
(ステップF6)。
Next, as shown in step F3, the second pass is performed. In this second pass, the dictionary updated in the first pass is used, and the dictionary is matured. This second pass is performed for all the compression target character strings by the processing shown in FIG. 11, similarly to the first pass. Next, in step F4, NUM> NUM2
It is determined whether or not. When NUM ≦ NUM2, it means that the compressed data output count NUM in step F3 is smaller than the compressed data output count NUM2 in step F1, which means that the data compression rate is improved. Therefore, in this case, the procedure returns to step F2,
The process is repeated until the optimal dictionary is obtained. When NUM> NUM2, it is determined that the optimum dictionary is generated, the final path flag is set to 1 (step F5), and the final path compression operation is performed (step F6).

【0118】最終パスの圧縮動作では、最終パスフラッ
グ=1となっているため、図11のステップE10の判
断は常にYESの方向になり、常にステップE12に移
行することになる。即ち、この場合にはステップE12
を通る毎に、buf1に格納されている文字列が圧縮デ
ータとして外部に出力されることになる。また、ステッ
プE12では、ステップE11のように辞書に新たな文
字列が登録がされることがなく、辞書は前回のパスにお
ける辞書のままで、更新されない。そして、この更新さ
れない辞書が、静的な辞書として圧縮データと共に外部
に出力され、記憶装置等に格納されることになる。
In the final pass compression operation, since the final pass flag = 1, the determination at step E10 in FIG. 11 is always in the direction of YES, and the process always goes to step E12. That is, in this case, step E12
The character string stored in buf1 is output to the outside as compressed data each time the data passes through. In step E12, a new character string is not registered in the dictionary as in step E11, and the dictionary remains the dictionary used in the previous pass and is not updated. Then, the dictionary that is not updated is output as a static dictionary together with the compressed data to the outside and stored in the storage device or the like.

【0119】(D)使用頻度 さて、以上のようにして、最適な辞書を作成していく過
程において、辞書の登録数が限界に達し、新たに使用頻
度の高い文字列を辞書に登録しようとしても登録できな
い場合が生じる。この場合には、使用頻度の低い登録文
字列を消去し、消去により生じた空きの部分に登録した
い文字列を書き込むようにする。
(D) Frequency of Use Now, in the process of creating an optimal dictionary as described above, the number of registered dictionary reaches the limit, and an attempt is made to newly register a frequently used character string in the dictionary. There may be cases where you cannot register. In this case, the registered character string that is rarely used is erased, and the character string to be registered is written in the empty portion created by the erasure.

【0120】図13(A)には、このような使用頻度の
情報を含む辞書の構造が示され、図13(B)には、こ
の使用頻度に基づく登録削除の処理のフローチャートが
示される。
FIG. 13A shows the structure of a dictionary containing such usage frequency information, and FIG. 13B shows a flowchart of registration deletion processing based on this usage frequency.

【0121】ここで、Pは、新たに登録する辞書の登録
番号を表すものであり、Pの初期値は256である。そ
して、図13(A)に示すように、辞書の登録場所に
は、256〜4095の登録番号が割り振られている。
各登録番号の場所には、1文字目の番号を入れる場所
と、2文字目の番号を入れる場所と、使用頻度を入れる
場所とがある。使用頻度の初期値は全て”0”であり、
使用頻度=0は、その場所には登録文字列が何も登録さ
れていないことを示す。
Here, P represents the registration number of the dictionary to be newly registered, and the initial value of P is 256. Then, as shown in FIG. 13A, registration numbers of 256 to 4095 are assigned to the registration locations of the dictionary.
The location of each registration number includes a location for entering the first letter number, a location for entering the second letter number, and a location for entering the frequency of use. The initial value of the usage frequency is all "0",
Usage frequency = 0 indicates that no registered character string is registered at that location.

【0122】新たに、1文字目+2文字目の組合わせか
らなる文字列を登録する場合には、図13(B)のステ
ップG1に示すように、辞書の中のPの場所(図13
(A)では258番の場所)に、1文字目、2文字目の
文字列を書き込む。次に、P=P+1とし(ステップG
2)、次の場所(259番の場所)を見る。この場合、
P=4096となった場合には、P=256に設定され
る(ステップG3、G4)。次に、Pの場所(259番
の場所)の使用頻度が調べられ(ステップG5)、使用
頻度>1ならばPの場所の使用頻度を1減らす(ステッ
プG7)。そして、またステップG2に戻り、P=P+
1として次の場所(260番の場所)を見る。
To newly register a character string consisting of a combination of the first character and the second character, as shown in step G1 of FIG. 13B, the location of P in the dictionary (see FIG. 13).
The character string of the first character and the second character is written in the (258th place in (A)). Next, P = P + 1 is set (step G
2) Look at the next place (place number 259). in this case,
When P = 4096, P = 256 is set (steps G3 and G4). Next, the usage frequency of the location of P (location 259) is checked (step G5), and if the usage frequency> 1, the usage frequency of the location of P is decremented by 1 (step G7). Then, the process returns to step G2 again, and P = P +
Look at the next place (No. 260) as 1.

【0123】例えば、今、辞書の256〜4095の場
所に空きが1つもない場合を考える。この場合には、使
用頻度=0となる場所が生じるまで、ステップG2〜G
5の処理が繰り返される。そして、初めに使用頻度=0
となった場所の登録が削除される(ステップG6)。そ
して、新たに辞書登録を行う場合には、この削除された
場所に辞書登録することになる。
For example, consider a case where there are no empty spaces in the locations 256 to 4095 in the dictionary. In this case, steps G2 to G are repeated until there is a place where the frequency of use = 0.
The process of 5 is repeated. And first, the frequency of use = 0
The registration of the place that has become is deleted (step G6). Then, when newly registering a dictionary, the dictionary is registered in this deleted location.

【0124】以上の処理により、登録番号256〜40
95の中で、最も使用頻度の低い登録文字列を削除する
ことが可能となり、この登録が削除された場所に、新た
に他の文字列を登録することが可能となる。これによ
り、使用頻度の高い登録文字列が優先的に登録された辞
書を生成することが可能となる。
By the above processing, the registration numbers 256-40
In 95, it is possible to delete the registered character string that is least frequently used, and it is possible to newly register another character string at the place where this registration is deleted. As a result, it becomes possible to generate a dictionary in which registered character strings that are frequently used are preferentially registered.

【0125】(E)復元処理 本実施例により生成された辞書は以下のようにツリー構
造となっている。 (辞書) 256: 30+ 56 257: 80+ 16 258:256+257 259:256+257 260:259+257 従って、この辞書により例えば登録番号256〜260
に登録される登録文字列を復元すると、以下のようにな
る。 (文字列復元) 256=30+56 257=80+16 258=256+40 =30+56+40 (256=30+56より) 259=256+257 =30+56+257 (256=30+56より) =30+26+80+16(257=80+16より) 260=259+257 (259=256+257より) =256+257+257(256=30+56より) =30+56+257+257(257=80+16より =30+56+80+16+257 =30+56+80+16+80+16(257=80+16より ) このように本実施例により圧縮された文字列を復元する
のには、登録文字列を構成する全ての文字列が256よ
り小さくなるまで分解処理を行う必要がある。しかし、
復元をする際に、上記のような分解処理を行うと、文字
列の復元速度が非常に遅くなるという問題がある。そこ
で、この問題を解決するために、生成された辞書から以
下に述べるような復元専用の辞書を生成し、この復元専
用の辞書をROM等の記憶媒体に格納し、復元の際に使
用することが望ましい。
(E) Restoration Processing The dictionary created by this embodiment has a tree structure as follows. (Dictionary) 256: 30 + 56 257: 80 + 16 258: 256 + 257 259: 256 + 257 260: 259 + 257 Therefore, according to this dictionary, for example, registration numbers 256-260.
When the registered character string registered in is restored, it becomes as follows. (Character string restoration) 256 = 30 + 56 257 = 80 + 16 258 = 256 + 40 = 30 + 56 + 40 (from 256 = 30 + 56) 259 = 256 + 257 = 30 + 56 + 257 (from 256 = 30 + 56) = 30 + 26 + 80 + 16 (from 257 = 80 + 16) 260 = 259 + 257 + 257 (257) = 256 + 257 + 257 (from 256 = 30 + 56) = 30 + 56 + 257 + 257 (from 257 = 80 + 16 = 30 + 56 + 80 + 16 + 257 = 30 + 56 + 80 + 16 + 80 + 16 (from 257 = 80 + 16) In this way, the registered character string is reconstructed in order to restore the compressed character string. It is necessary to perform decomposition processing until all character strings are smaller than 256. However,
If the above decomposition processing is performed when restoring, there is a problem that the restoring speed of the character string becomes very slow. Therefore, in order to solve this problem, a restoration-specific dictionary as described below is generated from the generated dictionary, and this restoration-specific dictionary is stored in a storage medium such as a ROM and used for restoration. Is desirable.

【0126】図14(A)には、この復元専用辞書の構
造が示されている。復元専用辞書の先頭部分には、文字
列長(データ長)と、文字列開始アドレスの情報とが登
録番号256〜4095の順に並んで格納されている。
そして、その後ろに文字列のコア部分(文字列の羅列)
が格納されている。この文字列のコア部分は、上記のよ
うに、登録文字列を構成する全ての文字列が256より
小さくなるまで分解処理を行うことにより生成したもの
であり、これらの文字列は復元専用の登録文字列とな
る。
FIG. 14A shows the structure of this restoration-only dictionary. A character string length (data length) and information on the character string start address are stored in the head portion of the restoration-only dictionary side by side in the order of registration numbers 256 to 4095.
And after that, the core part of the string (list of strings)
Is stored. As described above, the core part of this character string is generated by performing decomposition processing until all the character strings forming the registered character string are smaller than 256. These character strings are registered for restoration only. It becomes a character string.

【0127】復元処理を行う際には、図14(B)に示
すように、登録番号256〜4095の位置に格納され
た文字列開始アドレスにより、文字列のコア部分の中の
対応する開始アドレスを指定する。そして、この開始ア
ドレスから、文字列長により指定される長さだけ文字列
(復元専用登録文字列)を取り出すことにより、データ
の復元が行われる。この場合、文字列のコア部分は、あ
らかじめ上記のように分解処理されているため、ツリー
構造の辞書よりも復元処理の速度を非常に早くすること
が可能となる。
When performing the restoration process, as shown in FIG. 14B, the corresponding start address in the core portion of the character string is determined by the character string start address stored at the positions of registration numbers 256 to 4095. Is specified. Then, the data is restored by extracting a character string (restoration-dedicated registration character string) of a length designated by the character string length from the start address. In this case, since the core part of the character string has been decomposed in advance as described above, the speed of the restoration process can be made much faster than that of the tree structure dictionary.

【0128】図15には、この復元専用の辞書を用いた
場合の、復元処理のフローチャートが示される。まず、
ステップH2で、12ビットのコードを読み出し、コー
ドが終了記号であった場合には終了となり(ステップH
4)、終了記号でない場合は、ステップH5に移行す
る。そして、コードの番号にしたがって辞書から復元さ
れる文字列開始アドレスと文字列長の情報を得る。そし
て、得られた文字列開始アドレスから文字列長分の文字
列を復元バッファに書き込む(ステップH6)。以上の
処理を、終了記号が検出されるまで繰り返すことによ
り、データの復元が可能となる。
FIG. 15 shows a flowchart of the restoration process when the dictionary dedicated to the restoration is used. First,
In step H2, the 12-bit code is read, and if the code is an end symbol, the processing ends (step H2).
4) If it is not the end symbol, the process proceeds to step H5. Then, information on the character string start address and the character string length to be restored from the dictionary is obtained according to the code number. Then, the character string of the character string length is written from the obtained character string start address in the restoration buffer (step H6). Data can be restored by repeating the above processing until the end symbol is detected.

【0129】3.第3の実施例 第3の実施例は、以上の第1、第2の実施例で説明した
データ圧縮手法により、いわゆるフォントデータを圧縮
する実施例である。
3. Third Example The third example is an example in which so-called font data is compressed by the data compression method described in the first and second examples above.

【0130】(A)ビットマップフォントデータ まず、ビットマップフォントデータを圧縮する場合につ
いて説明する。ビットマップフォントのデータは通常ラ
スター方向に並んでいる。しかし、本実施例によりビッ
トマップフォントのデータを圧縮する場合、縦方向に圧
縮した方が圧縮率がかなり良くなる。そこで、図16
(A)に示すように、縦方向にデータ圧縮することにす
る。しかし、もちろん横方向にデータ圧縮してもかまわ
ない。
(A) Bitmap Font Data First, the case of compressing bitmap font data will be described. Bitmap font data is usually arranged in the raster direction. However, when compressing bitmap font data according to the present embodiment, the compression ratio is considerably better when compressed in the vertical direction. Therefore, FIG.
As shown in (A), data is compressed in the vertical direction. However, of course, data compression may be performed in the horizontal direction.

【0131】図16(A)に示すように、ビットマップ
フォントデータ(40ドット×40ドット)は、40バ
イト固定長のデータブロックを5個並べることで構成さ
れる。本実施例では、各データブロック毎に第1、第2
の実施例で示した圧縮手法により圧縮する。なお、通常
はこの様な形でデータ圧縮を行うが、圧縮率よりも復元
速度を優先する場合は、図16(A)のようなバイト列
単位ではなく、図16(B)に示すように横に並んだ2
バイトを1ワードとして、ワード列単位でデータ圧縮を
行うことも可能である。これにより、復元速度を上げる
ことが可能となるが、その反面、辞書に登録できる文字
列の数を32768程度にする必要があるという問題が
ある。
As shown in FIG. 16A, the bitmap font data (40 dots × 40 dots) is formed by arranging five data blocks each having a fixed length of 40 bytes. In this embodiment, the first and second data blocks are set for each data block.
The compression is performed by the compression method shown in the embodiment. Normally, data compression is performed in this manner. However, when the restoration speed is prioritized over the compression rate, the data is not displayed in byte string units as shown in FIG. 16A, but as shown in FIG. 16B. 2 side by side
It is also possible to perform data compression in units of word strings with one byte as one word. This makes it possible to increase the restoration speed, but on the other hand, there is a problem that the number of character strings that can be registered in the dictionary needs to be about 32768.

【0132】図17には、例えば「に」という文字を、
ビットマップイメージで示したものが示される。図17
において”1”が書き込まれている部分が黒となる。そ
して、他の部分には”0”が書き込まれており、この部
分は白となる。図17から明らかなように、0〜7、1
2、13、30〜39番のバイト列(データ列)は00
h(ヘクサ表示)となる。また、10、11、14〜1
6、27〜29番のバイト列は01hとなる。また、8
番のバイト列は02hとなり、9、17〜26番のバイ
ト列は03hとなる。このように、ビットマップフォン
トデータを、縦方向に圧縮してゆくと、同じ値のバイト
列が連続する。従って、第1、第2の実施例のデータ圧
縮手法により高効率に圧縮されることが理解される。
In FIG. 17, for example, the character "ni"
The one shown in the bitmap image is shown. FIG. 17
In, the part where "1" is written becomes black. Then, "0" is written in the other part, and this part becomes white. As is clear from FIG. 17, 0-7, 1
The byte string (data string) of Nos. 2, 13, 30 to 39 is 00
h (hexadecimal display). Also, 10, 11, 14-1
The byte string of Nos. 6, 27 to 29 is 01h. Also, 8
No. byte sequence is 02h, and No. 9, 17-26 byte sequences are 03h. In this way, when the bitmap font data is compressed in the vertical direction, the byte strings of the same value continue. Therefore, it is understood that the data compression methods of the first and second embodiments compress the data with high efficiency.

【0133】(B)アウトラインフォントデータ アウトラインフォントとは、文字の輪郭を、何個かの点
とそれを結ぶ直線、曲線により表そうとするものであ
る。通常の大きさの文字(例えば10ポイント)につい
は、上記のビットマップフォントを用いて印字するが、
ユーザによっては32ポイントなどの大きなサイズで印
字したい場合がある。このような場合に、各々のサイズ
のビットマップフォントデータをあらかじめ用意してお
くことはデータ容量との関係で困難である。そこで、こ
のような場合には、各々の文字について基本となるアウ
トラインフォントを持っておき、このアウトラインフォ
ントにより文字の輪郭を表し、これをスケーリングによ
り拡大し、これを図17に示すようなビットマップイメ
ージのデータに変換する。これにより所望のサイズの文
字を印字することが可能となる。
(B) Outline Font Data The outline font is intended to represent the outline of a character by a number of points and a straight line or a curve connecting them. For normal size characters (for example, 10 points), print using the above bitmap font.
Some users may want to print in a large size such as 32 points. In such a case, it is difficult to prepare the bitmap font data of each size in advance due to the data capacity. Therefore, in such a case, a basic outline font is held for each character, the outline of the character is represented by this outline font, and the outline is enlarged by scaling, and this is expanded into a bitmap as shown in FIG. Convert to image data. This makes it possible to print characters of a desired size.

【0134】例えば、アウトラインフォントにより
「2」という文字の輪郭は、図18に示すように、点
A、B、C、D、E、F、G・・・・とこれを結ぶ直
線、曲線により表すことができる。そして、本実施例で
は、このアウトラインフォントのデータを、NSIフォ
ーマットと呼ぶデータ形式で記述する。
For example, as shown in FIG. 18, the outline of the character "2" by the outline font is formed by the points A, B, C, D, E, F, G ... Can be represented. In this embodiment, the outline font data is described in a data format called NSI format.

【0135】さて、本実施例では、このNSIフォーマ
ットで記述されたアウトラインフォントデータを、図1
9(A)に示すように3つの部分、即ちFLG部分、D
AT部分、VCT部分に分離して圧縮している。
In the present embodiment, the outline font data described in this NSI format is represented in FIG.
As shown in FIG. 9 (A), there are three parts, that is, FLG part, D
The AT part and the VCT part are separated and compressed.

【0136】ここで、VCT部分は各点における打ち出
し方向のベクトル座標を表す情報であり、各点のX、Y
ベクトル座標情報が含まれる。なお、これらのX、Yベ
クトル座標は、座標の絶対値を表すものではなく、1つ
前の点からの相対値を表すものである。
Here, the VCT portion is information representing vector coordinates in the launch direction at each point, and X, Y at each point.
Contains vector coordinate information. It should be noted that these X and Y vector coordinates do not represent absolute values of the coordinates but represent relative values from the immediately preceding point.

【0137】また、FLG部分は、各点の属性を表す情
報であり、例えば、「A点は始点である」、「A点とB
点は直線で結ばれる」、「B点とD点はC点を中間点と
する曲線(ベゼー曲線)で結ばれる」、「D点とE点は
直線で結ばれる」、「E点とG点はF点を中間点とする
曲線(ベゼー曲線)で結ばれる」等を表す情報が含まれ
る。更に、DAT部分は、文字の特性を表す情報であ
り、文字の大きさを表す情報、あるいは文字の線幅を表
す情報等が含まれる。本実施例においては、VCT部分
についてはハフマン符号法により圧縮する。これに対し
て、FLG部分、DAT部分については、同じデータが
続く等の、ある程度の規則性があるため、上記第1、第
2の実施例で説明したデータ圧縮方法により圧縮する。
このようにアウトラインフォントデータを構成する成分
を、成分毎に分離し圧縮することにより、圧縮率を大幅
に向上させることが可能となる。そして、圧縮後のデー
タの構造は、図19(B)に示すように、まずFLG部
分の圧縮データのみが並び、その次にDAT部分の圧縮
データのみが並び、その次にVCT部分の圧縮データの
みが並ぶという構造になる。また、FLG部分、DAT
部分、VCT部分の各々に対応した専用の復元用辞書が
用意されることになる。
The FLG portion is information representing the attribute of each point. For example, "A point is a starting point", "A point and B point".
"Points are connected by a straight line", "B points and D points are connected by a curve (Bezé curve) with C point as an intermediate point", "D points and E points are connected by a straight line", "E points and G" The points are connected by a curve (Beeze curve) having the F point as an intermediate point. " Further, the DAT portion is information indicating the characteristics of the character, and includes information indicating the size of the character, information indicating the line width of the character, and the like. In this embodiment, the VCT part is compressed by the Huffman coding method. On the other hand, since the FLG portion and the DAT portion have some degree of regularity such as the same data continues, they are compressed by the data compression method described in the first and second embodiments.
By separating and compressing the components forming the outline font data for each component in this way, the compression rate can be significantly improved. The structure of the data after compression is, as shown in FIG. 19 (B), first only the compressed data of the FLG part is arranged, then only the compressed data of the DAT part is arranged, and then the compressed data of the VCT part. The structure is such that only chimneys line up. Also, the FLG part, DAT
A dedicated restoration dictionary corresponding to each of the parts and the VCT parts is prepared.

【0138】この圧縮データを復元する際には、FLG
部分、DAT部分を復元し、その後、これに基づいてV
CT部分を復元することになる。図19(C)には、こ
の復元処理のフロチャートが示される。まず、ステップ
I2で、FLG部分をFLG用の静的辞書で復元し、こ
れをFLG用に設けられたバッファに一時的に書き込
む。次に、ステップI3で、DAT部分をDAT用の静
的辞書で復元し、これをDAT用に設けられたバッファ
に一時的に書き込む。この状態では、データ読み出し用
のポインタは、図19(B)に示すように圧縮されたV
CT部分の先頭を指し示すことになる。
When restoring this compressed data, the FLG
Part, DAT part, and then V
The CT portion will be restored. FIG. 19C shows a flowchart of this restoration processing. First, in step I2, the FLG portion is restored with the FLG static dictionary, and this is temporarily written in the buffer provided for the FLG. Next, in step I3, the DAT portion is restored with the static dictionary for DAT, and this is temporarily written in the buffer provided for DAT. In this state, the pointer for reading data is V compressed as shown in FIG.
It will point to the beginning of the CT portion.

【0139】次に、ステップI4に示すように、DAT
部分とFLG部分をNSIフォーマットの規則にしたが
って上記バッファから読み出し、出力した後、読み出さ
れたFLG部分のビット0〜ビット3(これらのビット
の詳細は後述する)にしたがって、VCT部分をハフマ
ン符号に復元する。これにより、NSIフォーマットの
順番に戻された元のアウトラインフォントデータを得る
ことが可能となる。
Next, as shown in step I4, DAT
After reading the portion and the FLG portion from the buffer according to the rules of the NSI format and outputting them, the VCT portion is Huffman coded according to bits 0 to 3 of the read FLG portion (details of these bits will be described later). Restore to. This makes it possible to obtain the original outline font data returned in the NSI format order.

【0140】さて、本実施例では、データの圧縮率を更
に向上させるために、上記のFLG部分、VCT部分
を、下記の座標点制御部、座標点定義部で表せるフォー
マットに変更した後、圧縮を行っている。
In the present embodiment, in order to further improve the data compression rate, the FLG part and the VCT part are changed to a format that can be expressed by the coordinate point control unit and coordinate point definition unit described below, and then compressed. It is carried out.

【0141】ここで、座標点制御部のビット4〜ビット
7は、元のFLG部分のビット4〜7と同じであり、こ
れらのビット4〜ビット7により、各点の属性の指定、
即ち始点・中間点・終点のいずれなのか、移動補間、直
線補間、曲線補間のいずれなのか等が指定される。ま
た、座標点制御部のビット0〜ビット3は、座標点定義
部に定義されるベクトル座標の値が以下の意味になるこ
とを表す。即ち、ビット0はXベクトル座標が0でない
値であり存在することを表し、ビット1はYベクトル座
標が0でない値であり存在することを表す。また、ビッ
ト2はXベクトル座標が負の値であることを表す。更
に、ビット3はYベクトル座標が負の値であることを表
す。
Here, the bits 4 to 7 of the coordinate point control unit are the same as the bits 4 to 7 of the original FLG portion. These bits 4 to 7 specify the attribute of each point,
That is, it is designated which of a start point, an intermediate point, an end point, movement interpolation, linear interpolation, and curve interpolation. Bit 0 to bit 3 of the coordinate point control unit indicate that the value of the vector coordinate defined in the coordinate point definition unit has the following meaning. That is, bit 0 represents that the X vector coordinate is a non-zero value and exists, and bit 1 represents that the Y vector coordinate is a non-zero value and exists. Bit 2 indicates that the X vector coordinate is a negative value. Further, bit 3 represents that the Y vector coordinate has a negative value.

【0142】座標点定義部には10ビットのコード(0
〜1023)が並ぶ。そして、これらのコードと、座標
点制御部のビット0〜ビット3の指定により、 −1024≦Xベクトル座標≦1024 −1024≦Yベクトル座標≦1024 の範囲のベクトル座標値を表すことができる。
A 10-bit code (0
1023) are lined up. Then, by specifying these codes and bits 0 to 3 of the coordinate point control unit, it is possible to represent a vector coordinate value in the range of −1024 ≦ X vector coordinate ≦ 1024 −1024 ≦ Y vector coordinate ≦ 1024.

【0143】例えば、ビット0=1の時は、座標点定義
部にはX−1のデータがあることが示される。また、ビ
ット1=1の時は、座標点定義部にはY−1のデータが
あることが示される。文字において縦棒、横棒等がある
場合には、Xベクトル座標=0であったり、Yベクトル
座標=0であったりする場合があり、この場合には、X
ベクトル座標、Yベクトル座標を圧縮データとして出力
する必要はない。従って、この場合には、座標点制御部
のビット0、1の制御により、座標点定義部でのXベク
トル座標、Yベクトル座標の有無を指定できれば、デー
タ圧縮率を更に向上することが可能となる。また、Xベ
クトル座標、Yベクトル座標の正負の指定も、上記のよ
うに座標点制御部のビット2、3により指定し、これに
よりデータ圧縮率を更に向上させることができる。
For example, when bit 0 = 1, it is indicated that there is X-1 data in the coordinate point definition section. Further, when bit 1 = 1, it is indicated that the coordinate point defining portion has Y-1 data. When a character has a vertical bar, a horizontal bar, or the like, the X vector coordinate may be 0 or the Y vector coordinate may be 0.
It is not necessary to output vector coordinates and Y vector coordinates as compressed data. Therefore, in this case, if the presence or absence of the X vector coordinate and the Y vector coordinate in the coordinate point definition unit can be specified by controlling bits 0 and 1 of the coordinate point control unit, the data compression rate can be further improved. Become. Further, the positive / negative designation of the X vector coordinate and the Y vector coordinate is designated by the bits 2 and 3 of the coordinate point control unit as described above, whereby the data compression rate can be further improved.

【0144】以上に説明したように、本実施例によれ
ば、ビットマップフォントデータ、アウトラインフォン
トデータを効果的に圧縮することができる。そして、こ
の圧縮の際には、第1、第2の実施例で説明した静的辞
書が用いられる。この場合、静的辞書は、共通の字体
(フォント)の文字に対しては共通の静的辞書とするこ
とが望ましい。例えば、明朝体の文字に対しては、全て
明朝体専用の辞書を用いて辞書の更新、データ圧縮を行
い、最終的な静的辞書、圧縮データを得る。また、ゴシ
ックの文字に対しては、全てゴシック専用の辞書を用い
て辞書の更新、データ圧縮を行い、最終的な静的辞書、
圧縮データを得る。このように字体の各々について辞書
を共通化することで、データを効率よく圧縮することが
可能となる。これは、字体が共通であると、例えば文字
の輪郭の変化の仕方(線の跳ね上がり方等)、輪郭の太
さ等が各文字の間で共通となるため、文字自体の特性情
報、各輪郭点の属性情報等が同じとなり、この共通の辞
書によりデータが圧縮されやすくなるからである。この
場合には、出力された静的辞書、圧縮データは、字体毎
に分類されて記憶装置に格納されることになる。
As described above, according to this embodiment, bitmap font data and outline font data can be effectively compressed. Then, at the time of this compression, the static dictionary described in the first and second embodiments is used. In this case, it is desirable that the static dictionary is a common static dictionary for characters of a common font (font). For example, for the characters in Mincho type, all the dictionaries dedicated to Mincho type are used to update the dictionary and compress the data to obtain the final static dictionary and compressed data. In addition, for Gothic characters, the dictionary is updated and data is compressed using the Gothic-specific dictionary, and the final static dictionary,
Get compressed data. By using a common dictionary for each font in this way, data can be efficiently compressed. This is because if the fonts are common, for example, the method of changing the outline of the character (how the line jumps up, etc.) and the thickness of the outline are common to each character, so the characteristic information of the character itself, each outline This is because the point attribute information and the like are the same and the data is easily compressed by this common dictionary. In this case, the output static dictionary and compressed data are classified into each font and stored in the storage device.

【0145】図20には、以上説明した本実施例のデー
タ圧縮方法の利用態様が示される。圧縮対象データ列
(フォントデータ)はデータ圧縮装置31に入力され、
本実施例のデータ圧縮方法によりデータ圧縮される。そ
して、これにより生成された静的辞書及び圧縮データは
データ復元手段32内の記憶装置(ROM等)に格納さ
れる。そして、このデータ復元手段32は、情報処理装
置、例えばプリンタ33やコンピュータ34等に内蔵さ
れることになる(復元手段を分割して2つの装置に分け
て内蔵させてもよい)。
FIG. 20 shows how the data compression method of this embodiment described above is used. The compression target data string (font data) is input to the data compression device 31,
Data is compressed by the data compression method of this embodiment. Then, the static dictionary and the compressed data thus generated are stored in the storage device (ROM or the like) in the data decompression unit 32. The data restoration means 32 is built in the information processing apparatus, for example, the printer 33, the computer 34, or the like (the restoration means may be divided and built in two devices).

【0146】従来のプリンタ等では、フォントデータ等
は、データ圧縮されないまま記憶装置に格納され、個々
の圧縮データの格納アドレスを管理することで随時必要
なフォントデータを出力し、文字の印字を行っていた。
これに対して本実施例によれば、静的辞書及び圧縮デー
タを記憶装置に格納し、個々の圧縮データの格納アドレ
スと静的文字列辞書を管理することで随時必要な文字を
出力することが可能となる。これにより、記憶装置に格
納されるデータ量を少なくすることができ、装置の低コ
スト化を図ることができる。このような長所は特に多く
の記憶容量を必要とする漢字文字やハングル文字等に有
効であるが、その他の言語の文字についてももちろん効
果は大きい。
In a conventional printer or the like, font data or the like is stored in a storage device without being compressed, and the storage address of each compressed data is managed to output the necessary font data at any time to print characters. Was there.
On the other hand, according to the present embodiment, the static dictionary and the compressed data are stored in the storage device, and the storage address of each compressed data and the static character string dictionary are managed to output the necessary character at any time. Is possible. As a result, the amount of data stored in the storage device can be reduced, and the cost of the device can be reduced. Such an advantage is particularly effective for Kanji characters, Hangul characters, etc., which require a large storage capacity, but of course it is also effective for characters of other languages.

【0147】なお、本発明は上記実施例に限定されるも
のではなく、本発明の要旨の範囲内で種々の変形実施が
可能である。
The present invention is not limited to the above embodiments, and various modifications can be made within the scope of the gist of the present invention.

【0148】例えば、本実施例では文字列データを処理
することについて主に説明したが、その他の記号データ
等についても応用は可能である。
For example, although the present embodiment has mainly described processing of character string data, it can be applied to other symbol data and the like.

【0149】また、本発明により圧縮されるデータ列と
しては、文字列、バイト列、ワード列に限らず種々のデ
ータ列が含まれ、例えば2次元、3次元図形を構成する
ためのデータ列等も含めることができる。
The data string compressed according to the present invention is not limited to a character string, a byte string, and a word string, and various data strings are included. For example, a data string for forming a two-dimensional or three-dimensional figure, etc. Can also be included.

【0150】また、本発明における登録番号には、この
登録番号と実質的に同一の機能を果たす情報も含まれ
る。
Further, the registration number in the present invention also includes information having substantially the same function as this registration number.

【0151】[0151]

【発明の効果】請求項1の発明によれば、最適な辞書を
静的な辞書として、この静的辞書によりデータ圧縮が行
われるため、出力される静的辞書と圧縮データのデータ
量を最適なものとすることができる。これにより、この
静的辞書、圧縮データが格納される記憶装置、記憶媒体
の容量を小さくすることができ、コストの削減等を図る
ことができる。更に、例えばデータ圧縮率の高い動的辞
書を用いたデータ圧縮アルゴリズム等を利用することが
可能となり、データ圧縮率を非常に高めることができ
る。また、必要なデータ列をこの静的辞書を用いて自在
に復元することも可能となり、例えば、情報処理装置等
によりこの圧縮されたデータ列を復元する場合に所望の
データ列を任意に取り出すことが可能となる。また、本
発明によれば、辞書を最適にし、最終的な辞書、圧縮デ
ータを得るまでの時間は長くなる可能性もあるが、復元
処理速度自体は特に遅くなることはないという効果もあ
る。
According to the first aspect of the present invention, since the optimum dictionary is used as a static dictionary and data compression is performed by this static dictionary, the data amount of the output static dictionary and the compressed data is optimized. It can be anything. As a result, the capacities of the static dictionary, the storage device storing the compressed data, and the storage medium can be reduced, and the cost can be reduced. Further, for example, it becomes possible to use a data compression algorithm using a dynamic dictionary having a high data compression rate, and the data compression rate can be greatly increased. It is also possible to freely restore the required data string using this static dictionary. For example, when restoring this compressed data string by an information processing device or the like, the desired data string can be arbitrarily retrieved. Is possible. Further, according to the present invention, there is a possibility that it takes a long time to optimize the dictionary and obtain a final dictionary and compressed data, but there is also an effect that the decompression processing speed itself does not become particularly slow.

【0152】また、請求項2の発明によれば、組み合わ
せ個数の多いデータ列の組み合わせが優先的に辞書の登
録番号に置き換えられることになるため、データの圧縮
率を最適なものとすることができる。一方、使用頻度の
低い登録データ列の登録を削除し、登録数が所定数にな
った段階で更新が終了するため、データ量の少ない最適
な辞書を生成することが可能となる。そして、スライド
辞書と呼ばれる手法により簡易に辞書を生成できるとい
う利点もある。なお、この場合の所定数は、出力データ
のビット数が例えば12ビットであった場合には、辞書
の登録数がこの12ビットの範囲で収まるような数とす
ることができる。
According to the second aspect of the invention, the combination of the data strings having a large number of combinations is preferentially replaced by the registration number of the dictionary, so that the data compression rate can be optimized. it can. On the other hand, the registration of the registration data string that is used infrequently is deleted, and the update ends when the number of registrations reaches a predetermined number. Therefore, it is possible to generate an optimal dictionary with a small amount of data. There is also an advantage that a dictionary can be easily generated by a method called a slide dictionary. Note that the predetermined number in this case can be set such that when the number of bits of the output data is 12 bits, for example, the number of registered dictionaries falls within the range of 12 bits.

【0153】また、請求項3の発明によれば、出現確率
の高いデータ列の組み合わせが優先的に登録番号に置き
換えられることになるため、データ圧縮率を最適なもの
とすることができる。一方、使用頻度の低い登録データ
列の登録を削除し、登録数が所定数になった段階で更新
が終了するため、データ量の少ない最適な辞書を生成す
ることが可能となる。そして、初めの辞書の生成は1回
の解析でできるため、処理を非常に単純化できるという
利点もある。
Further, according to the third aspect of the invention, the combination of the data strings having a high appearance probability is preferentially replaced by the registration number, so that the data compression rate can be optimized. On the other hand, the registration of the registration data string that is used infrequently is deleted, and the update ends when the number of registrations reaches a predetermined number. Therefore, it is possible to generate an optimal dictionary with a small amount of data. Since the first dictionary can be generated by one analysis, there is also an advantage that the processing can be greatly simplified.

【0154】また、請求項4の発明によれば、データ圧
縮率の高い動的辞書を用いたデータ圧縮アルゴリズムに
よりデータ圧縮がなされ、しかもデータ圧縮率が最適な
段階で辞書の更新が終了するため、データ圧縮率を非常
に高めることが可能となる。一方、出力された辞書は静
的辞書となるため、必要なデータ列をこの静的辞書を用
いて自在に復元することも可能となる。
Further, according to the invention of claim 4, the data compression is performed by the data compression algorithm using the dynamic dictionary having a high data compression rate, and the dictionary update is completed at the stage where the data compression rate is optimum. The data compression rate can be greatly increased. On the other hand, since the output dictionary becomes a static dictionary, it is possible to freely restore a necessary data string using this static dictionary.

【0155】また、請求項5の発明によれば、特に同一
のデータ列を圧縮処理する場合に、辞書の登録数を従来
の増分分解法と比べて非常に少なくすることができると
ともに、該辞書の登録番号により置き換えられて圧縮が
施された圧縮データ自体も、従来の増分分解法に比べて
非常に少ないデータ量とすることができる。
Further, according to the invention of claim 5, especially when compressing the same data string, the number of registered dictionary can be made very small as compared with the conventional incremental decomposition method, and the dictionary can be reduced. The compressed data itself, which has been replaced with the registration number and compressed, can have a very small data amount as compared with the conventional incremental decomposition method.

【0156】また、請求項6の発明によれば、データ圧
縮率が非常に高められるとともに、必要なデータ列をこ
の静的辞書を用いて自在に復元することも可能となる。
また、最適な圧縮率になったか否かを、処理の繰り返し
回数だけで判断することができるという利点もある。
According to the sixth aspect of the present invention, the data compression rate can be greatly increased, and a necessary data string can be freely restored using this static dictionary.
There is also an advantage that it is possible to judge whether or not the optimum compression ratio is obtained only by the number of times the process is repeated.

【0157】また、請求項7の発明によれば、辞書の登
録可能数に限界がある場合等に、辞書のデータ量を非常
に簡易な方法で最適なサイズとすることが可能となる。
Further, according to the invention of claim 7, when there is a limit to the number of dictionaries that can be registered, the data amount of the dictionaries can be made the optimum size by a very simple method.

【0158】また、請求項8の発明によれば、辞書のデ
ータ量を最適なサイズとすることができるとともに、辞
書に使用頻度の高い登録データ列を残すことができ、最
適な辞書を生成できる。
Further, according to the invention of claim 8, the data amount of the dictionary can be set to the optimum size, and the registered data string which is frequently used can be left in the dictionary, and the optimum dictionary can be generated. .

【0159】また、請求項9の発明によれば、ビットマ
ップフォントデータ、アウトラインフォントデータの圧
縮が可能となり、これらのフォントデータが格納される
記憶装置、記憶媒体の容量を少なくすることができる。
これにより、該記憶装置、記憶媒体を内蔵するプリン
タ、コンピュータ等のコストを削減することが可能とな
る。
According to the invention of claim 9, the bitmap font data and the outline font data can be compressed, and the capacity of the storage device and the storage medium for storing these font data can be reduced.
This makes it possible to reduce the cost of the storage device, the printer including the storage medium, the computer, and the like.

【0160】また、請求項10の発明によれば、データ
の特性に応じて、適用する圧縮方法を換えることがで
き、データの圧縮率を更に高めることが可能となる。
According to the tenth aspect of the invention, the compression method to be applied can be changed according to the characteristics of the data, and the data compression rate can be further increased.

【0161】また、請求項11の発明によれば、明朝
体、ゴシック等の字体の各々について辞書を共通化する
ことができる。例えば文字の輪郭の変化の仕方、輪郭の
太さ等は同じ字体であれば共通となる場合が多いため、
本発明によれば、データをより効率よく圧縮することが
可能となる。
According to the eleventh aspect of the present invention, it is possible to use a common dictionary for each font such as Mincho and Gothic. For example, the method of changing the outline of a character, the thickness of the outline, etc. are often common for the same font,
According to the present invention, it becomes possible to compress data more efficiently.

【0162】また、請求項12の発明によれば、文字の
記憶に必要な容量等を節約することができる。
According to the twelfth aspect of the invention, it is possible to save the capacity and the like required for storing characters.

【0163】また、請求項13の発明によれば、復元専
用登録データ列が、復元専用のデータ形式に変換されて
おり、例えば増分分解法、加増分解法においてはツリー
構造が無くなるまで登録データ列が分解されている。従
って、通常の辞書を用いる場合よりも、非常に速く復元
処理を行うことが可能となる。
According to the thirteenth aspect of the present invention, the restoration-dedicated registration data string is converted into the restoration-dedicated data format. For example, in the incremental decomposition method or the additive decomposition method, the registration data string is deleted until the tree structure disappears. Has been disassembled. Therefore, the restoration process can be performed much faster than when using a normal dictionary.

【0164】また、請求項14の発明によれば、復元さ
れたデータ列を用いて所定の処理、例えば文字の印字等
の処理を行うことができる。
According to the fourteenth aspect of the present invention, it is possible to perform a predetermined process, for example, a process such as character printing, by using the restored data string.

【0165】また、請求項15の発明によれば、復元手
段により元のデータ列が復元でき、この復元手段を、例
えば、コンピュータ、プリンタ等の情報処理装置に内蔵
させることができる。
According to the fifteenth aspect of the invention, the original data string can be restored by the restoring means, and this restoring means can be incorporated in an information processing device such as a computer or a printer.

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

【図1】第1の実施例のデータ圧縮方法を説明するため
のフローチャートである。
FIG. 1 is a flowchart illustrating a data compression method according to a first embodiment.

【図2】実施例のデータ圧縮方法が使用されるデータ圧
縮装置12の構成の一例を示すブロック図である。
FIG. 2 is a block diagram showing an example of a configuration of a data compression device 12 in which the data compression method of the embodiment is used.

【図3】図3(A)〜(E)は、スライド辞書の手法を
説明するための概略説明図である。
FIGS. 3A to 3E are schematic explanatory diagrams for explaining a method of a slide dictionary.

【図4】スライド辞書手法を利用して最適な辞書を得る
手法を説明するためのフロチャートである。
FIG. 4 is a flow chart for explaining a method of obtaining an optimum dictionary using a slide dictionary method.

【図5】増分分解アルゴリズムを利用して最適な辞書を
得る手法を説明するためのフローチャートである。
FIG. 5 is a flowchart for explaining a method of obtaining an optimum dictionary by using the incremental decomposition algorithm.

【図6】静的辞書および圧縮データを作成する過程を視
覚的に表した図である。
FIG. 6 is a diagram visually showing a process of creating a static dictionary and compressed data.

【図7】第2の実施例で使用されるデータ圧縮方法を模
式的に説明するための概略説明図である。
FIG. 7 is a schematic explanatory diagram for schematically explaining the data compression method used in the second embodiment.

【図8】図8(A)、(B)は、増分分解法と加増分解
法の処理の違いを模式的に示した図である。
8A and 8B are diagrams schematically showing the difference in processing between the incremental decomposition method and the additive decomposition method.

【図9】増分分解法の動作を説明するためのフロチャー
トである。
FIG. 9 is a flowchart for explaining the operation of the incremental decomposition method.

【図10】図10(A)、(B)は、増分分解法と加増
分解法の処理の違いを模式的に示した図である。
10A and 10B are diagrams schematically showing the difference in processing between the incremental decomposition method and the additive decomposition method.

【図11】加増分分解法による1回のパスの処理を説明
するためのフローチャートである。
FIG. 11 is a flowchart for explaining processing of one pass by the additive incremental decomposition method.

【図12】辞書の最適化のための複数回のパスの処理を
説明するためのフローチャートである。
FIG. 12 is a flowchart for explaining processing of a plurality of passes for dictionary optimization.

【図13】図13(A)は、使用頻度情報を含む辞書の
構造を示す図であり、図13(B)は、使用頻度に基づ
く登録削除の処理を表すフローチャートである。
13A is a diagram showing a structure of a dictionary including usage frequency information, and FIG. 13B is a flowchart showing a registration deletion process based on usage frequency.

【図14】図14(A)は、復元専用辞書の構造を示す
図であり、図14(B)は、文字開始アドレス及び文字
列長による文字列のコア部分の指定について説明する図
である。
FIG. 14 (A) is a diagram showing a structure of a restoration-only dictionary, and FIG. 14 (B) is a diagram explaining designation of a core portion of a character string by a character start address and a character string length. .

【図15】復元専用の辞書を用いた場合の復元処理のフ
ローチャートである。
FIG. 15 is a flowchart of restoration processing when a dictionary dedicated to restoration is used.

【図16】図16(A)、(B)は、ビットマップデー
タの圧縮について説明するための概略説明図である。
16A and 16B are schematic explanatory diagrams for explaining compression of bitmap data.

【図17】文字のビットマップイメージを説明するため
の概略説明図である。
FIG. 17 is a schematic explanatory diagram for explaining a bitmap image of a character.

【図18】アウトラインフォントを説明するための概略
説明図である。
FIG. 18 is a schematic explanatory diagram for explaining an outline font.

【図19】図19(A)、(B)は、アウトラインフォ
ントデータの圧縮について説明するための概略説明図で
あり、図19(C)は、この圧縮データの復元処理のフ
ローチャートである。
19A and 19B are schematic explanatory diagrams for explaining the compression of outline font data, and FIG. 19C is a flowchart of the decompression process of this compressed data.

【図20】実施例のデータ圧縮方法の利用態様である。FIG. 20 is a mode of using the data compression method according to the embodiment.

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

1 圧縮対象である文字列データ 2 作業用バッファ 3 辞書 4 圧縮データ 5 完成した辞書 11 圧縮対象である全データ列 12 データ圧縮装置 13 辞書生成手段 14 静的辞書 15 静的辞書保持手段 16 静的辞書出力手段 17 データ圧縮手段 18 圧縮データ出力手段 19 圧縮データ 1 Character string data to be compressed 2 Working buffer 3 Dictionary 4 Compressed data 5 Completed dictionary 11 All data strings to be compressed 12 Data compression device 13 Dictionary generating means 14 Static dictionary 15 Static dictionary holding means 16 Static Dictionary output means 17 data compression means 18 compressed data output means 19 compressed data

Claims (15)

【特許請求の範囲】[Claims] 【請求項1】 登録番号に関連づけて登録データ列を登
録できる辞書を使用しデータ列の2以上の組み合わせを
該登録番号に置き換えることでデータ圧縮を行うデータ
圧縮方法であって、圧縮対象であるデータ列のデータ圧
縮に最適な辞書が生成されるまで辞書を更新し、最適な
辞書が生成された段階で該辞書を最終的な復元用の静的
辞書として出力するとともに、該静的辞書により圧縮対
象であるデータ列のデータ圧縮を行い、圧縮されたデー
タ列を最終的な復元用の圧縮データとして出力すること
を特徴とするデータ圧縮方法。
1. A data compression method for performing data compression by using a dictionary capable of registering a registration data string in association with a registration number and replacing two or more combinations of data strings with the registration number, which is a compression target. The dictionary is updated until the optimum dictionary for data compression of the data string is generated, and when the optimum dictionary is generated, the dictionary is output as the final static dictionary for decompression, and the static dictionary A data compression method, which comprises compressing a data string to be compressed and outputting the compressed data string as final compressed data for decompression.
【請求項2】 請求項1において、 前記最適な辞書が生成されるまでの前記辞書の更新が、
組み合わせ個数の多いデータ列の組み合わせを優先的に
登録することにより生成された辞書から使用頻度の低い
登録データ列の登録を辞書の登録数が所定数になるまで
削除することにより行われることを特徴とするデータ圧
縮方法。
2. The update of the dictionary according to claim 1, wherein the update of the dictionary until the optimum dictionary is generated,
A feature is that registration of a registration data string that is used less frequently is deleted from a dictionary generated by preferentially registering a combination of data strings with a large number of combinations until the number of registrations in the dictionary reaches a predetermined number. Data compression method.
【請求項3】 請求項1において、 前記最適な辞書が生成されるまでの前記辞書の更新が、
出現確率が高いデータ列の組み合わせを優先的に登録す
ることにより生成された辞書から使用頻度の低い登録デ
ータ列の登録を辞書の登録数が所定数になるまで削除す
ることにより行われることを特徴とするデータ圧縮方
法。
3. The update of the dictionary according to claim 1, wherein the update of the dictionary until the optimum dictionary is generated,
A feature is that registration of a registration data string that is used infrequently is deleted from a dictionary generated by preferentially registering a combination of data strings with a high appearance probability until the number of registrations in the dictionary reaches a predetermined number. Data compression method.
【請求項4】 請求項1において、 前記最適な辞書が生成されるまでの前記辞書の更新が、
データ圧縮の際に辞書が動的に変化するデータ圧縮アル
ゴリズムにより辞書を更新しながら圧縮対象となる全て
のデータ列に対するデータ圧縮の処理を行い、該処理に
より更新された辞書を用いて再び前記データ圧縮アルゴ
リズムにより辞書を更新しながら圧縮対象となる全ての
データ列に対するデータ圧縮の処理を行い、データ圧縮
率が最適になるまで前記処理を繰り返すことにより行わ
れることを特徴とするデータ圧縮方法。
4. The update of the dictionary according to claim 1, wherein the update of the dictionary until the optimum dictionary is generated,
The dictionary is dynamically changed during data compression. While the dictionary is being updated by the data compression algorithm, the data compression process is performed on all the data strings to be compressed, and the data updated again by using the dictionary updated by the process. A data compression method characterized by performing data compression processing on all data strings to be compressed while updating a dictionary by a compression algorithm, and repeating the processing until the data compression rate becomes optimum.
【請求項5】 登録番号に関連づけて登録データ列を登
録できる辞書を使用しデータ列の2以上の組み合わせを
該登録番号に置き換えることでデータ圧縮を行うデータ
圧縮方法であって、(A)圧縮対象であるデータ列から
所定数のデータ列を取り出し所定数のバッファを有する
作業領域に格納する工程と、(B)前記作業領域内の隣
り合うバッファに格納されるデータ列の組み合わせが辞
書に登録されているか否かを解析し、辞書に登録されて
いる場合には、該データ列の組み合わせを辞書における
前記登録番号に置き換えるとともに置き換えにより生じ
た空きバッファを埋めるようにデータ列を作業領域内で
シフトさせ、その結果作業領域の終端に生じた空きバッ
ファに続きのデータ列を取り込み、再び作業領域内の隣
り合うバッファに格納されるデータ列の組み合わせが辞
書に登録されているか否かを解析する工程と、(C)上
記工程(B)の解析により作業領域内の隣り合うバッフ
ァに格納されるデータ列の組み合わせのいずれもが辞書
に登録されていないと判断された場合には、作業領域内
の先頭から1番目、2番目のバッファに格納されるデー
タ列の組み合わせを辞書に登録するとともに1番目のデ
ータ列を消去し、消去により生じた空きバッファを埋め
るようにデータ列を作業領域内でシフトさせ、その結果
作業領域の終端に生じた空きバッファに続きのデータ列
を取り込む工程とを含み、 圧縮の対象となる全てのデータ列が前記作業領域内に格
納されるまで前記工程(B)、(C)を繰り返すことを
特徴とするデータ圧縮方法。
5. A data compression method for compressing data by using a dictionary capable of registering a registration data string in association with a registration number and replacing two or more combinations of the data strings with the registration number, which comprises (A) compression. A combination of a step of extracting a predetermined number of data strings from a target data string and storing them in a work area having a predetermined number of buffers and (B) a combination of data strings stored in adjacent buffers in the work area is registered in a dictionary. If it is registered in the dictionary, the combination of the data string is replaced with the registration number in the dictionary, and the data string is set in the work area so as to fill the empty buffer created by the replacement. After shifting, the subsequent data string is fetched into the empty buffer created at the end of the work area, and it is saved again in the adjacent buffer in the work area. Either of the step of analyzing whether the combination of the data strings to be stored is registered in the dictionary or (C) the combination of the data strings stored in the adjacent buffers in the work area by the analysis of the step (B). If it is determined that Momo is not registered in the dictionary, the combination of the data strings stored in the first and second buffers in the work area is registered in the dictionary and the first data string is deleted. Then, the data string is shifted in the work area so as to fill the empty buffer created by the erasure, and the subsequent data string is loaded into the empty buffer created at the end of the work area, which is the object of compression. A data compression method characterized in that the steps (B) and (C) are repeated until all the data strings are stored in the work area.
【請求項6】 請求項5において、 圧縮の対象となる全てのデータ列に対して処理が行われ
るまでの前記工程(B)、(C)の繰り返しを1回のパ
スとした場合に、前回のパスで更新された辞書を用いて
現在のパスにおけるデータ圧縮を行うデータ圧縮方法で
あって、 現在のパスにおける前記工程(B)、(C)の繰り返し
回数が前回のパスにおける繰り返し回数以下の場合には
次のパスに移行し、現在のパスにおける前記工程
(B)、(C)の繰り返し回数が前回のパスにおける繰
り返し回数よりも大きい場合には前回のパスで更新され
た辞書を最終的な復元用の静的辞書として出力するとと
もに、該静的辞書により1回のパスのデータ圧縮を行
い、圧縮されたデータ列を最終的な復元用の圧縮データ
として出力することを特徴とするデータ圧縮方法。
6. The method according to claim 5, wherein when the processes (B) and (C) are repeated until all the data strings to be compressed are processed in one pass, A data compression method for compressing data in the current pass using the dictionary updated in the pass, wherein the number of repetitions of the steps (B) and (C) in the current pass is equal to or less than the number of repetitions in the previous pass. If the number of repetitions of the steps (B) and (C) in the current pass is larger than the number of repetitions in the previous pass, the dictionary updated in the previous pass is finally determined. Data as a static dictionary for decompression, data compression of one pass by the static dictionary, and outputting a compressed data string as final compressed data for decompression. Compression method.
【請求項7】 請求項1乃至6のいずれかにおいて、 前記辞書には登録番号、登録データ列と共に使用頻度情
報が記憶され、使用頻度の低い登録データ列を順次削除
する工程を含むことを特徴とするデータ圧縮方法。
7. The method according to claim 1, wherein the dictionary stores a registration number and a registration data string together with usage frequency information, and includes a step of sequentially deleting a registration data string having a low usage frequency. Data compression method.
【請求項8】 請求項7において、 前記使用頻度の低い登録データ列の削除が、辞書に登録
されている登録データ列の使用頻度数を順次減らしてゆ
き、初めに使用頻度数が所定数以下になった登録データ
列から優先して削除することにより行われることを特徴
とするデータ圧縮方法。
8. The deletion of a registration data string having a low frequency of use according to claim 7, wherein the number of times of use of the registration data string registered in the dictionary is gradually reduced, and the number of times of use is first below a predetermined number. The data compression method is performed by preferentially deleting the registered data sequence that has been deleted.
【請求項9】 請求項1乃至8のいずれかにおいて、 圧縮の対象となるデータ列が文字の印字の際に必要なフ
ォントデータであることを特徴とするデータ圧縮方法。
9. The data compression method according to claim 1, wherein the data string to be compressed is font data necessary for printing characters.
【請求項10】 請求項9において、 前記フォントデータの中の一部のみが前記圧縮の対象と
なるデータ列となり、他の一部が他のデータ圧縮方法に
よりデータ圧縮されることを特徴とするデータ圧縮方
法。
10. The character string according to claim 9, wherein only a part of the font data is a data string to be compressed, and the other part is data-compressed by another data compression method. Data compression method.
【請求項11】 請求項9又は10のいずれかにおい
て、 共通の字体を有する前記文字に対しては共通の前記辞書
を用いてデータ圧縮が行われることを特徴とするデータ
圧縮方法。
11. The data compression method according to claim 9, wherein the characters having a common font are subjected to data compression using the common dictionary.
【請求項12】 請求項1乃至8のいずれかにおいて、 圧縮の対象となるデータ列が文字列であることを特徴と
するデータ圧縮方法。
12. The data compression method according to claim 1, wherein the data string to be compressed is a character string.
【請求項13】 請求項1乃至12のいずれかにおい
て、 最終的に生成された辞書に含まれる登録番号と登録デー
タ列の情報とから、前記登録データ列を復元専用のデー
タ形式に変換した復元専用登録データ列と該復元専用登
録データ列のデータ長と該復元専用登録データ列の開始
アドレスの情報とを含む復元専用の辞書が生成されるこ
とを特徴とするデータ圧縮方法。
13. The restoration according to claim 1, wherein the registration data string is converted into a data format dedicated to the restoration from the registration number and the information of the registration data string included in the finally generated dictionary. A data compression method, wherein a decompression-only dictionary is generated that includes a dedicated registration data sequence, a data length of the decompression-only registration data sequence, and information of a start address of the decompression-only registration data sequence.
【請求項14】 請求項1乃至13のいずれかのデータ
圧縮方法により生成された圧縮データと最終的な辞書と
を用いて、該データ圧縮方法に応じた復元処理により圧
縮対象となったデータ列を復元することを特徴とするデ
ータ復元方法。
14. A data string compressed by a decompression process according to the data compression method, using the compressed data generated by the data compression method according to claim 1 and a final dictionary. A method for restoring data, which is characterized by restoring.
【請求項15】 請求項1乃至13のいずれかのデータ
圧縮方法により生成された圧縮データと最終的な辞書と
を用いて、該データ圧縮方法に応じた復元処理により圧
縮対象となったデータ列を復元する手段を含むことを特
徴とする情報処理装置。
15. A data string which is a compression target by a decompression process according to the data compression method, using the compressed data generated by the data compression method according to claim 1 and a final dictionary. An information processing apparatus comprising means for restoring the information.
JP15809994A 1993-06-22 1994-06-16 Data compression method, data decompression method, and information processing device Expired - Lifetime JP3132293B2 (en)

Priority Applications (8)

Application Number Priority Date Filing Date Title
JP15809994A JP3132293B2 (en) 1993-06-22 1994-06-16 Data compression method, data decompression method, and information processing device
CN94120709.9A CN1099766C (en) 1994-06-16 1994-12-22 Data compressing method, data recovery method and information processing device
SG1996002756A SG52323A1 (en) 1994-06-16 1994-12-22 Data compressing method data restoring method and information processing apparatus
DE69433620T DE69433620T2 (en) 1994-06-16 1994-12-22 Data compression method
KR1019940035931A KR100260827B1 (en) 1994-06-16 1994-12-22 Method and device for data compression and decompression
EP94309663A EP0687995B1 (en) 1994-06-16 1994-12-22 Data compressing method
US08/362,019 US5646617A (en) 1994-06-16 1994-12-22 Data compressing method, data restoring method, and information processing apparatus
TW83112037A TW297969B (en) 1993-06-22 1994-12-22

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP15078993 1993-06-22
JP5-150789 1993-06-22
JP5-170402 1993-07-09
JP17040293 1993-07-09
JP15809994A JP3132293B2 (en) 1993-06-22 1994-06-16 Data compression method, data decompression method, and information processing device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2000166584A Division JP3449338B2 (en) 1993-06-22 2000-06-02 Data compression method, data decompression method, and information processing device

Publications (2)

Publication Number Publication Date
JPH0773013A true JPH0773013A (en) 1995-03-17
JP3132293B2 JP3132293B2 (en) 2001-02-05

Family

ID=27320001

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15809994A Expired - Lifetime JP3132293B2 (en) 1993-06-22 1994-06-16 Data compression method, data decompression method, and information processing device

Country Status (2)

Country Link
JP (1) JP3132293B2 (en)
TW (1) TW297969B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020031509A (en) * 2000-10-20 2002-05-02 김영돈, 정춘보 Method for managementing data at program prodution-tool
JP2004511928A (en) * 2000-07-25 2004-04-15 ペリビット・ネットワークス,インコーポレイテッド System and method for progressive and continuous data compression
JP2013197846A (en) * 2012-03-19 2013-09-30 Nippon Telegr & Teleph Corp <Ntt> Data transmission system, data transmission method, transmission station apparatus, and receiving station apparatus
WO2015029329A1 (en) * 2013-08-27 2015-03-05 International Business Machines Corporation Data decompression utilizing pre-expanded dictionaries during decompression
JPWO2013094010A1 (en) * 2011-12-20 2015-04-27 キヤノン株式会社 Data transfer device, data transfer method, and inter-chip communication system
JP2020521408A (en) * 2017-05-19 2020-07-16 スズキ,タカシ Computerized method of data compression and analysis

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004511928A (en) * 2000-07-25 2004-04-15 ペリビット・ネットワークス,インコーポレイテッド System and method for progressive and continuous data compression
JP4759214B2 (en) * 2000-07-25 2011-08-31 ジュニパー ネットワークス, インコーポレイテッド System and method for progressive and continuous data compression
KR20020031509A (en) * 2000-10-20 2002-05-02 김영돈, 정춘보 Method for managementing data at program prodution-tool
JPWO2013094010A1 (en) * 2011-12-20 2015-04-27 キヤノン株式会社 Data transfer device, data transfer method, and inter-chip communication system
JP2013197846A (en) * 2012-03-19 2013-09-30 Nippon Telegr & Teleph Corp <Ntt> Data transmission system, data transmission method, transmission station apparatus, and receiving station apparatus
WO2015029329A1 (en) * 2013-08-27 2015-03-05 International Business Machines Corporation Data decompression utilizing pre-expanded dictionaries during decompression
JP2016533046A (en) * 2013-08-27 2016-10-20 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Data restoration using pre-expansion dictionary during restoration
JP2020521408A (en) * 2017-05-19 2020-07-16 スズキ,タカシ Computerized method of data compression and analysis

Also Published As

Publication number Publication date
TW297969B (en) 1997-02-11
JP3132293B2 (en) 2001-02-05

Similar Documents

Publication Publication Date Title
US5229768A (en) Adaptive data compression system
KR100260827B1 (en) Method and device for data compression and decompression
JP3009727B2 (en) Improved data compression device
JP3299912B2 (en) Method and apparatus for compressing and decompressing fonts
US5933104A (en) Method and system for compression and decompression using variable-sized offset and length fields
JP3935952B2 (en) Lempel-Ziv data compression technology using dictionaries pre-filled with frequent character combinations, words and / or phrases
JP3273119B2 (en) Data compression / decompression device
JP3337633B2 (en) Data compression method and data decompression method, and computer-readable recording medium recording data compression program or data decompression program
US20160321282A1 (en) Extracting method, information processing method, computer product, extracting apparatus, and information processing apparatus
KR100894002B1 (en) Device and data method for selective compression and decompression and data format for compressed data
KR100331351B1 (en) Method and apparatus for compressing and decompressing image data
KR20000068018A (en) Data compression and decompression system with immediate dictionary updating interleaved with string search
KR100252444B1 (en) Information processing apparatus
KR100490240B1 (en) Data compressing apparatus, data decompressing apparatus, data compressing method, data decompressing method, and program recording medium
JPH0869370A (en) Method and system for compression of data
KR19990029331A (en) Method and apparatus for encoding variant Rempel-Jib 1
JP3449338B2 (en) Data compression method, data decompression method, and information processing device
JP3132293B2 (en) Data compression method, data decompression method, and information processing device
US6834283B1 (en) Data compression/decompression apparatus using additional code and method thereof
US20130332433A1 (en) Computer product, generating apparatus, and generating method
JP3368157B2 (en) Data compression apparatus, method and system
JP3266419B2 (en) Data compression / decompression method
US20090212981A1 (en) Bidirectional context model for adaptive compression
JP3372822B2 (en) Data compression apparatus, method and system, and storage medium
JP5149454B1 (en) Recording medium on which YKM format compression program is recorded

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

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

Free format text: PAYMENT UNTIL: 20071124

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20081124

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20091124

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20091124

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20101124

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20101124

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20111124

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20111124

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20121124

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20121124

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20131124

Year of fee payment: 13

EXPY Cancellation because of completion of term