JPH05108304A - Data compression system - Google Patents

Data compression system

Info

Publication number
JPH05108304A
JPH05108304A JP29363691A JP29363691A JPH05108304A JP H05108304 A JPH05108304 A JP H05108304A JP 29363691 A JP29363691 A JP 29363691A JP 29363691 A JP29363691 A JP 29363691A JP H05108304 A JPH05108304 A JP H05108304A
Authority
JP
Japan
Prior art keywords
data
compression
pattern
compressed
byte
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
JP29363691A
Other languages
Japanese (ja)
Inventor
Etsuko Sakon
悦子 左近
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP29363691A priority Critical patent/JPH05108304A/en
Publication of JPH05108304A publication Critical patent/JPH05108304A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To attain the compression of data not only with the continuous patterns of the same single byte but with the continuous patterns covering several bytes. CONSTITUTION:A data reading means 1 reads the data to be compressed for each block, and a data check means 2 checks these read data for each byte or every several bytes to check the possibility of compression. A compression pattern deciding means 4 collates the check result of the means 2 with a compression pattern deciding rule 3 to decide a proper compression pattern. A data production means 5 sets the due value to the compressed data consisting of a flag showing the compression pattern decided by the means 4, a control field, and a data pattern field. Then a data writing means 6 writes the compressed data into an output file.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はデータ管理方式に関し、
特にデータ圧縮方式に関する。
BACKGROUND OF THE INVENTION The present invention relates to a data management system,
In particular, it relates to a data compression method.

【0002】[0002]

【従来の技術】従来、この種のデータ圧縮方式では、同
一データ(1バイトパターン)が連続している場合にの
みデータの圧縮を行っていた。
2. Description of the Related Art Conventionally, in this type of data compression method, data is compressed only when the same data (1 byte pattern) is continuous.

【0003】[0003]

【発明が解決しようとする課題】上述した従来のデータ
圧縮方式は、同一のバイトパターンが連続している場合
のみにデータの圧縮を行うようになっていたので、12
3412341234・・・・・・のように数バイトず
つ同一のパターンが続く場合はデータが圧縮されないと
いう欠点がある。
In the conventional data compression method described above, the data is compressed only when the same byte pattern is continuous.
When the same pattern continues every several bytes like 3412341234 ..., there is a drawback that the data is not compressed.

【0004】本発明の目的は、上述の点に鑑み、同一の
1バイトパターンの連続だけでなく、数バイトにわたる
パターンの連続に対してもデータの圧縮を行えるデータ
圧縮方式を提供することにある。
In view of the above points, an object of the present invention is to provide a data compression method capable of compressing not only the same 1-byte pattern sequence but also the pattern sequence over several bytes. ..

【0005】[0005]

【課題を解決するための手段】本発明のデータ圧縮方式
は、圧縮対象となるデータを1ブロックずつ読み込んで
くるデータ読込み手段と、このデータ読込み手段により
読み込まれたデータを1バイトずつあるいは数バトずつ
チェックして圧縮可能か否かを調べるデータチェック手
段と、ある圧縮パターンがいくつ以上続いたら圧縮を行
うかおよび複数の圧縮パターンで圧縮可能な場合にどの
圧縮パターンを使って圧縮を行うかの規則を記した圧縮
パターン決定ルールと、前記データチェック手段により
調べた結果を前記圧縮パターン決定ルールに照らし合わ
せてどの圧縮パターンで圧縮するかを決める圧縮パター
ン決定手段と、この圧縮パターン決定手段により決定さ
れた圧縮パターンを示すフラグおよび圧縮パターンの個
数を格納した制御フィールドとデータパターンフィール
ドとからなる圧縮データに値をセットするデータ作成手
段と、このデータ作成手段入力より作成された圧縮デー
タを出力ファイルに書き込むデータ書込み手段とを有す
る。
According to the data compression method of the present invention, data reading means for reading data to be compressed block by block and data read by the data reading means byte by byte or several bytes. Data check means for checking whether each compression pattern can be compressed or not, and which compression pattern is used when a certain compression pattern continues and which compression pattern is used when compression is possible with a plurality of compression patterns A compression pattern determination rule that describes rules, a compression pattern determination unit that determines a compression pattern to be used for compression by comparing the result checked by the data check unit with the compression pattern determination rule, and the compression pattern determination unit That stores the flag indicating the compressed pattern and the number of compressed patterns It has a data generating means for setting the compressed data values comprising a field and a data pattern field, and a data writing means for writing the compressed data created from the data creating means input to the output file.

【0006】[0006]

【作用】本発明のデータ圧縮方式では、データ読込み手
段が圧縮対象となるデータを1ブロックずつ読み込み、
データチェック手段がデータ読込み手段により読み込ま
れたデータを1バイトずつあるいは数バトずつチェック
して圧縮可能か否かを調べ、圧縮パターン決定ルールが
ある圧縮パターンがいくつ以上続いたら圧縮を行うかお
よび複数の圧縮パターンで圧縮可能な場合にどの圧縮パ
ターンを使って圧縮を行うかの規則を記し、圧縮パター
ン決定手段がデータチェック手段により調べた結果を圧
縮パターン決定ルールに照らし合わせてどの圧縮パター
ンで圧縮するかを決め、データ作成手段が圧縮パターン
決定手段により決定された圧縮パターンを示すフラグお
よび圧縮パターンの個数を格納した制御フィールドとデ
ータパターンフィールドとからなる圧縮データに値をセ
ットし、データ書込み手段がデータ作成手段入力より作
成された圧縮データを出力ファイルに書き込む。
In the data compression method of the present invention, the data reading means reads the data to be compressed block by block,
The data checking means checks the data read by the data reading means one byte at a time or several bytes and checks whether or not the data can be compressed. If the compression pattern can be compressed, the rules for which compression pattern is used to perform compression are described, and the compression pattern determination means compares the result checked by the data check means with the compression pattern determination rule to compress the compression pattern. The data writing means sets a value in the compressed data composed of a control field storing the flag indicating the compression pattern determined by the compression pattern determination means and the number of compression patterns and the data pattern field, and the data writing means. Is the compressed data created by inputting the data creation means. The written to the output file.

【0007】[0007]

【実施例】次に、本発明について図面を参照して詳細に
説明する。
The present invention will be described in detail with reference to the drawings.

【0008】図1は、本発明の一実施例に係るデータ圧
縮方式の構成を示すブロック図である。本実施例のデー
タ圧縮方式は、データ読込み手段1と、データチェック
手段2と、圧縮パターン決定ルール3と、圧縮パターン
決定手段4と、データ作成手段5と、データ書込み手段
6とから構成されている。
FIG. 1 is a block diagram showing the configuration of a data compression method according to an embodiment of the present invention. The data compression method of this embodiment comprises a data reading means 1, a data checking means 2, a compression pattern determining rule 3, a compression pattern determining means 4, a data creating means 5 and a data writing means 6. There is.

【0009】本発明は、同一パターンが連続した場合に
データ圧縮を行うものであるが、本実例では1バイトパ
ターンおよび4バイトパターンについてのデータ圧縮に
ついて説明を行う。
The present invention performs data compression when the same pattern is continuous, but in this example, data compression for a 1-byte pattern and a 4-byte pattern will be described.

【0010】データ圧縮後のデータ形式は、図2に示す
ように、フラグおよび個数(バイト数)を格納した制御
フィールドと、データパターンフィールドとからなる。
制御フィールド中のフラグは、1バイトパターンの圧
縮,4バイトパターンの圧縮または非圧縮のいずれかを
示すものである。また、個数(バイト数)は、1バイト
パターンまたは4バイトパターンをいくつ圧縮したか、
あるいは非圧縮データが何バイト続くかを示すものであ
る。データパターンフィールドは、圧縮データの場合に
は圧縮パターンのデータイメージが、非圧縮データの場
合には指定のバイト数分のデータイメージが格納されて
いる。
As shown in FIG. 2, the data format after data compression is composed of a control field storing a flag and the number (number of bytes), and a data pattern field.
The flag in the control field indicates either 1-byte pattern compression, 4-byte pattern compression or non-compression. Also, the number (the number of bytes) depends on how many 1-byte patterns or 4-byte patterns are compressed.
Alternatively, it indicates how many bytes of uncompressed data continue. The data pattern field stores a data image of a compressed pattern in the case of compressed data and a data image of a designated number of bytes in the case of uncompressed data.

【0011】図3を参照すると、本実施例のデータ圧縮
方式の処理は、データ読込みステップA1と、1バイト
チェックステッップA2と、4バイトチェックステップ
A3と、圧縮パターン決定ステップA4と、データ作成
ステップA5と、データ書込みステップA6と、データ
終端判定ステップA7とからなる。
Referring to FIG. 3, the process of the data compression method according to the present embodiment includes a data read step A1, a 1-byte check step A2, a 4-byte check step A3, a compression pattern determination step A4, and a data It includes a creating step A5, a data writing step A6, and a data end determining step A7.

【0012】圧縮パターン決定ルール3には、次のよう
なことが記号化して記述されているものとする。 ・1バイトパターンの連続が3つ以下ならば圧縮は行わ
ない。 ・1バイトパターンでも4バイトパターンでも圧縮可能
な場合は、1バイトパターンで圧縮を行う。
In the compression pattern determination rule 3, the following is coded and described.・ If the number of consecutive 1-byte patterns is 3 or less, compression is not performed. -If both 1-byte and 4-byte patterns can be compressed, the compression is performed using the 1-byte pattern.

【0013】次に、このように構成された本実施例のデ
ータ圧縮方式の動作について説明する。
Next, the operation of the data compression method of this embodiment having the above-mentioned configuration will be described.

【0014】まず、データ読込み手段1は、システムメ
モリイメージ等の圧縮対象となるデータを1ブロックず
つ読み込む(ステップA1)。
First, the data reading means 1 reads data to be compressed, such as a system memory image, block by block (step A1).

【0015】次に、データチェック手段2は、データ読
込み手段1により読み込まれたデータを先頭から1バイ
トずつチェックして最初に現れる1バイトパターンが何
バイトめから何バイトまで続いているかを調べる(ステ
ップA2)。1バイトパターンが途切れたら再び先頭に
戻り、データチェック手段2は、4バイト単位にデータ
をチェックして最初に現れる4バイトパターンが何バイ
トめから何バイトめまで続いているかを調べる(ステッ
プA3)。
Next, the data checking means 2 checks the data read by the data reading means 1 byte by byte from the beginning, and checks whether the first byte pattern that appears first continues from what byte to several bytes ( Step A2). When the 1-byte pattern is interrupted, it returns to the beginning again, and the data check means 2 checks the data in units of 4 bytes to check how many bytes of the first 4-byte pattern appear (step A3). ..

【0016】データチェック手段2によるチェックが終
わると、圧縮パターン決定手段4は、圧縮パターン決定
ルール3を用いてどの圧縮パターンで先頭からどこまで
圧縮するかを決める。先頭部分が圧縮不可能な場合は、
圧縮パターン決定手段4は、どこまで非圧縮データとす
るかを決める(ステップA4)。
When the check by the data checking means 2 is completed, the compression pattern determining means 4 uses the compression pattern determining rule 3 to determine which compression pattern to compress from the beginning. If the beginning is incompressible,
The compression pattern determination means 4 determines how much uncompressed data should be (step A4).

【0017】圧縮パターン決定手段4によりどの圧縮パ
ターンを使って圧縮するか、あるいはどこまでを非圧縮
データとするかが決まると、データ作成手段5は、フラ
グ,個数(バイト数)およびデータパターンに値をセッ
トして圧縮データを作成する(ステップA5)。
When the compression pattern deciding means 4 decides which compression pattern to use for compression or to what extent it is made non-compressed data, the data creating means 5 sets the flag, the number (byte number) and the data pattern to values. Is set to create compressed data (step A5).

【0018】データ作成手段5により圧縮データが作成
されると、データ書込み手段6は、ライト(WRIT
E)命令を発行して磁気テープ,磁気ディスク等の出力
ファイル(図示せず)に圧縮データを書き込む(ステッ
プA6)。
When the data creating means 5 creates the compressed data, the data writing means 6 writes the data (WRIT).
E) Issue a command to write the compressed data to an output file (not shown) such as a magnetic tape or a magnetic disk (step A6).

【0019】このようにして、1レコード分の圧縮デー
タの出力ファィルへの書込みが終了すると、データ読込
み手段1により読み込まれた1ブロック分の入力データ
の終端まで処理したかどうかを判定し(スッテプA
7)、入力データの終端まで処理していなければスッテ
プA2に制御を戻してステップA2〜A7を繰り返す。
When the writing of the compressed data for one record to the output file is completed in this manner, it is judged whether or not the end of the input data for one block read by the data reading means 1 has been processed (step). A
7) If the end of the input data has not been processed, control is returned to step A2 and steps A2 to A7 are repeated.

【0020】スッテプA7で1ブロック分の入力データ
の終端まで処理されていれば、スッテプA1に制御を戻
して、スッテプA1〜A7を繰り返す。そして、スッテ
プA1でEOF(End Of File)になると、
処理を終了する。
If the end of the input data for one block has been processed in step A7, control is returned to step A1 and steps A1 to A7 are repeated. Then, when it becomes EOF (End Of File) in step A1,
The process ends.

【0021】[0021]

【発明の効果】以上説明したように本発明は、1バイト
パターンが連続した場合だけでなく数バイトにわたるパ
ターンが連続した場合にも圧縮を行うことにより、圧縮
効果を上げることができるという効果がある。
As described above, the present invention has the effect that the compression effect can be improved by performing compression not only when a 1-byte pattern is continuous but also when a pattern over several bytes is continuous. is there.

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

【図1】本発明の一実施例に係るデータ圧縮方式の構成
を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a data compression method according to an embodiment of the present invention.

【図2】図1中のデータ作成手段により作成された圧縮
処理後のデータ形式を示す図である。
FIG. 2 is a diagram showing a data format after compression processing created by the data creating means in FIG.

【図3】本実施例のデータ圧縮方式の処理を示す流れ図
である。
FIG. 3 is a flowchart showing the processing of the data compression method of this embodiment.

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

1 データ読込み手段 2 データチェック手段 3 圧縮パターン決定ルール 4 圧縮パターン決定手段 5 データ作成手段 6 データ書込み手段 1 data reading means 2 data checking means 3 compression pattern determining rule 4 compression pattern determining means 5 data creating means 6 data writing means

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 圧縮対象となるデータを1ブロックずつ
読み込んでくるデータ読込み手段と、 このデータ読込み手段により読み込まれたデータを1バ
イトずつあるいは数バトずつチェックして圧縮可能か否
かを調べるデータチェック手段と、 ある圧縮パターンがいくつ以上続いたら圧縮を行うかお
よび複数の圧縮パターンで圧縮可能な場合にどの圧縮パ
ターンを使って圧縮を行うかの規則を記した圧縮パター
ン決定ルールと、 前記データチェック手段により調べた結果を前記圧縮パ
ターン決定ルールに照らし合わせてどの圧縮パターンで
圧縮するかを決める圧縮パターン決定手段と、 この圧縮パターン決定手段により決定された圧縮パター
ンを示すフラグおよび圧縮パターンの個数を格納した制
御フィールドとデータパターンフィールドとからなる圧
縮データに値をセットするデータ作成手段と、 このデータ作成手段入力より作成された圧縮データを出
力ファイルに書き込むデータ書込み手段とを有すること
を特徴とするデータ圧縮方式。
1. Data reading means for reading data to be compressed one block at a time, and data for checking whether the data read by the data reading means is compressed byte by byte or by several bits, and whether or not the data can be compressed. A check means, a compression pattern determination rule that describes the number of times a certain compression pattern continues before compression and which compression pattern is used when compression is possible with a plurality of compression patterns; A compression pattern determining means for determining which compression pattern is to be used for compression by comparing the result of checking by the checking means with the compression pattern determining rule, a flag indicating the compression pattern determined by the compression pattern determining means, and the number of compression patterns. Control field and data pattern field A data creation means for setting a value to Ranaru compressed data, the data compression method, characterized in that it comprises a data writing means for writing the compressed data created from the data creating means input to the output file.
JP29363691A 1991-10-14 1991-10-14 Data compression system Pending JPH05108304A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29363691A JPH05108304A (en) 1991-10-14 1991-10-14 Data compression system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29363691A JPH05108304A (en) 1991-10-14 1991-10-14 Data compression system

Publications (1)

Publication Number Publication Date
JPH05108304A true JPH05108304A (en) 1993-04-30

Family

ID=17797279

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29363691A Pending JPH05108304A (en) 1991-10-14 1991-10-14 Data compression system

Country Status (1)

Country Link
JP (1) JPH05108304A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7062603B2 (en) 2001-11-19 2006-06-13 International Business Machines Corporation External storage device for selectively storing data between first and second recording media

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63240648A (en) * 1987-03-27 1988-10-06 Nec Corp Data compressing/storing system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63240648A (en) * 1987-03-27 1988-10-06 Nec Corp Data compressing/storing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7062603B2 (en) 2001-11-19 2006-06-13 International Business Machines Corporation External storage device for selectively storing data between first and second recording media

Similar Documents

Publication Publication Date Title
US7246139B2 (en) File system for enabling the restoration of a deffective file
JPH0828053B2 (en) Data recording method
JPH02228879A (en) Method of compacting data
JPH04359315A (en) Data compression controller and data restoration controller
JPH05108304A (en) Data compression system
KR100659915B1 (en) Method and apparatus for transferring data
JPH04241681A (en) Storage device of compression switching system
JPH0512800A (en) Information recording and reproducing device equipped with data compressing function and information recording medium
JPH06274279A (en) Mirrored disk and its control system
JP2943900B2 (en) Data compression processing device, data decompression processing device, data compression processing method, and data decompression processing method for data file
JPS5953579B2 (en) character compression device
JPH07191822A (en) Data storage device and data system
JP3314387B2 (en) Magnetic tape controller
JPH04242424A (en) Data compression controller and data restoration controller
JPH1079860A (en) Encoding device and decoding device
JPS61236224A (en) Method for compressing data
JPS61150570A (en) Digital copying machine
US6154329A (en) Recording apparatus and method featuring efficient handling of data extension
JPH0814935B2 (en) Magnetic tape unit
JPH03104421A (en) System and device for data compression and data decoder
JP2001325135A (en) Device and method for storing/reproducing data
JPH08339262A (en) External storage device for computer
JPH10164509A (en) Data recording and transmitting method and device therefor
JPH05155072A (en) Dot matrix type printer
JPH07121674A (en) Ic card and information processor using the card