JP2823917B2 - Data compression method - Google Patents

Data compression method

Info

Publication number
JP2823917B2
JP2823917B2 JP507890A JP507890A JP2823917B2 JP 2823917 B2 JP2823917 B2 JP 2823917B2 JP 507890 A JP507890 A JP 507890A JP 507890 A JP507890 A JP 507890A JP 2823917 B2 JP2823917 B2 JP 2823917B2
Authority
JP
Japan
Prior art keywords
buffer
data
divided
length
matching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP507890A
Other languages
Japanese (ja)
Other versions
JPH03209922A (en
Inventor
泰彦 中野
茂 吉田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP507890A priority Critical patent/JP2823917B2/en
Publication of JPH03209922A publication Critical patent/JPH03209922A/en
Application granted granted Critical
Publication of JP2823917B2 publication Critical patent/JP2823917B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 [概要] 文字等の入力データ系列を、参照テキストに登録され
た既に符号化済みの系列の複製として圧縮符号化するデ
ータ圧縮方式に関し、 参照テキストの更新と検索を高速化することを目的と
し、 参照テキストを複数領域に分割して順次符号化済みデ
ータ系列を登録し、参照テキストの検索は登録の新しい
分割領域から登録の古い分割領域に向かって行い、更に
参照テキストが一杯になった場合には、最も登録の古い
分割領域を更新するように構成する。
DETAILED DESCRIPTION OF THE INVENTION [Summary] The present invention relates to a data compression method for compressing and encoding an input data sequence such as a character as a copy of an already encoded sequence registered in a reference text. The reference text is divided into a plurality of regions, and the encoded data series is registered sequentially.The reference text is searched from the newly registered divided region to the old registered divided region, and further, the reference text is searched. When is full, the oldest registered divided area is updated.

[産業上の利用分野] 本発明は、文字等の入力データ系列を、参照テキスト
に登録された既に符号化済みの系列の複製として圧縮符
号化するデータ圧縮方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data compression method for compressing and encoding an input data sequence such as a character as a copy of an already encoded sequence registered in a reference text.

文字等のコード列情報を伝達・蓄積する際には、デー
タ量を低減して伝送時間の短縮と記憶容量の低減を図る
ためコード情報を圧縮符号化しており、この圧縮符号化
としては、過去のデータ系列を登録した参照テキストの
任意の位置から入力コード情報に一致する最大長さの部
分列を取出し、過去の系列の複製として符号化するユニ
バーサル符号化が行われ、演算の高速化と同時に高圧縮
率が得を得る必要がある。
When transmitting and storing code string information such as characters, code information is compressed and coded to reduce the amount of data to reduce transmission time and storage capacity. Universal coding is performed to extract a substring of the maximum length that matches the input code information from an arbitrary position in the reference text in which the data series has been registered, and encode it as a copy of the past series. It is necessary to obtain a high compression ratio.

[従来の技術] 一般に、蓄積、伝送すべきデータの容量が大きいと
き、通信回線や記憶装置の容量を有効に利用するため、
データ列を圧縮して伝送や蓄積を行い、再度、そのデー
タを使用するときに元のデータ列に復元する方法が良く
用いられる。
[Prior art] Generally, when the capacity of data to be stored and transmitted is large, in order to effectively use the capacity of a communication line or a storage device,
A method of compressing a data string for transmission or storage and restoring the original data string when the data is used again is often used.

従来、文字コードを能率良く圧縮する方式としてZiv
−Lempel符号(以下「ZL符号」という)が知られている
(例えば宗像清治著,「Ziv−Lempelデータ圧縮法」,
情報処理,pp.2〜6,vol.26,NO.1,1985を参照のこと)。
Conventionally, Ziv was used as a method to efficiently compress character codes.
-Lempel code (hereinafter referred to as "ZL code") is known (for example, "Ziv-Lempel data compression method" by Seiji Munakata,
Information processing, pp. 2-6, vol. 26, NO. 1, 1985).

ZL符号には、 ユニバーサル型と、 増分分解型(Incremental persing) の2つのアルゴリズムの提案されている。この2つのア
ルゴリズムの間では、圧縮率はユニバーサル型の方が優
れており、処理速度は増分分解型の方が早いという特徴
がある。
Two algorithms have been proposed for ZL code: universal type and incremental persing. Between these two algorithms, the compression ratio is superior in the universal type, and the processing speed is faster in the incremental decomposition type.

これら2つのアルゴリズムの内、圧縮率が高いユニバ
ーサル型ZL符号は、入力した文字列を以前に入力した符
号化済みの文字列から最大長一致する文字列を検索し、
その最大長一致する文字列を複製として符号化する。
Among these two algorithms, the universal ZL code with a high compression ratio searches the input character string for the maximum length matching character string from the previously input encoded character string,
The character string that matches the maximum length is encoded as a duplicate.

ここでデータ圧縮は文字コードに限らず、一般のデー
タにも適用できるが、以下の説明では情報理論等で使わ
れている呼称を踏襲し、データの1wordを文字、その集
合を文字列と呼ぶことにする。
Here, data compression can be applied not only to character codes but also to general data. In the following description, one word of data is called a character, and the set is called a character string, following the names used in information theory and the like. I will.

第5図にユニバーサル型ZL符号器の原理を示す。 FIG. 5 shows the principle of the universal ZL encoder.

第5図において、Pバッファ12には符号化済みの文字
列が格納されており、Qバッファ10にはこれら符号化す
る文字列が格納されている。Qバッファ10の入力文字列
とPバッファ12の登録されている全ての文字列(部分
列)とを検索照合し、Pバッファ12中で一致する最大長
の部分列を求める。そして、Pバッファ12中の最大一致
長をもつ部分列を指定するため、次の情報の組を符号化
する。
In FIG. 5, a coded character string is stored in a P buffer 12, and a character string to be coded is stored in a Q buffer 10. The input character string of the Q buffer 10 and all the registered character strings (substrings) of the P buffer 12 are searched and collated, and a matching maximum length substring in the P buffer 12 is obtained. Then, in order to specify the subsequence having the maximum matching length in the P buffer 12, the following information set is encoded.

次にQバッファ10内の符号化した文字列をPバッファ
12に移して、符号化した文字数分の新たな文字を登録す
る。以下、同様の操作を繰り返し、入力データを部分列
に分解して順次符号化する。
Next, the encoded character string in the Q buffer 10 is
Move to step 12 to register new characters for the number of encoded characters. Hereinafter, the same operation is repeated to decompose the input data into sub-sequences and sequentially encode them.

第6図は従来方式の一例を示し、部号語が2バイトで
表わされる場合、例えばPバッファ12を12bit、Qバッ
ファ10を4bitで表わしている。Pバッファ12上での検索
は、Pバッファ12の左側から行われ、もし一致する文字
列がなければ、INPUTポインタのところに入力データ系
列が新たに登録される。
FIG. 6 shows an example of the conventional system. In the case where a symbol is represented by 2 bytes, for example, the P buffer 12 is represented by 12 bits and the Q buffer 10 is represented by 4 bits. The search on the P buffer 12 is performed from the left side of the P buffer 12, and if there is no matching character string, an input data sequence is newly registered at the INPUT pointer.

[発明が解決しようとする課題] このようなユニバーサル型ZL符号方式で圧縮率を向上
させるには、できるだけ多くの参照テキストとしてのP
バッファの登録が必要であり、またQバッファのビット
幅で決まるマッチングによる一致長が大きさを制限なし
に表せることが理想である。
[Problems to be Solved by the Invention] In order to improve the compression ratio in such a universal ZL coding method, as many reference texts as possible
Ideally, it is necessary to register a buffer, and the matching length determined by the matching determined by the bit width of the Q buffer can express the size without limitation.

しかし、実際には、ソフトウェアで符号化・復合化す
るときは、単にPバッファ12及びQバッファ10を大きく
とると、バッファアドレスで決まる符号語データが大き
くなり、結果的に圧縮率が悪化する。また、参照テキス
トが増えるので、一致検索に時間がかかり処理スピード
も落ちる。
However, in practice, when encoding / decoding by software, if the P buffer 12 and the Q buffer 10 are simply made large, the code word data determined by the buffer address becomes large, and as a result, the compression ratio deteriorates. Also, since the number of reference texts increases, it takes time to perform a match search, and the processing speed is reduced.

本発明は、このような従来の問題点に鑑みてなされた
もので、参照テキストを大きくした際の一致検索と更新
を高速化するデータ圧縮方式を提供することを目的とす
る。
The present invention has been made in view of such a conventional problem, and an object of the present invention is to provide a data compression method that speeds up a match search and an update when a reference text is enlarged.

[課題を解決するための手段] 第1図は本発明の原理説明図である。[Means for Solving the Problems] FIG. 1 is an explanatory view of the principle of the present invention.

まず本発明は、データ系列を第1バッファ(Qバッ
フ)10に入力し、既に符号化済みのデータ系列が登録さ
れている参照テキストとしての第2バッファ(Pバッフ
ァ)12を検索して入力データ系列に一致する符号化済み
データ系列の最大長一致の部分列を求め、該最大長一致
部分の開始位置と一致長との組を符号語として出力して
圧縮符号化するデータ圧縮方式を対象とする。
First, according to the present invention, a data sequence is input to a first buffer (Q buffer) 10 and a second buffer (P buffer) 12 as a reference text in which an already encoded data sequence is registered is searched for input data. A data compression method for obtaining a maximum length matching subsequence of an encoded data sequence matching a sequence, outputting a set of a start position of the maximum length matching portion and a matching length as a codeword, and compressing and encoding the data sequence. I do.

このようなデータ圧縮方式につき本発明にあっては、
第2バッファ12を複数領域12−1〜12nに分割して符号
化済みデータを順次登録し、分割領域12−1〜12−nの
内の登録の新しい分割領域から登録の古い領域に向けて
入力データ系列との一致検索を行い、更に全ての分割領
域12−1〜12−nが登録データ系列で満たされた場合に
は、最も登録の古い分割領域を更新するように構成す
る。
In the present invention regarding such a data compression method,
The second buffer 12 is divided into a plurality of regions 12-1 to 12n, and the encoded data is sequentially registered. From the newly registered divided regions in the divided regions 12-1 to 12-n, the regions are registered from the newly registered region to the old registered region. A search for a match with the input data series is performed, and if all the divided areas 12-1 to 12-n are filled with the registered data series, the divided area with the oldest registration is updated.

更に本発明にあっては、参照テキストとしての第2バ
ッファ12を大きくしながら、符号語を小さくして圧縮率
を向上させるため、検索された最大長一致部分の開始位
置を第2バッファ12の分割領域12−1〜12−nの領域番
号と領域内位置とに分け、領域内位置は符号語の最大長
さ一致部分の開始位置として部号化し、一方、領域番号
は符号語とは別個に第2バッファ12に識別データとして
持つことにより、一致長検索に適したビット幅に第2バ
ッファ12の検索インデックをビット幅を縮小させ、この
縮小させたビット分を第1バッファ10に割り当てて一致
長検索の許容長さを拡大させるように構成する。
Further, in the present invention, in order to increase the second buffer 12 as a reference text while reducing the code word and improving the compression ratio, the start position of the searched maximum length matching portion is set in the second buffer 12. The region numbers of the divided regions 12-1 to 12-n are divided into the region number and the position in the region, and the position in the region is numbered as the start position of the maximum length matching portion of the code word, while the region number is different from the code word. By having the second buffer 12 as identification data, the search index of the second buffer 12 is reduced in bit width to a bit width suitable for a match length search, and the reduced bits are allocated to the first buffer 10. It is configured to extend the allowable length of the match length search.

[作用] このような構成を備えた本発明のデータ圧縮方式によ
れば、符号化の途中で、第2バッファ12の全ての分割領
域12−1〜12−nが一杯になったときは、登録の一番古
い分割領域を消去して新たに登録していくことにより、
従来では全体として行っていた面倒な第2バッファ12の
更新作業が大幅に削減され、処理の高速化が可能とな
る。
[Operation] According to the data compression system of the present invention having such a configuration, when all the divided areas 12-1 to 12-n of the second buffer 12 become full during encoding, By deleting the oldest divided area and newly registering it,
Conventionally, the troublesome work of updating the second buffer 12 as a whole is greatly reduced, and the processing can be speeded up.

また登録の新しい第2バッファ12の分割領域から検索
することにより、登録されたばかりの新しい情報から検
索できるので、検索が短い時間で済む。
In addition, by searching from the newly-registered divided area of the second buffer 12, it is possible to search from new information that has just been registered, so that the search can be completed in a short time.

[実施例] 第2図は符号器を例にとって本発明の一実施例を示し
た実施例構成図であり、ユニバーサル型ZL符号化で実際
的な方法として知られたLZSS符号化方式(T.C.Bell:Bet
ter OPM/L Text Compression,IEEE Trans.on Commom.,V
ol.34,No.12,1986参照)により符号語データを2バイト
で表わす場合を例にとっている。
Embodiment FIG. 2 is a block diagram showing an embodiment of the present invention, taking an encoder as an example, and shows an LZSS encoding method (TCBell: Bet
ter OPM / L Text Compression, IEEE Trans.on Commom., V
ol. 34, No. 12, 1986) in which codeword data is represented by 2 bytes.

第2図において、14はデータ圧縮装置であり、第1バ
ッファとしてのQバッファ10と、第2バッファとしての
Pバッファ12を備え、この実施例にあっては、Pバッフ
ァ12は3つの分割領域12−1,12−3,12−3に分割されて
いる。
In FIG. 2, reference numeral 14 denotes a data compression device which includes a Q buffer 10 as a first buffer and a P buffer 12 as a second buffer. In this embodiment, the P buffer 12 has three divided areas. It is divided into 12-1, 12-3, 12-3.

尚、Pバッファ12の分割領域は、12−1,12−2が登録
済みで、現在残りの領域12−3への登録が行われている
状態を示している。
It should be noted that the divided areas of the P buffer 12 indicate that 12-1 and 12-2 have been registered, and the registration to the remaining area 12-3 is currently being performed.

16はファイル/伝送装置であり、データ圧縮装置14か
ら出力される最大長一致部分の開始位置と一致長との組
のデータ構造をもつ符号語又は生データ(入力文字列そ
のもの)を記憶又は伝送する。
A file / transmission device 16 stores or transmits a code word or raw data (input character string itself) having a data structure of a set of a start position of a maximum length matching portion and a matching length output from the data compression device 14. I do.

ここで本発明の処理を第6図の従来方式と対比して説
明すると次のようになる。
Here, the processing of the present invention will be described in comparison with the conventional method shown in FIG.

まず第6図の従来方式では、符号語を2バイトで表す
とき、例えばPバッファ12のサイズを12ビット、Qバッ
ファ10のサイズを4ビットで表し、Pバッファ12上での
検索はPバッファ12の左側から行われ、もし一致する文
字列がなければ、図中のINPUTポインタのところに新た
に登録される。この方法では、文字の比較が、現在のQ
バッファ10の内容とは関係が薄いと考えられる古い登録
文字から始められ、検索時間がかかっている。また、P
バッファ12が一杯になったときの更新法として、 Qバッファ10上の符号化が終わった分だけ、Pバッフ
ァ12を左にシフトする方法や、 一続きのPバッファ12を全てクリアし、最初から登録
をやり直す方法があった。
First, in the conventional method shown in FIG. 6, when the code word is represented by 2 bytes, for example, the size of the P buffer 12 is represented by 12 bits, and the size of the Q buffer 10 is represented by 4 bits. From the left side, and if there is no matching character string, it is newly registered at the INPUT pointer in the figure. In this method, the character comparison is
The search starts with an old registered character that is considered to have little relation to the contents of the buffer 10 and takes a long time to search. Also, P
As an update method when the buffer 12 becomes full, a method of shifting the P buffer 12 to the left as much as the encoding on the Q buffer 10 is completed, or a method of clearing a continuous P buffer 12 and starting from the beginning There was a way to redo the registration.

しかし、の一部シフト法はPバッファ12が一度一杯
になると、毎回、更新可能が必要で処理が煩雑になる。
またのオールクリア法は、現在までの学習されたPバ
ッファ12が一度に失われ、符号化されない生のデータが
出力される可能性が大きくなり効率が悪い。
However, in the partial shift method, once the P-buffer 12 becomes full, it is necessary to be able to update each time, and the processing becomes complicated.
In the all clear method, the possibility that the learned P buffer 12 up to now is lost at a time and uncoded raw data is output increases, resulting in poor efficiency.

これに対し本発明では、従来は一続きであったPバッ
ファ12を複数領域、例えば3つの領域に12−1〜12−3
に分け、Pバッファ12の中のどのバッファ分割領域が使
われているかは、バッファ内の識別コードに組み込むこ
ととする。
On the other hand, in the present invention, the P buffer 12 which is conventionally continuous is divided into a plurality of areas, for example, three areas 12-1 to 12-3.
Which of the buffer divided areas in the P buffer 12 is used is incorporated into the identification code in the buffer.

Pバッファ12の検索は、検索を短い時間で終了させる
ために、一番登録の新しい分割領域12−3から検索を始
める。また、Pバッファ12の全ての分割領域12−1〜12
−3が一杯になったら、関係の薄いと思われる登録が一
番古いPバッファ12の分割領域12−1のみをクリアし、
クリアした分割領域12−1に新しく登録していくことで
検索の効率が図れ、且つ他の2つの分割領域12−2,12−
3はそのまま利用できる。
The search of the P buffer 12 starts from the newest registered sub-region 12-3 in order to complete the search in a short time. Further, all the divided areas 12-1 to 12-12 of the P buffer 12 are
When -3 is full, the registration that seems to be less relevant clears only the oldest divided area 12-1 of the P buffer 12,
By newly registering in the cleared divided area 12-1, search efficiency can be improved, and the other two divided areas 12-2, 12-
3 can be used as it is.

また、第2図の実施例にあたっては、第6図の従来方
式でPバッファ12が12ビット、Qバッファ、10が4ビッ
トであったものを、それぞれ11ビット、及び5ビットと
している。その結果、Pバッファ12が1ビット減った
分、参照テキストの量が半分になるが、3つの分割領域
12−1〜12−3に分けて持つことにより、参照テキスト
の量は等化的に3/2になる。またQバッファが1ビット
増えているので、その分マッチング一致長が長くとれ圧
縮率も向上する。
In the embodiment shown in FIG. 2, the P buffer 12 has 12 bits, the Q buffer and 10 have 4 bits in the conventional system shown in FIG. 6, but 11 bits and 5 bits, respectively. As a result, the amount of the reference text is reduced by half as much as the P buffer 12 is reduced by one bit.
By having the reference text divided into 12-1 to 12-3, the amount of the reference text is equalized to 3/2. Further, since the Q buffer is increased by one bit, the matching matching length can be lengthened and the compression ratio can be improved.

更に詳細に説明すると、第6図の従来方式では、Pバ
ッファ12を12ビット、Qバッファ10を4ビットで表わ
し、更に8個のデータ毎に符号語データか生データかを
識別するための識別データが格納されている。即ち、識
別データの1ビットずつが続いて並ぶ8個のデータが符
号語データか生データかを識別する。
More specifically, in the conventional system shown in FIG. 6, the P buffer 12 is represented by 12 bits and the Q buffer 10 is represented by 4 bits, and for every 8 data, an identification for identifying codeword data or raw data is performed. Data is stored. That is, it is determined whether the eight pieces of data in which the identification data are successively arranged one bit at a time are codeword data or raw data.

ここで圧縮率を上げようとしてPバッファ121及びQ
バッファ10のビット幅を仮に1ビットずつ増やしたとす
ると、開始位置と一致長の組でなる符号語データが8の
倍数でなくなり、データを転送する際にビット詰めとい
う面倒な処理が必要となる。また8の倍数となるように
Pバッファ12及びQバッファ10のビット幅を、例えば18
ビット、6ビットに増やしたとすると、最大一致長の開
始位置と一致長との組でなる符号語が3バイトにもな
り、最大一致長が2バイト又は3バイトであった場合
は、共に複製で表わすことでは圧縮されず、符号化の効
率が悪くなる。
Here, the P buffer 121 and Q
Assuming that the bit width of the buffer 10 is increased by one bit, the code word data which is a set of the start position and the matching length is not a multiple of 8, and a complicated process of packing bits is required when transferring data. Also, the bit widths of the P buffer 12 and the Q buffer 10 are set to, for example, 18 so as to be a multiple of 8.
If the number of bits is increased to 6 bits, the code word consisting of the start position of the maximum match length and the match length becomes 3 bytes, and if the maximum match length is 2 bytes or 3 bytes, both are copied. If it is represented, it will not be compressed, and the encoding efficiency will be reduced.

これに対し本発明では、一続きのPバッファ12を第2
図のように例えば3つの分割領域12−1〜12−3に分け
て持ち、どの分割領域が使われているかは、Pバッファ
12の識別データを1データ当り2ビットとして持たせる
ことにより、1組の符号語データの長さを2バイトのま
ま変化させずに圧縮率を上げることができる。
On the other hand, in the present invention, the continuous P buffer 12 is
As shown in the figure, for example, it is divided into three divided areas 12-1 to 12-3, and which divided area is used is determined by a P buffer.
By providing 12 pieces of identification data as 2 bits per data, it is possible to increase the compression ratio without changing the length of one set of code word data at 2 bytes.

次に第3図の動作フロー図を参照して本発明の処理動
作を説明する。
Next, the processing operation of the present invention will be described with reference to the operation flowchart of FIG.

まずステップS1(以下「ステップ」は省略)入力文字
列をQバッファに読み込む。次にS2で入力文字列の終端
でなければS3に進み、終端であれば処理を終了する。。
First, an input character string is read into a Q buffer in step S1 (hereinafter "step" is omitted). Next, if it is not the end of the input character string in S2, the process proceeds to S3, and if it is, the process ends. .

S3にあってはi=Newとする。ここでNewは、一番新し
いPバッファの分割領域を示すインデックスである。
In S3, i = New. Here, New is an index indicating the newest P buffer divided area.

次にS4でPバッファ12の分割領域P[i]をスキャン
し、一致する文字を探す。一致すれば、S5に進んで分割
領域P[i]中の一致開始位置と一致長をレジスタ等に
登録、更新してS6に進み、もし一致する文字が分割領域
P[i]になければ、そのままS6へ進む。
Next, in S4, the divided area P [i] of the P buffer 12 is scanned to find a matching character. If they match, the process proceeds to S5, where the match start position and the match length in the divided area P [i] are registered and updated in a register or the like, and the process proceeds to S6. If the matching character is not in the divided area P [i], Proceed directly to S6.

S6ではiを関数f(i)に従って更新する。関数f
(i)によるiの更新は、最初はi=1,2,3と更新さ
れ、一杯になって登録の古いi=1のクリア更新が行な
われると、次にi=2,3,1と更新され、3回目の更新で
はi=3,1,2と更新され、以下これを繰り返す。
In S6, i is updated according to the function f (i). Function f
In the update of i according to (i), i = 1,2,3 is updated at first, and when it is full and clear update of old registered i = 1 is performed, then i = 2,3,1 is updated. It is updated, and in the third update, it is updated as i = 3, 1, 2, and so on.

次にS7に進んでNew=iであるか、即ち全ての分割領
域の検索が終了したか否かを判断し、終了していればS8
へ、終了していなければS3に戻る。
Next, the process proceeds to S7 to determine whether New = i, that is, whether or not the search for all the divided areas has been completed.
If not, return to S3.

全てのPバッファ分割領域の検索が終り、S8で一致す
る文字がPバッファ中になければ、S9で生データそのも
のを符号語データ列として出力してS11のPバッファ登
録処理に進む。S8で一致する文字がPバッファ中にある
ことが判別されると、S5で登録した一致開始位置(特定
のPバッファ分割領域内の領域位置)と一致長の組でな
る符号語データを出力し、S11に進み、以下、S2で文字
列の終了が判別されるまで同じ処理を繰り返す。
When the search of all the P buffer divided areas is completed and there is no matching character in the P buffer in S8, the raw data itself is output as a codeword data string in S9, and the process proceeds to the P buffer registration processing in S11. If it is determined in S8 that a matching character is present in the P buffer, codeword data consisting of a set of a matching start position (region position in a specific P buffer divided region) registered in S5 and a matching length is output. , S11, and thereafter, the same processing is repeated until the end of the character string is determined in S2.

第4図は、第3図のS11におけるPバッファ登録処理
をサブルーチンとして示した動作フロー図である。
FIG. 4 is an operation flowchart showing a P buffer registration process in S11 of FIG. 3 as a subroutine.

第4図において、まずS1が登録で最も新しい分割領域
P[New]が一杯かどうかを調べ、もし一杯であればS2
に進む。一方、まだ登録できる余裕があればS5へ進む。
In FIG. 4, it is first checked whether or not S1 is full and the newest divided area P [New] is registered.
Proceed to. On the other hand, if there is still room for registration, the process proceeds to S5.

S2では、一番古いPバッファ分割領域のインデックス
Oldを計算し、S3で最も登録の古い分割領域P[old]を
クリアし、S4でクリア後にNew=Oldに置き換えてS5にへ
進む。S5ではクリア状態にある分割領域P[New]に生
データを登録する。
In S2, the index of the oldest P buffer divided area
Old is calculated, the oldest registered divided area P [old] is cleared in S3, and after clearing in S4, it is replaced with New = Old and the process proceeds to S5. In S5, the raw data is registered in the divided area P [New] in the clear state.

尚、上記の実施例は、Pバッファ12を3つの領域に分
割した場合を例にとるものであったが、必要に応じて任
意の数に分割できる。
In the above embodiment, the case where the P buffer 12 is divided into three areas is taken as an example. However, the P buffer 12 can be divided into an arbitrary number as needed.

[発明の効果] 以上説明したように本発明によれば、参照テキストと
マッチング一致長さの許容長さを大きくしても、参照テ
キストの検索及び更新を高速に行うことができる。
[Effects of the Invention] As described above, according to the present invention, even when the allowable length of the reference text and the matching length is increased, the reference text can be searched and updated at high speed.

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

第1図は本発明の原理説明図; 第2図は本発明の実施例構成図; 第3図は本発明の動作フロー図; 第4図は本発明のPバッファ登録処理の動作フロー図; 第5図はユニバーサル型ZL符号化の原理説明図; 第6図は従来方式の説明図である。 図中、 10:第1バッファ(Qバッファ) 12:第2バッファ(Pバッファ) 12−1〜12−n:分割領域 14:検索装置 16:符号器 FIG. 1 is a diagram for explaining the principle of the present invention; FIG. 2 is a block diagram of an embodiment of the present invention; FIG. 3 is an operational flow diagram of the present invention; FIG. 5 is a diagram for explaining the principle of universal ZL encoding; FIG. 6 is a diagram for explaining a conventional system. In the figure, 10: first buffer (Q buffer) 12: second buffer (P buffer) 12-1 to 12-n: divided area 14: search device 16: encoder

フロントページの続き (58)調査した分野(Int.Cl.6,DB名) H03M 7/30Continuation of front page (58) Field surveyed (Int.Cl. 6 , DB name) H03M 7/30

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】文字等のデータ系列を第1バッファ(10)
に入力し、既に符号化済みの過去のデータ系列が登録さ
れている第2バッファ(12)を検索して前記第1バッフ
ァ(10)のデータ列に一致する符号化済みのデータ列の
最大長一致部分を求め、該最大長一致部分の開始位置と
一致長との組の符号語として出力して圧縮符号化するデ
ータ圧縮方式に於いて、 前記第2バッファ(12)を複数領域(12−1〜12−n)
に分割しで符号化済みデータ列を順次登録し、該分割領
域(12−1〜12−n)の内の符号化済みデータ系列の新
しい分割領域から古い分割領域に向けて前記一致検索を
行い、全ての分割領域が登録データ系列で満たされた場
合は、最も古い分割領域から更新していくことを特徴と
するデータ圧縮方式。
A first buffer for storing a data series such as a character;
And searches the second buffer (12) in which the already encoded past data sequence is registered, and searches for the maximum length of the encoded data sequence that matches the data sequence of the first buffer (10). In a data compression method in which a matching part is obtained and output as a code word of a set of a start position of the maximum length matching part and a matching length and compression encoding is performed, the second buffer (12) includes a plurality of areas (12- 1-12-n)
, The encoded data sequence is sequentially registered, and the matching search is performed from the new divided region of the encoded data sequence in the divided regions (12-1 to 12-n) to the old divided region. A data compression method characterized by updating the oldest divided area when all the divided areas are filled with the registered data sequence.
【請求項2】前記最大長一致部分の開始位置を、前記第
2バッファ(12)の分割領域(12−1〜12−n)の領域
番号と領域内位置とに分け、該領域内位置は前記符号語
の最大一致長部分の開始位置として符号化し、前記領域
番号は符号語とは別個に前記第2バッファ(12)に識別
データとして持つことにより、一致長検索に適したビッ
ト幅に該第2バッファ(12)の検索インデックスのビッ
ト幅を縮小させ、該縮小させたビット分を前記第1バッ
ファ(10)に割り当てて一致長検索の許容長さを拡大さ
せたことを特徴とする請求項1記載のデータ圧縮方式。
2. A start position of the maximum length matching portion is divided into an area number and an area position of a divided area (12-1 to 12-n) of the second buffer (12). It is encoded as the start position of the maximum match length portion of the code word, and the area number is stored in the second buffer (12) as identification data separately from the code word, so that the bit width suitable for match length search is obtained. The bit width of the search index of the second buffer (12) is reduced, and the reduced bit is allocated to the first buffer (10) to increase the allowable length of the match length search. Item 2. The data compression method according to Item 1.
JP507890A 1990-01-12 1990-01-12 Data compression method Expired - Lifetime JP2823917B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP507890A JP2823917B2 (en) 1990-01-12 1990-01-12 Data compression method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP507890A JP2823917B2 (en) 1990-01-12 1990-01-12 Data compression method

Publications (2)

Publication Number Publication Date
JPH03209922A JPH03209922A (en) 1991-09-12
JP2823917B2 true JP2823917B2 (en) 1998-11-11

Family

ID=11601355

Family Applications (1)

Application Number Title Priority Date Filing Date
JP507890A Expired - Lifetime JP2823917B2 (en) 1990-01-12 1990-01-12 Data compression method

Country Status (1)

Country Link
JP (1) JP2823917B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5590317A (en) * 1992-05-27 1996-12-31 Hitachi, Ltd. Document information compression and retrieval system and document information registration and retrieval method
JP4760727B2 (en) * 2007-02-07 2011-08-31 カシオ電子工業株式会社 Data compression apparatus, decoding apparatus thereof, method thereof, and program
JP6032291B2 (en) * 2012-12-19 2016-11-24 富士通株式会社 Compression program, compression apparatus, decompression program, decompression apparatus, and system

Also Published As

Publication number Publication date
JPH03209922A (en) 1991-09-12

Similar Documents

Publication Publication Date Title
US7403136B2 (en) Block data compression system, comprising a compression device and a decompression device and method for rapid block data compression with multi-byte search
JP3273119B2 (en) Data compression / decompression device
US5049881A (en) Apparatus and method for very high data rate-compression incorporating lossless data compression and expansion utilizing a hashing technique
US7079051B2 (en) In-place differential compression
US5970177A (en) Data compression using selective encoding
US20010051941A1 (en) Searching method of block sorting lossless compressed data, and encoding method suitable for searching data in block sorting lossless compressed data
JP3241788B2 (en) Data compression method
JPS6356726B2 (en)
JP2823917B2 (en) Data compression method
JP3350118B2 (en) Data encoding method and data restoration method
JP2940948B2 (en) Data compression method
JP3241787B2 (en) Data compression method
JP3105598B2 (en) Data compression method using universal code
JP3130324B2 (en) Data compression method
JP2823918B2 (en) Data compression method
JP2590287B2 (en) Data compression method and data compression apparatus
JP3199292B2 (en) Run-length extraction method, Huffman code conversion method, and MH coding processing method in Huffman code coding
JP3100206B2 (en) Data compression method
JP3073072B2 (en) Image data compression and decompression method
JPH05152971A (en) Data compressing/restoring method
US6819272B2 (en) System, method and computer readable medium for compressing a data sequence for partial decompressing
JP3078601B2 (en) Data compression method
JP3051501B2 (en) Data compression method
Klein et al. Parallel Lempel Ziv Coding
JPH0527943A (en) Data compressing system