JPH06324924A - Data compressing device - Google Patents

Data compressing device

Info

Publication number
JPH06324924A
JPH06324924A JP5107872A JP10787293A JPH06324924A JP H06324924 A JPH06324924 A JP H06324924A JP 5107872 A JP5107872 A JP 5107872A JP 10787293 A JP10787293 A JP 10787293A JP H06324924 A JPH06324924 A JP H06324924A
Authority
JP
Japan
Prior art keywords
data
compression
record
partial
same
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP5107872A
Other languages
Japanese (ja)
Inventor
Minoru Fujimoto
稔 藤本
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP5107872A priority Critical patent/JPH06324924A/en
Publication of JPH06324924A publication Critical patent/JPH06324924A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

(57)【要約】 【目的】 圧縮対象データに合った圧縮を可能とし、ま
た、一連のデータに対して圧縮条件を可変にできるデー
タ圧縮装置を得る。 【構成】 圧縮条件として一度に読み込むデータのサイ
ズと読み込んだデータを細分化してできる部分データの
個数とを設定する手段13、読み込んだデータを上記部
分データに分割する手段14、分割された各部分データ
を次に読み込んだデータの部分データとそれぞれ比較す
る手段15、この比較結果をもとに各部分データの計数
を計算する手段16、および、この計数結果からデータ
を圧縮して、上記設定した圧縮条件とともに書き込む手
段6とを備えている。 【効果】 圧縮対象データの冗長度が増し、最適なデー
タ圧縮が実現できる。
(57) [Abstract] [Purpose] To obtain a data compression apparatus which enables compression suitable for data to be compressed and which makes variable compression conditions for a series of data. [Structure] Means 13 for setting the size of data to be read at one time as a compression condition and the number of partial data obtained by subdividing the read data, means 14 for dividing the read data into the partial data, and each divided portion. The means 15 for comparing the data with the partial data of the next read data, the means 16 for calculating the count of each partial data based on the comparison result, and the data compressed from the count result are set as described above. A writing means 6 is provided together with the compression condition. [Effect] The redundancy of the compression target data is increased, and optimal data compression can be realized.

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 device for compressing and storing data in a data storage device.

【0002】[0002]

【従来の技術】従来、信号の種類が少なく、同一記号の
長い連がしばしば出現するようなデータの圧縮方法とし
て、連長法が利用されている。図3は従来のデータ圧縮
装置のブロックフローチャート図である。図において、
1は第1のデータ、2はデータ圧縮装置、3はデータ読
み取り手段、4はレコード比較手段、5はレコード計数
手段、6は第2のデータ7を書き込むデータ書き込み手
段である。また、図4は従来の圧縮装置で圧縮されたデ
ータの一例を示す図である。図において、8aは第1の
レコード、8bは第2のレコード、9は第1のデータ1
内の同一レコードの並び、10は圧縮開始を示す符号、
11は同一レコードの繰り返し回数、12は同一のレコ
ードの並び9の中の1レコードである。
2. Description of the Related Art Conventionally, a run length method has been used as a data compression method in which there are few kinds of signals and long runs of the same symbol often appear. FIG. 3 is a block flowchart of a conventional data compression device. In the figure,
Reference numeral 1 is first data, 2 is a data compression device, 3 is data reading means, 4 is record comparing means, 5 is record counting means, and 6 is data writing means for writing second data 7. FIG. 4 is a diagram showing an example of data compressed by a conventional compression device. In the figure, 8a is the first record, 8b is the second record, and 9 is the first data 1.
Of the same record in, 10 is a code indicating the start of compression,
Reference numeral 11 is the number of repetitions of the same record, and 12 is one record in the sequence 9 of the same record.

【0003】次に動作について説明する。まず、データ
読み取り手段3によって第1のデータ1を1レコード単
位で読み取る。次にレコード比較手段4によって第2の
レコード8bをその直前の第1のレコード8aと比較す
る。第2のレコード8bが第1のレコード8aと同一で
ある場合は同一レコードの並び9が検出されたとみな
し、レコード計数手段5によって同一レコードの繰り返
し回数を計数する。第2のレコード8bが第1のレコー
ド8aと異なる場合は同一レコードの並び9の終わりが
検出されたとみなし、データ書き込み手段6によって第
2のデータ7を書き込み、同一レコードの繰り返し回数
11を初期値に戻す。この時、同一レコードの繰り返し
回数11が予め定められた数より小さければ、第2のデ
ータ7として、同一レコードの繰り返し回数11と同じ
回数分の第1のレコード8aを書き込む。同一レコード
の繰り返し回数11が予め定められた数を超えていれ
ば、第2のデータ7として、圧縮開始を示す符号10と
同一レコードの繰り返し回数11と1回分の第1のレコ
ード12とを書き込む。この場合に、複数のレコードが
1つのレコードに圧縮されることとなる。以上の動作を
繰り返すことによりデータが圧縮される。
Next, the operation will be described. First, the data reading means 3 reads the first data 1 on a record-by-record basis. Next, the record comparison means 4 compares the second record 8b with the immediately preceding first record 8a. When the second record 8b is the same as the first record 8a, it is considered that the array 9 of the same records is detected, and the record counting means 5 counts the number of repetitions of the same record. When the second record 8b is different from the first record 8a, it is considered that the end of the array 9 of the same record is detected, the second data 7 is written by the data writing means 6, and the number of repetitions 11 of the same record is set to the initial value. Return to. At this time, if the number of repetitions 11 of the same record is smaller than a predetermined number, the first record 8a for the same number of times as the number of repetitions 11 of the same record is written as the second data 7. If the number of repetitions 11 of the same record exceeds a predetermined number, the code 10 indicating the start of compression, the number of repetitions 11 of the same record and the first record 12 for one time are written as the second data 7. . In this case, a plurality of records will be compressed into one record. Data is compressed by repeating the above operation.

【0004】[0004]

【発明が解決しようとする課題】従来のデータ圧縮装置
は以上のように構成されているので、圧縮対象のデータ
が類似のレコードが連続するようなものであったり、各
レコードが規則的に変化するようなものである場合に同
一のレコードの並びが検出されないため、データ圧縮が
できないといった問題点があった。また、個々のデータ
に合わせて圧縮条件を変化させると、それにともなって
復元条件も変化させる必要があり、効率的な作業が行え
なかった。
Since the conventional data compression apparatus is configured as described above, the data to be compressed is such that similar records are continuous or each record changes regularly. However, there is a problem that data compression cannot be performed because the same record sequence is not detected. Further, if the compression condition is changed according to individual data, the decompression condition also needs to be changed accordingly, which makes efficient work impossible.

【0005】本発明は上記のような問題点を解消するた
めになされたもので、データの種類に合った圧縮を可能
とし、また、一連のデータに対して圧縮条件を可変にで
きるデータ圧縮装置を得ることを目的とする。
The present invention has been made in order to solve the above-mentioned problems, and it is possible to perform compression suitable for the type of data, and a data compression apparatus that can change the compression condition for a series of data. Aim to get.

【0006】[0006]

【課題を解決するための手段】この発明に係るデータ圧
縮装置は、一度に読み込むデータのサイズを設定する手
段、入力した第1のデータを細分化してできる部分デー
タの個数を設定する手段、上記第1のデータを上記部分
データに分割する手段、分割された各部分データを次に
読み込んだデータの部分データとそれぞれ比較する手
段、この比較結果をもとに各部分データの計数を計算す
る手段、および、この計数結果からデータを圧縮して、
上記設定したデータのサイズと部分データの個数との条
件とともに第2のデータとして書き込む手段を備えてい
る。
A data compression apparatus according to the present invention comprises means for setting the size of data to be read at one time, means for setting the number of partial data obtained by subdividing the input first data, Means for dividing the first data into the partial data, means for comparing each divided partial data with partial data of the next read data, means for calculating the count of each partial data based on the comparison result , And compress the data from this counting result,
Means for writing the second data together with the conditions of the set data size and the number of partial data are provided.

【0007】[0007]

【作用】この発明においては、一度に読み込むデータの
サイズおよび入力したデータを細分化してできる部分デ
ータの個数を任意に設定することにより、部分データご
とにデータ圧縮を行う。
In the present invention, data compression is performed for each partial data by arbitrarily setting the size of the data to be read at one time and the number of partial data obtained by subdividing the input data.

【0008】[0008]

【実施例】【Example】

実施例1.以下、この発明の一実施例を図について説明
する。図1は本発明の一実施例を示すブロックフローチ
ャート図であり、図において、1〜3および6〜7は従
来のものと同一または相当部分である。13はデータ圧
縮条件設定手段であり圧縮対象データに合った圧縮条件
を任意に設定できる。14は読み込んだデータを設定さ
れた圧縮条件に従って分割するデータ分割手段、15は
データ分割手段14によって分割されたデータを次の分
割データとそれぞれ比較する分割データ比較手段、16
は分割したデータの繰り返し回数を計算する分割データ
計数手段である。
Example 1. An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block flow chart showing an embodiment of the present invention. In the figure, 1 to 3 and 6 to 7 are the same as or equivalent to those of the conventional one. A data compression condition setting unit 13 can arbitrarily set a compression condition suitable for the data to be compressed. Reference numeral 14 is a data dividing unit that divides the read data according to the set compression condition, 15 is a divided data comparing unit that compares the data divided by the data dividing unit 14 with the next divided data, 16
Is a divided data counting means for calculating the number of repetitions of divided data.

【0009】次に、動作について図2に示す文字データ
例を用いながら説明する。まず、データ圧縮条件設定手
段13により、一度に読み込むレコード数、レコードを
細分化してできる部分データの数、圧縮開始を示す符
号、および同一部分データの最大繰り返し回数を圧縮対
象データに合わせて設定する。ただし、上記細分化して
できる部分データとは、圧縮対象のデータの配列および
規則性をもとに、同一データの繰り返しが最も多く得ら
れるように細分化した時にできる部分データのことであ
る。データ読み取り手段3は、第1のデータ1を設定さ
れた上記レコード数だけ読み取る。データ分割手段14
は、読み込んだデータを該レコード数をもとにレコード
単位に分割する。さらに、設定された上記部分データ数
をもとに1レコードのデータがその数に分割される。次
に、分割データ比較手段15は分割されてできた部分デ
ータ(分割データ)を次のレコードの部分データと比較
する。例えば、図2(a)に示す圧縮前の文字データ1
7に対して、部分データの数を4とすると、第1のレコ
ード18は18a,18b,18c,18dに、第2の
レコード19は19a,19b,19c,19dに分割
され、分割データ比較手段15は18aと19a,18
bと19b,18cと19c,18dと19dをそれぞ
れ比較する。
Next, the operation will be described with reference to the character data example shown in FIG. First, the data compression condition setting means 13 sets the number of records to be read at one time, the number of partial data obtained by subdividing the records, a code indicating the start of compression, and the maximum number of repetitions of the same partial data, in accordance with the compression target data. . However, the partial data that can be subdivided refers to the partial data that can be subdivided so as to obtain the most repetitions of the same data based on the arrangement and regularity of the data to be compressed. The data reading means 3 reads the first data 1 by the set number of records. Data dividing means 14
Divides the read data in record units based on the number of records. Further, the data of one record is divided into the number based on the set number of partial data. Next, the divided data comparison means 15 compares the divided partial data (divided data) with the partial data of the next record. For example, the character data 1 before compression shown in FIG.
7, the number of partial data is 4, the first record 18 is divided into 18a, 18b, 18c and 18d, and the second record 19 is divided into 19a, 19b, 19c and 19d. 15 is 18a and 19a, 18
b and 19b, 18c and 19c, 18d and 19d are compared.

【0010】次に、分割データの比較を行った結果をも
とに、データ書き込み手段6によって圧縮後のデータが
書き込まれる。今、図2(a)において、第1のレコー
ド18と第2のレコード19とは部分データがすべて異
なるものとする。また、続くレコード20,21,2
2,23は同一のレコードであるとする。24は同一の
レコードの並びである。図2(b)は圧縮後のデータを
示すものであり、先頭には圧縮条件設定手段13によっ
て設定された一度に読み込むレコード数25、部分デー
タ数26、圧縮開始を示す符号27、および同一部分デ
ータの最大繰り返し回数28が書き込まれる。続いて、
レコード18がレコード19と全ての部分データについ
て異なることより、レコード18のデータが書き込まれ
る。
Next, based on the result of comparison of the divided data, the data writing means 6 writes the compressed data. 2A, it is assumed that the first record 18 and the second record 19 have different partial data. In addition, subsequent records 20, 21, 2
It is assumed that 2 and 23 are the same record. Reference numeral 24 is a row of the same records. FIG. 2B shows the data after compression. At the beginning, the number of records 25 read at once set by the compression condition setting means 13, the number of partial data 26, the code 27 indicating the start of compression, and the same portion are shown. The maximum number of data repetitions 28 is written. continue,
Since the record 18 is different from the record 19 for all partial data, the data of the record 18 is written.

【0011】次に、レコード19とレコード20とが同
様に比較される。もし、それぞれの部分データが全て同
一ならばレコード19からレコード23まで同一データ
が繰り返されることとなり、分割データ計数手段16に
より繰り返し回数29(=5)が計算される。計算され
た繰り返し回数が最大繰り返し回数28以下であれば、
圧縮開始符号27,同一データ繰り返し回数29(=
5),部分データ19aの順に書き込まれる。同様に、
19b,19c,19dについても書き込まれる。計算
された繰り返し回数が最大繰り返し回数28を超える場
合は、最大繰り返し回数28以内に収まるよう繰り返し
回数29を2回に分けて書き込むことになる。以下、上
記の動作を繰り返してデータ圧縮が行われ、第2のデー
タ7として格納される。また、第2のデータ7から第1
のデータ1へは、第2のデータの先頭に書き込まれた圧
縮条件をもとに、容易に復元可能である。したがって、
圧縮条件を変化させて再びデータ圧縮を行っても復元動
作に変化はなく、最適なデータ圧縮を実現することがで
きる。
Next, the record 19 and the record 20 are similarly compared. If all the partial data are the same, the same data is repeated from record 19 to record 23, and the divided data counting means 16 calculates the number of repetitions 29 (= 5). If the calculated number of iterations is less than or equal to the maximum number of iterations 28,
Compression start code 27, number of repetitions of the same data 29 (=
5) and the partial data 19a are written in this order. Similarly,
It is also written for 19b, 19c, and 19d. When the calculated number of repetitions exceeds the maximum number of repetitions 28, the number of repetitions 29 is written in two so that the number of repetitions falls within the maximum number of repetitions 28. Thereafter, the above operation is repeated to perform data compression, and the data is stored as the second data 7. Also, from the second data 7 to the first
Data 1 can be easily restored based on the compression condition written at the beginning of the second data. Therefore,
Even if the compression condition is changed and the data is compressed again, the decompression operation does not change, and the optimum data compression can be realized.

【0012】以上が図2(b)で示したデータ例の説明
であるが、上記レコード19とレコード20との比較に
おいて、もし、19aと20aの1組だけが同一で、1
9bと20b,19cと20c,19dと20dの3組
は異なるとすると、同一データが繰り返されるのは19
a〜23aだけであるので、圧縮後のデータとして圧縮
開始符号27,同一データ繰り返し回数29(=5),
部分データ19aを書き込んだ後、19b,20b,・
・,23b,19c,20c,・・,23c,19d,
20d,・・,23dの順に書き込まれることとする。
以上の動作説明で述べたように、圧縮対象データに合っ
た圧縮条件(同一データの繰り返し回数が大きくなるよ
うな部分データの分割)を任意に設定および変更でき、
最適なデータ圧縮を実現できる。
The above is the description of the data example shown in FIG. 2B. In the comparison between the records 19 and 20, if only one set of 19a and 20a is the same,
If three sets of 9b and 20b, 19c and 20c, 19d and 20d are different, the same data is repeated 19 times.
a to 23a, the compression start code 27, the same data repetition number 29 (= 5),
After writing the partial data 19a, 19b, 20b, ...
., 23b, 19c, 20c, ..., 23c, 19d,
20d, ..., 23d are written in this order.
As described in the above operation description, it is possible to arbitrarily set and change the compression condition (partial data division that increases the number of repetitions of the same data) that matches the compression target data,
Optimal data compression can be realized.

【0013】[0013]

【発明の効果】以上のように、この発明によれば、圧縮
条件として一度に読み込むデータのサイズおよび部分デ
ータの個数を圧縮対象データに合わせて任意に設定でき
るようにしたので、圧縮対象データの冗長度が増し、デ
ータ圧縮率が向上する。また、設定した圧縮条件を圧縮
データとともに格納するようにしたので、圧縮条件を変
化させても容易にデータを復元でき、最適なデータ圧縮
を実現できるといった効果がある。
As described above, according to the present invention, as the compression condition, the size of data read at one time and the number of partial data can be arbitrarily set according to the data to be compressed. Redundancy increases and data compression rate improves. Further, since the set compression condition is stored together with the compressed data, there is an effect that the data can be easily restored even if the compression condition is changed and the optimum data compression can be realized.

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

【図1】この発明の一実施例によるデータ圧縮装置を示
すブロックフローチャートである。
FIG. 1 is a block flowchart showing a data compression apparatus according to an embodiment of the present invention.

【図2】この発明の一実施例による文字データの圧縮例
を示す図である。
FIG. 2 is a diagram showing an example of compression of character data according to an embodiment of the present invention.

【図3】従来のデータ圧縮装置を示すブロックフローチ
ャートである。
FIG. 3 is a block flowchart showing a conventional data compression device.

【図4】従来のデータ圧縮装置によるデータ圧縮例を示
す図である。
FIG. 4 is a diagram showing an example of data compression by a conventional data compression device.

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

1 第1のデータ 2 データ圧縮装置 3 データ読み取り手段 6 データ書き込み手段 7 第2のデータ 13 データ圧縮条件設定手段 14 データ分割手段 15 分割データ比較手段 16 分割データ計数手段 DESCRIPTION OF SYMBOLS 1 1st data 2 Data compression apparatus 3 Data reading means 6 Data writing means 7 2nd data 13 Data compression condition setting means 14 Data dividing means 15 Divided data comparing means 16 Divided data counting means

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 第1のデータを入力し、データを圧縮し
て第2のデータとしてデータ記憶装置にデータを書き込
むデータ圧縮装置において、 一度に読み込むデータのサイズを設定する手段、上記第
1のデータを細分化してできる部分データの個数を設定
する手段、上記第1のデータを上記部分データに分割す
る手段、分割された各部分データを次に読み込んだデー
タの部分データとそれぞれ比較する手段、この比較結果
をもとに各部分データの計数を計算する手段、および、
この計数結果からデータを圧縮して、上記設定したデー
タのサイズと部分データの個数との条件とともに上記第
2のデータとして書き込む手段を備えたことを特徴とす
るデータ圧縮装置。
1. A data compression apparatus for inputting first data, compressing the data, and writing the data as second data to a data storage device, means for setting a size of data to be read at one time, Means for setting the number of partial data formed by subdividing the data, means for dividing the first data into the partial data, means for comparing each divided partial data with partial data of the next read data, A means for calculating the count of each partial data based on the comparison result, and
A data compressing device comprising means for compressing data from the counting result and writing the data as the second data together with the conditions of the set data size and the number of partial data.
JP5107872A 1993-05-10 1993-05-10 Data compressing device Pending JPH06324924A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5107872A JPH06324924A (en) 1993-05-10 1993-05-10 Data compressing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5107872A JPH06324924A (en) 1993-05-10 1993-05-10 Data compressing device

Publications (1)

Publication Number Publication Date
JPH06324924A true JPH06324924A (en) 1994-11-25

Family

ID=14470232

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5107872A Pending JPH06324924A (en) 1993-05-10 1993-05-10 Data compressing device

Country Status (1)

Country Link
JP (1) JPH06324924A (en)

Similar Documents

Publication Publication Date Title
DE68907812T2 (en) Method and device for encoding, decoding and transmitting data in compressed form.
DE69117592T2 (en) DATA STORAGE ON MAGNETIC TAPE
DE69019095T2 (en) Compression of the authentication data of signatures for storage on an identification card.
US4903018A (en) Process for compressing and expanding structurally associated multiple-data sequences, and arrangements for implementing the process
CN1868127B (en) Data compression system and method
EP0378762B1 (en) Graphics images data compression method
EP1439638B1 (en) Arrangement for compressing a data table
JPH03503708A (en) Digital sample coding devices and methods, and video signal processing systems
CN118394792B (en) Oil and gas field data storage method and system
CN110019184B (en) A method for compressing and decompressing ordered integer arrays
US5648922A (en) Digital filter
JPH06324924A (en) Data compressing device
EP0517383A2 (en) Image compression and storage
DE69512697T2 (en) Recording medium containing correlation information representing the correlation between physical and logical sectors, recording method and reproducing device therefor
JP2604492B2 (en) Data compression processing method for sequential files
JP3534471B2 (en) Merge sort method and merge sort device
US5343540A (en) Method for detecting positions of consecutive bits set to predetermined codes
US5729737A (en) Selective data compression system
JPH03232016A (en) Method and device for data compression
US5880686A (en) Decoding and regenerating device for decoding and regenerating frame coded data and method therefor
JP2598534B2 (en) Image and audio data recording device
JPS60254963A (en) image file device
CN110688385A (en) Data processing method and electronic equipment
JPH0460204B2 (en)
JPH047758A (en) File processor