JP3186530B2 - How to compress and expand computer data - Google Patents

How to compress and expand computer data

Info

Publication number
JP3186530B2
JP3186530B2 JP21069495A JP21069495A JP3186530B2 JP 3186530 B2 JP3186530 B2 JP 3186530B2 JP 21069495 A JP21069495 A JP 21069495A JP 21069495 A JP21069495 A JP 21069495A JP 3186530 B2 JP3186530 B2 JP 3186530B2
Authority
JP
Japan
Prior art keywords
compression
data
bytes
character string
compressing
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 - Fee Related
Application number
JP21069495A
Other languages
Japanese (ja)
Other versions
JPH0964752A (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.)
Nippon Steel Corp
Original Assignee
Sumitomo Metal Industries 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 Sumitomo Metal Industries Ltd filed Critical Sumitomo Metal Industries Ltd
Priority to JP21069495A priority Critical patent/JP3186530B2/en
Publication of JPH0964752A publication Critical patent/JPH0964752A/en
Application granted granted Critical
Publication of JP3186530B2 publication Critical patent/JP3186530B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はコンピュータデータ
を磁気ディスク・磁気テープ等の外部記憶媒体へ格納す
る方式、あるいはコンピュータ間のデータ転送方式に関
し、特に格納効率および転送効率を高めるためのデータ
圧縮・伸長方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for storing computer data in an external storage medium such as a magnetic disk or a magnetic tape, or a method for transferring data between computers, and more particularly to a method for compressing data for improving storage efficiency and transfer efficiency. It relates to a decompression method.

【0002】[0002]

【発明が解決しようとする課題】従来のデータ圧縮伸長
方式は、たとえば特開平5−260097号、および特
開平3−162134号に示されているように、コンピ
ュータ間のデータ転送処理において圧縮対象となる通信
データに、1バイトまたは2バイトの同一コードが繰返
し出現したとき、圧縮を指示する制御コードと、同一コ
ードの繰返し回数であるカウントバイトと、繰返したコ
ードとでデータ中の同一コードが連続して繰返し出現す
る部分を表すことにより圧縮し、伸長時には圧縮制御コ
ード検出時に同一コードカウントバイトだけ繰返しても
とのデータに復元する連続文字圧縮処理であった。
A conventional data compression / expansion method is disclosed in, for example, Japanese Patent Application Laid-Open Nos. 5-260097 and 3-162134. When the same code of 1 byte or 2 bytes repeatedly appears in the communication data, the same code in the data is repeated with the control code indicating compression, the count byte indicating the number of times the same code is repeated, and the repeated code. This is a continuous character compression process in which the data is compressed by representing a portion that appears repeatedly, and when decompression is performed, when the compression control code is detected, the same code count byte is repeated to restore the original data.

【0003】また、同一コードの出現判定は1バイトま
たは2バイト単位にデータ文字列の順次サーチを繰返す
ためコンピュータ中央処理装置の使用率が高くなり、デ
ータ圧縮による効果を相殺しているという問題点があっ
た。
In addition, since the same code is repeatedly determined in order of one byte or two bytes, the use of the computer central processing unit is increased and the effect of data compression is offset. was there.

【0004】以上に述べたように従来のデータ圧縮・伸
長方式はレコード内の連続文字圧縮に注目した方式であ
り、データの種類によっては低効率の圧縮率しか得られ
ないことと、同一コードの連続文字出現の判定方法をデ
ータの順次サーチ方式により行なうためコンピュータの
CPUの負荷を上げる要因となるため、その適用範囲を
狭くしている。
As described above, the conventional data compression / expansion method focuses on continuous character compression in a record. Depending on the type of data, only a low-efficiency compression ratio can be obtained. Since the method for determining the appearance of continuous characters is performed by the data sequential search method, the load on the CPU of the computer is increased. Therefore, the applicable range is narrowed.

【0005】一般にデータ圧縮・伸長処理はデータの順
次文字サーチを行なうために高いCPU使用率となる。
したがって、圧縮率を相当以上に上げないと無駄なコン
ピュータ資源使用となり、コンピュータ・ランニングコ
スト削減という目的を達成することができない。
In general, the data compression / decompression process requires a high CPU usage rate because data is sequentially searched for characters.
Therefore, if the compression ratio is not increased significantly, useless computer resources are used, and the object of reducing computer running costs cannot be achieved.

【0006】本発明はこのような問題を解決し、データ
圧縮率を上げるために、レコード間にもデータの冗長性
があるという特性を加味した圧縮手段、2段階に連続文
字・レコード間同一文字列判定を行なう効率のよい文字
サーチ手段、圧縮データの二重化防止手段等を有するデ
ータ圧縮・伸長方式を提供することを目的とする。
The present invention solves such a problem, and in order to increase the data compression rate, compression means taking into account the characteristic that data is redundant also between records, two consecutive steps, the same character between records It is an object of the present invention to provide a data compression / expansion method having efficient character search means for performing column determination, means for preventing duplication of compressed data, and the like.

【0007】すなわち、本願の請求項1に記載のコンピ
ュータデータの圧縮方法は、データ圧縮率を向上させる
ために、同一レコード内のみならず、相異なるレコード
間においてもデータの冗長性があるという特性を加味し
たコンピュータデータのデータ圧縮方法を提供すること
を目的とする。
That is, the method of compressing computer data according to the first aspect of the present invention is characterized in that there is data redundancy not only within the same record but also between different records in order to improve the data compression rate. It is an object of the present invention to provide a data compression method of computer data in consideration of the above.

【0008】また請求項に記載のコンピュータデータ
の圧縮方法は、データ圧縮処理の効率を向上させるため
に、2段階に連続文字・レコード間同一文字列判定を行
なう効率のよい文字サーチ手段を含むコンピュータデー
タのデータ圧縮方法を提供することを目的とする。
The computer data compression method according to the first aspect of the present invention includes efficient character search means for performing the same character string determination between continuous characters and records in two stages in order to improve the efficiency of data compression processing. An object of the present invention is to provide a data compression method for computer data.

【0009】また請求項、請求項、および請求項
に記載のコンピュータデータの圧縮方法は、圧縮データ
の二重圧縮防止手段を含むコンピュータデータのデータ
圧縮方法を提供することを目的とする。
Further, claim 2 , claim 3 , and claim 4
The object of the present invention is to provide a computer data compression method including means for preventing double compression of compressed data.

【0010】[0010]

【0011】[0011]

【課題を解決するための手段】本願の請求項1に記載の
コンピュータデータの圧縮方法は、コンピュータの外部
記憶媒体に格納するデータを外部指示パラメータにより
前記外部記憶媒体に格納する前に圧縮するデータ圧縮方
法、およびコンピュータ間のデータ転送処理における通
信データを外部指示パラメータによりデータ転送前に圧
縮するデータ圧縮方法であって、相異なるレコード間に
おける同一文字列を圧縮する第1の圧縮処理を行なうス
テップと、同一レコード内における連続文字列を圧縮す
る第2の圧縮処理を行なうステップとを含むことを特徴
とする。
According to a first aspect of the present invention, there is provided a computer data compression method for compressing data to be stored in an external storage medium of a computer before storing the data in the external storage medium by an external instruction parameter. A compression method and a data compression method for compressing communication data in a data transfer process between computers before data transfer using an externally designated parameter, wherein a first compression process for compressing the same character string between different records is performed. And performing a second compression process of compressing a continuous character string in the same record.

【0012】記第1の圧縮処理を行なうステップは、
第1段階として複数バイト単位でレコード間同一文字列
の判定を行なうステップと、前記判定の結果が不一致の
場合は第2段階として1バイト単位でレコード間同一文
字列の判定を行なうステップと、判定の結果前記同一文
字列が存在した場合には当該同一文字列を圧縮するステ
ップとを含み、前記第2の圧縮処理を行なうステップ
は、第1段階として複数バイト単位で同一レコード内連
続文字列の判定を行なうステップと、前記判定の結果が
不一致の場合は第2段階として1バイト単位で同一レコ
ード内連続文字列の判定を行なうステップと、判定の結
果前記連続文字列が存在した場合には当該連続文字列を
圧縮するステップとをさらに含むことを特徴とする。
[0012] The step of performing a pre-Symbol first compression process,
Determining the same character string between records in a plurality of bytes as a first step, and determining the same character string between records in a byte as a second step if the results of the determination do not match; Compressing the same character string when the same character string exists as a result of the processing, the step of performing the second compression processing includes, A step of performing a determination; and a step of determining a continuous character string in the same record in byte units as a second step if the result of the determination does not match. Compressing the continuous character string.

【0013】請求項に記載のコンピュータデータの圧
縮方法は請求項に記載のコンピュータデータの圧縮方
法であって、第1の圧縮処理または第2の圧縮処理を行
なったデータの1件目のレコードの先頭複数バイトに所
定のコードを付加するステップをさらに含むことを特徴
とする。
[0013] The method of compressing computer data according to claim 2 is a method of compressing computer data according to claim 1, of 1 second of data was performed first compression processing or the second compression The method further includes a step of adding a predetermined code to a plurality of leading bytes of the record.

【0014】請求項に記載のコンピュータデータの圧
縮方法は、請求項に記載のコンピュータデータの圧縮
方法であって、圧縮処理をすべきデータの1件目の先頭
複数バイトを判定し、それが前記所定のコードでない場
合には圧縮処理を実行し、前記所定のコードである場合
には圧縮処理を中止するステップをさらに含むことを特
徴とする。
According to a third aspect of the present invention, there is provided the computer data compression method according to the second aspect , wherein the first plurality of bytes of the first data to be compressed is determined. If the code is not the predetermined code, a compression process is executed, and if the code is the predetermined code, the compression process is stopped.

【0015】請求項に記載のコンピュータデータの圧
縮方法は、請求項に記載のコンピュータデータの圧縮
方法であって、前記複数バイトは4バイトであり、所定
のコードはALL“1F”であることを特徴とする。
According to a fourth aspect of the present invention, there is provided the computer data compression method according to the third aspect , wherein the plurality of bytes are four bytes, and the predetermined code is ALL "1F". It is characterized by the following.

【0016】[0016]

【0017】[0017]

【0018】[0018]

【発明の実施の形態】以下本願の実施例を図面を参照し
ながら詳細に説明する。
Embodiments of the present invention will be described below in detail with reference to the drawings.

【0019】まず圧縮方法の実施例について説明する。
図1を参照して、本願の請求項1〜請求項5に記載のコ
ンピュータデータの圧縮方法において、データ圧縮処理
を要求するアプリケーションプログラムから圧縮処理プ
ログラムを読出す際のアーギュメントについて説明す
る。圧縮処理に際しては、データ特性によりレコード間
圧縮処理、連続文字圧縮処理の要否区分(C1)および
圧縮すべきデータ(C5)とを指定して圧縮処理が要求
される。
First, an embodiment of the compression method will be described.
With reference to FIG. 1, in the method of compressing computer data according to claims 1 to 5 of the present application, arguments when reading a compression processing program from an application program requesting data compression processing will be described. In the compression process, the compression process is requested by designating the inter-record compression process, the necessity category (C1) of the continuous character compression process, and the data to be compressed (C5) according to the data characteristics.

【0020】図3を参照して、本願の請求項1〜請求項
に記載のコンピュータデータの圧縮方法における圧縮
処理プログラムのメインルーチンの処理手順を示すブロ
ックフローチャートについて説明する。アプリケーショ
ンプログラムから指定された圧縮処理の要否区分(C
1)により、レコード間圧縮処理(S3〜S5)、連続
文字圧縮処理(S7〜S9)、および両圧縮処理(S1
0〜S15)が圧縮すべきデータ(C5)の最後まで繰
返される。圧縮処理プログラムのメインルーチンでは、
レコード間圧縮の場合3バイトチェック(S3またはS
10)が、連続文字圧縮の場合は4バイトチェック(S
7またはS13)が行なわれ、各々圧縮制御符号の格納
桁数(図6・図7で後述)より大きい場合にレコード間
圧縮・連続文字圧縮を行なうサブルーチンが呼出され圧
縮処理が行なわれる。またレコード間圧縮・連続文字圧
縮サブルーチンにおいてはレコード間・連続文字比較に
おいて不一致となった場合はメインルーチンに返り、圧
縮形式で出力バッファ(C6)への文字移送処理が行な
われる。
Referring to FIG. 3, claims 1 to 1 of the present application will be described.
A block flowchart showing a processing procedure of a main routine of a compression processing program in the computer data compression method described in 4 will be described. Necessity of compression processing specified by application program (C
1), inter-record compression processing (S3 to S5), continuous character compression processing (S7 to S9), and both compression processing (S1 to S5)
0 to S15) are repeated until the end of the data (C5) to be compressed. In the main routine of the compression processing program,
3 byte check (S3 or S
If 10) is continuous character compression, a 4-byte check (S
7 or S13), a subroutine for inter-record compression / continuous character compression is called when the number of stored digits of the compression control code (described later in FIGS. 6 and 7) is larger, and compression processing is performed. In the inter-record compression / consecutive character compression subroutine, if there is no match in the inter-record / consecutive character comparison, the process returns to the main routine, and the character is transferred to the output buffer (C6) in a compressed format.

【0021】また圧縮処理プログラムのメインルーチン
の先頭で1件目の圧縮処理かを判定し(S30)、1件
目の処理であるときは圧縮すべきデータ(C5)の先頭
が4バイトがALL“1F”かどうかを判定する(S3
1)。ALL“1F”である場合には二重圧縮であるの
でエラー処理(S33)を行ない、終了する。ALL
“1F”でない場合は正常であるので、圧縮済データで
あることを示すALL“1F”(4バイト)を出力バッ
ファ(C6)へ移送出力する。なお“1F”は通常のデ
ータにあまり存在しないデータであることと、2進数と
して扱った場合でも4バイトもあればデータとしての
“1F”の連続文字は皆無に近くなることを前提として
使用している。
At the beginning of the main routine of the compression processing program, it is determined whether the compression processing is the first compression processing (S30). If the processing is the first processing, the first four bytes of data (C5) to be compressed are ALL. It is determined whether it is “1F” (S3
1). If ALL is "1F", double compression is performed, error processing (S33) is performed, and the processing ends. ALL
If it is not "1F", it is normal, so ALL "1F" (4 bytes) indicating compressed data is transferred to the output buffer (C6). It should be noted that "1F" is data that does not exist much in ordinary data, and that even if it is treated as a binary number, if there are 4 bytes, there will be almost no continuous characters of "1F" as data. ing.

【0022】図4および図5を参照して、本願の請求項
1〜請求項に記載のコンピュータデータの圧縮方法に
おけるレコード間圧縮処理サブルーチン、および連続文
字圧縮処理サブルーチンの処理手順を示すブロックフロ
ーチャートについて説明する。圧縮処理での比較でコン
ピュータ中央処理装置の使用率を抑制するためにレコー
ド間圧縮処理では10バイトチェック(S17)、連続
文字圧縮処理では5バイトチェック(S24)とまず大
きい桁数で比較し、不一致となった場合に1バイトチェ
ック(S20およびS27)を行なう。1バイトチェッ
クで不一致になった時点で圧縮文字・圧縮制御符号・圧
縮文字数の出力バッファ(ARG−6)への出力処理
(S22およびS29)を行なう。なお最初に同一文字
列、連続文字列の判定を複数バイトで行なうのは同一文
字列、連続文字列の判定回数を減じることが目的である
が5バイト、10バイトは経験値に基づく値であり、圧
縮処理の性能評価結果においてCPU性能が上がってい
る。この値をあまり大きくすると同一文字列、連続文字
列の判定で結果が不一致となり、結局は1バイトごとの
判定処理になり判定回数削減効果を得ることができな
い。
Referring to FIG. 4 and FIG. 5, a block flowchart showing a processing procedure of an inter-record compression processing subroutine and a continuous character compression processing subroutine in the computer data compression method according to claims 1 to 4 of the present application. Will be described. In order to suppress the usage rate of the computer central processing unit in the comparison in the compression processing, a 10-byte check (S17) in the inter-record compression processing and a 5-byte check (S24) in the continuous character compression processing are first compared with a large number of digits. If they do not match, a one-byte check is performed (S20 and S27). When the one-byte check indicates a mismatch, the output processing (S22 and S29) of the compressed character, the compression control code, and the number of compressed characters to the output buffer (ARG-6) is performed. The purpose of first determining the same character string and the continuous character string in a plurality of bytes is to reduce the number of times the same character string and the continuous character string are determined, but 5 bytes and 10 bytes are values based on empirical values. In the performance evaluation result of the compression processing, the CPU performance is improved. If this value is too large, the result will be inconsistent in the determination of the same character string or continuous character string, and the determination processing will be performed on a byte-by-byte basis, and the effect of reducing the number of determinations cannot be obtained.

【0023】図6および図7を参照して、本願の請求項
1〜請求項に記載のコンピュータデータの圧縮方法に
おけるレコード間圧縮処理サブルーチン、および連続文
字圧縮処理サブルーチンの処理概要を説明する。図6お
よび図7は図4および図5のブロックフローチャートの
補足説明を行なっている。
Referring to FIG. 6 and FIG. 7, an outline of the inter-record compression subroutine and the continuous character compression subroutine in the computer data compression method according to the first to fourth aspects of the present invention will be described. 6 and 7 provide a supplementary description of the block flowcharts of FIGS. 4 and 5.

【0024】図6・図7は圧縮制御符号の格納方式の説
明図も兼ねていて、レコード間圧縮の場合は圧縮制御符
号(1桁)、圧縮文字数(1桁)の2桁、連続文字圧縮
の場合は圧縮文字(1桁)、圧縮制御符号(1桁)、圧
縮文字数(1桁)の3桁で構成されている。
FIGS. 6 and 7 also serve as explanatory diagrams of a compression control code storage method. In the case of inter-record compression, a compression control code (1 digit), two digits of the number of compressed characters (1 digit), and continuous character compression are used. Is composed of three digits: a compressed character (one digit), a compression control code (one digit), and the number of compressed characters (one digit).

【0025】図6に示したnレコード目およびn+1レ
コード目のデータを参照して、レコード間圧縮処理の概
要を説明する。まず(1)で先頭の3バイトを比較し、
(2)で一致したのでレコード間圧縮を行なう。(3)
で先頭の10バイトを比較し、(4)で一致しなかった
ので1バイトチェックを行なう。(5)で1バイトチェ
ックの2回目で不一致となり、(6)でレコード間圧縮
制御符号、文字数を表わす(“1E”4)を出力する。
(7)で5バイト目から連続文字圧縮処理を行なう。5
バイト目から4バイトを比較する。(8)で一致しなか
ったので1バイトチェックを行ない、(9)で1バイト
チェックの4回目で不一致となる。(10)でレコード
間圧縮も連続文字圧縮も行なえないため、dddをその
まま出力バッファへ移送する。なお8バイトから10バ
イトのhiiについても(1)〜(10)と同様の処理
が行なわれる。(11)で(1)の処理に返り先頭の3
バイトを比較し、(12)で一致したのでレコード間圧
縮を行なう。(13)で11バイト目から10バイトを
比較し、(14)で一致したので21バイト目から10
バイトを比較する。(15)で一致しなかったので21
バイト目から1バイトチェックを行ない、(16)で1
バイトチェックの10回目で不一致となる。(17)で
レコード間圧縮制御符号、文字数を表わす(“1E”1
9)を出力する。(18)で残1バイトを同様な判定を
行ない、結果1バイトを圧縮せずに出力する。なお、最
初に3バイトを比較しているのは、レコード間圧縮制御
符号、桁数の格納方式が2バイトであるため、3バイト
以上にならないと圧縮効果が得られないためである。
The outline of the inter-record compression processing will be described with reference to the data of the n-th record and the (n + 1) -th record shown in FIG. First, the first three bytes are compared in (1),
Since they match in (2), compression between records is performed. (3)
The first 10 bytes are compared with each other, and since they do not match in (4), a 1-byte check is performed. In (5), a mismatch occurs in the second one-byte check, and in (6), an inter-record compression control code and ("1E" 4) representing the number of characters are output.
In (7), continuous character compression processing is performed from the fifth byte. 5
Compare 4 bytes from the byte. Since they did not match in (8), a one-byte check is performed, and in (9), no match occurs in the fourth one-byte check. Since neither inter-record compression nor continuous character compression can be performed in (10), ddd is directly transferred to the output buffer. Note that the same processing as (1) to (10) is performed for the hii of 8 to 10 bytes. Return to the process of (1) in (11) and return to the top 3
The bytes are compared, and since they match in (12), compression between records is performed. In (13), the 10th byte from the 11th byte is compared.
Compare bytes. Since they did not match in (15), 21
Check 1 byte from the byte, 1 in (16)
A mismatch occurs at the tenth byte check. (17) represents the inter-record compression control code and the number of characters (“1E” 1
9) is output. At (18), the same determination is made for the remaining one byte, and the result is output without compressing one byte. The reason why the three bytes are compared first is that the compression effect between the records cannot be obtained unless the storage method of the inter-record compression control code and the number of digits is two bytes or more.

【0026】図8を参照して、圧縮時の特例処理につい
て説明する。圧縮制御符号(“1E”または“1F”)
と圧縮データが一致した場合には、伸長処理で制御符号
の判断ができなくなるので補助符号(“0C”)を挿入
することにより判断可能としている。すなわち、圧縮制
御コード(“1E”,“1F”)、補助コード(“0
C”)と同一のデータを出力する場合には、1バイト前
に補助コード(“0C”)が付与されて出力される。図
9を参照して、レコード間圧縮処理・連続文字圧縮処理
において、圧縮文字数格納桁数(1桁)の最大255文
字を超える圧縮文字数が発生した場合の制御符号格納方
式について説明する。1回の圧縮は255バイト単位で
行なわれ、255バイトを超える圧縮の場合は255バ
イト単位で出力される。
With reference to FIG. 8, a special process at the time of compression will be described. Compression control code ("1E" or "1F")
When the compressed data and the compressed data match, it is impossible to determine the control code in the decompression process. Therefore, the determination can be made by inserting an auxiliary code (“0C”). That is, the compression control code (“1E”, “1F”) and the auxiliary code (“0
C "), the data is output with an auxiliary code (" 0C ") added one byte before. Referring to FIG. 9, in the inter-record compression processing and the continuous character compression processing, A description will be given of a control code storage method in the case where the number of compressed characters exceeds the maximum number of stored characters (one digit) of 255. One compression is performed in units of 255 bytes, and a case of compression exceeding 255 bytes. Is output in units of 255 bytes.

【0027】次に伸長方法の実施例について説明する。
図2を参照して、コンピュータデータの伸長方法におい
て、データ伸長処理を要求するアプリケーションプログ
ラムから伸長処理プログラムを呼出す際のアーギュメン
トについて説明する。伸長条件(E1)、伸長すべきデ
ータ(E5)等を指定して伸長処理が要求される。
Next, an embodiment of the decompression method will be described.
Referring to FIG. 2, in the process of elongation computer data, it will be described argument when calling the decompression processing program from the application program requesting the data decompression processing. A decompression process is requested by specifying a decompression condition (E1), data to be decompressed (E5), and the like.

【0028】図10および図11を参照して、コンピュ
ータデータの伸長方法における伸長処理メインルーチン
の処理手順について説明する。伸長すべきデータ(E
5)をサーチし圧縮制御符号(“1E”または“1
F”)を判定し、各々レコード間伸長処理、連続文字伸
長処理が行なわれる。
[0028] With reference to FIGS. 10 and 11 describes a procedure of the decompression process the main routine in extension method co Npyu <br/> Tadeta. Data to be expanded (E
5) to search for the compression control code (“1E” or “1E”).
F "), and an inter-record decompression process and a continuous character decompression process are performed.

【0029】図10を参照して、レコード間伸長処理に
ついて説明する。圧縮制御コードの“1E”が出現した
ら、以下の方法を用いて伸長処理を行なう。すなわち、
圧縮制御コードを検出したら、次の1バイトをバイナリ
表現の文字数として認識する。次にその文字数分を全レ
コード(ARG−4)から出力バッファ(ARG−6)
に移送する。
Referring to FIG. 10, the inter-record decompression process will be described. When the compression control code "1E" appears, the decompression process is performed using the following method. That is,
When the compression control code is detected, the next one byte is recognized as the number of characters in the binary expression. Next, the number of characters is output from all records (ARG-4) to the output buffer (ARG-6).
Transfer to

【0030】図11を参照して、連続文字伸長処理につ
いて説明する。圧縮制御コードの“1F”が出現した
ら、以下の方法を用いて伸長処理を行なう。すなわち、
圧縮制御コードを検出したら、次の1バイトをバイナリ
表現の文字数として認識する。次に、この時点で最後に
出力バッファ(ARG−6)に出力した文字(圧縮文
字)を認識する。次にその文字数分および圧縮文字を出
力バッファ(ARG−6)に移送する。
Referring to FIG. 11, the continuous character decompression process will be described. When the compression control code "1F" appears, the decompression process is performed using the following method. That is,
When the compression control code is detected, the next one byte is recognized as the number of characters in the binary expression. Next, at this point, the character (compressed character) output to the output buffer (ARG-6) last is recognized. Next, the number of characters and the compressed characters are transferred to the output buffer (ARG-6).

【0031】図12を参照して、伸長処理の特例事項に
ついて説明する。連続文字伸長処理、文字移送処理にお
いて、補助コード(“0C”)を検出した場合、その文
字を読飛ばして次の文字をデータとして扱う。ただし、
補助コード(“0C”)を読飛ばすのは1回のみとされ
る。
With reference to FIG. 12, special items of the decompression process will be described. When the supplementary code (“0C”) is detected in the continuous character decompression process and the character transfer process, the character is skipped and the next character is treated as data. However,
The auxiliary code ("0C") is skipped only once.

【0032】[0032]

【発明の効果】以上のように本願の請求項1に記載のコ
ンピュータデータの圧縮方法は、従来の同一レコード内
における連続文字圧縮処理に加えて、相異なるレコード
間における同一文字圧縮処理を行ない両者を組合せるこ
とによりコンピュータデータの圧縮率を格段に高めるこ
とができる。したがってコンピュータ資源(中央処理装
置、磁気ディスク、データ通信機器)の有効利用を図る
ことができ、費用の削減が可能となる。
As described above, the computer data compression method according to claim 1 of the present application performs the same character compression processing between different records in addition to the conventional continuous character compression processing within the same record. Can significantly increase the compression ratio of computer data. Therefore, effective use of computer resources (central processing unit, magnetic disk, data communication equipment) can be achieved, and cost can be reduced.

【0033】また請求項に記載のコンピュータデータ
の圧縮方法によれば、圧縮すべきコンピュータデータを
段階的にサーチする方法により、効率的な圧縮処理を行
なうコンピュータデータの圧縮方法を提供することがで
きる。
[0033] According to the method of compressing computer data according to claim 1, the method of searching the computer data to be compressed in stages, to provide a method of compressing computer data to perform efficient compression Can be.

【0034】また請求項、請求項、および請求項
に記載のコンピュータデータの圧縮方法によれば、請求
に記載の発明の効果に加え、二重圧縮を防止するコ
ンピュータデータの圧縮方法を提供することができる。
[0034] Further, claim 2 , claim 3 , and claim 4
According to the method for compressing computer data described in ( 1 ), in addition to the effect of the invention described in claim 1 , it is possible to provide a method for compressing computer data that prevents double compression.

【0035】またコンピュータデータの伸長方法によれ
ば、請求項1〜請求項に記載のコンピュータデータの
圧縮方法により圧縮されたデータを伸長して、もとのデ
ータに復元することができる。したがって一旦圧縮した
もとのデータを復元して利用することが可能となる。
[0035] According to or computer method decompressed data, and decompresses the data compressed by the compression method computer data according to any one of claims 1 to 4, can be restored to the original data . Therefore, it is possible to restore the original compressed data for use.

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

【図1】実施例において、アプリケーションプログラム
から圧縮処理プログラムを呼出す際のアーギュメントの
説明図である。
FIG. 1 is an explanatory diagram of arguments when a compression processing program is called from an application program in an embodiment.

【図2】実施例において、アプリケーションプログラム
から伸長処理プログラムを呼出す際のアーギュメントの
説明図である。
FIG. 2 is an explanatory diagram of arguments when a decompression processing program is called from an application program in the embodiment.

【図3】実施例における圧縮処理プログラムのメインル
ーチンの処理手順を示すブロックフローチャートであ
る。
FIG. 3 is a block flowchart showing a processing procedure of a main routine of a compression processing program in the embodiment.

【図4】実施例におけるレコード間圧縮処理サブルーチ
ンの処理手順を示すブロックフローチャートである。
FIG. 4 is a block flowchart showing a processing procedure of an inter-record compression processing subroutine in the embodiment.

【図5】実施例における連続文字圧縮処理サブルーチン
の処理手順を示すブロックフローチャートである。
FIG. 5 is a block flowchart showing a processing procedure of a continuous character compression processing subroutine in the embodiment.

【図6】実施例におけるレコード間圧縮処理サブルーチ
ンの処理内容の概説およびレコード間圧縮制御符号の格
納方式の説明図である。
FIG. 6 is an explanatory diagram of an outline of processing contents of an inter-record compression processing subroutine and a storage method of an inter-record compression control code in the embodiment.

【図7】実施例における連続文字圧縮処理サブルーチン
の処理内容の概説および連続文字圧縮制御符号の格納方
式の説明図である。
FIG. 7 is an explanatory diagram of an outline of processing contents of a continuous character compression processing subroutine and a storage method of a continuous character compression control code in the embodiment.

【図8】実施例における圧縮処理・文字移送処理におけ
る特例処置の説明図である。
FIG. 8 is an explanatory diagram of special treatment in compression processing and character transfer processing in the embodiment.

【図9】実施例における圧縮文字数が255文字を超え
る場合の制御符号格納方式の説明図である。
FIG. 9 is an explanatory diagram of a control code storage method when the number of compressed characters exceeds 255 in the embodiment.

【図10】実施例におけるレコード間伸長処理に関する
説明図である。
FIG. 10 is an explanatory diagram relating to an inter-record decompression process in the embodiment.

【図11】実施例における連続文字伸長処理に関する説
明図である。
FIG. 11 is a diagram illustrating a continuous character decompression process according to the embodiment.

【図12】実施例における伸長処理の特例処置の説明図
である。
FIG. 12 is an explanatory diagram of a special treatment of a decompression process in the embodiment.

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 コンピュータの外部記憶媒体に格納する
データを外部指示パラメータにより前記外部記憶媒体に
格納する前に圧縮するデータ圧縮方法、およびコンピュ
ータ間のデータ転送処理における通信データを外部指示
パラメータによりデータ転送前に圧縮するデータ圧縮方
法であって、 相異なるレコード間における同一文字列を圧縮する第1
の圧縮処理を行なうステップと、 同一レコード内における連続文字列を圧縮する第2の圧
縮処理を行なうステップとを含み、 前記第1の圧縮処理を行なうステップは、第1段階とし
て複数バイト単位でレコード間同一文字列の判定を行な
うステップと、 前記判定の結果が不一致の場合は第2段階として1バイ
ト単位でレコード間同一文字列の判定を行なうステップ
と、 判定の結果前記同一文字列が存在した場合には当該同一
文字列を圧縮するステップとを含み、 前記第2の圧縮処理を行なうステップは、第1段階とし
て複数バイト単位で同一レコード内連続文字列の判定を
行なうステップと、 前記判定の結果が不一致の場合は第2段階として1バイ
ト単位で同一レコード内連続文字列の判定を行なうステ
ップと、 判定の結果前記連続文字列が存在した場合には当該連続
文字列を圧縮するステップとを含むコンピュータデータ
の圧縮方法。
Claims: 1. An external storage medium for a computer.
Data is transferred to the external storage medium by an external instruction parameter.
A data compression method for compressing data before storing
Externally instruct communication data in data transfer processing between data
Data compression method to compress before data transfer by parameter
Method for compressing the same character string between different records
And a second compression for compressing a continuous character string in the same record.
Performing the first compression processing , wherein the step of performing the first compression processing includes, as a first step, a step of determining the same character string between records in units of a plurality of bytes; and a step of determining the same if the result of the determination does not match. A second step of determining the same character string between records as a two-step unit and compressing the same character string if the same character string exists as a result of the determination; The first step is a step of determining a continuous character string in the same record in a unit of a plurality of bytes as a first step. performing a determination, and step that said continuous string of the determination is to compress the continuous string when the presence of including computer data Shrinkage method.
【請求項2】 第1の圧縮処理または第2の圧縮処理を
行なったデータの1件目のレコードの先頭複数バイトに
所定のコードを付加するステップをさらに含む請求項
に記載のコンピュータデータの圧縮方法。
2. A method according to claim 1, further comprising the step of adding a predetermined code to the beginning multibyte first compression processing or the second 1 of the record of the data subjected to compression processing
3. The method for compressing computer data according to item 1.
【請求項3】 圧縮処理をすべきデータの1件目の先頭
複数バイトを判定し、それが前記所定のコードでない場
合には圧縮処理を実行し、前記所定のコードである場合
には圧縮処理を中止するステップをさらに含む請求項
に記載のコンピュータデータの圧縮方法。
3. A first plurality of bytes of data to be subjected to a compression process are determined. If the first plurality of bytes is not the predetermined code, the compression process is executed. If the first code is the predetermined code, the compression process is performed. 3. The method according to claim 2 , further comprising the step of:
3. The method for compressing computer data according to item 1.
【請求項4】 前記複数バイトは4バイトであり、前記
所定のコードはALL“1F”である請求項に記載の
コンピュータデータの圧縮方法。
4. The computer data compression method according to claim 3 , wherein the plurality of bytes are four bytes, and the predetermined code is ALL “1F”.
JP21069495A 1995-08-18 1995-08-18 How to compress and expand computer data Expired - Fee Related JP3186530B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21069495A JP3186530B2 (en) 1995-08-18 1995-08-18 How to compress and expand computer data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21069495A JP3186530B2 (en) 1995-08-18 1995-08-18 How to compress and expand computer data

Publications (2)

Publication Number Publication Date
JPH0964752A JPH0964752A (en) 1997-03-07
JP3186530B2 true JP3186530B2 (en) 2001-07-11

Family

ID=16593561

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21069495A Expired - Fee Related JP3186530B2 (en) 1995-08-18 1995-08-18 How to compress and expand computer data

Country Status (1)

Country Link
JP (1) JP3186530B2 (en)

Also Published As

Publication number Publication date
JPH0964752A (en) 1997-03-07

Similar Documents

Publication Publication Date Title
CA2077271C (en) Method and apparatus for compressing data
JP4435096B2 (en) Data transmission method, data equalization method and apparatus
JP2534465B2 (en) Data compression apparatus and method
WO1993017378A2 (en) Method and apparatus for locating longest prior target string matching current string in buffer
US6112208A (en) Data compressing method and apparatus to generate bit maps in accordance with extracted data symbols
JP3186530B2 (en) How to compress and expand computer data
JPH10261969A (en) Data compression method and its device
JPH04360246A (en) Device for compressing file
JPH03247167A (en) Data compression system
JP3038233B2 (en) Data compression and decompression device
JP2790594B2 (en) How to compress and decompress database records
JP3708318B2 (en) Data compression / decompression apparatus and data compression / decompression method
JP3384844B2 (en) Data compression method and apparatus and data decompression method and apparatus
JPH09232967A (en) Data compressing device and restoring device
JP3088740B2 (en) Data compression and decompression method
JPH06290021A (en) Method for compressing source program
JPH04129429A (en) Dictionary retrieval system for data compressor
JP2003318739A (en) System and method for compressing data sequence, and computer readable medium
JP3422412B2 (en) Differential compression method for variable-length records
JP3054183B2 (en) Dictionary rewriting method of data compression device
JP2943900B2 (en) Data compression processing device, data decompression processing device, data compression processing method, and data decompression processing method for data file
JP2699965B2 (en) Data compression method and data decompression method
JP3078601B2 (en) Data compression method
JPS63296147A (en) Data compression processing system
JPH06274311A (en) Data compression device and data restoration device

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

LAPS Cancellation because of no payment of annual fees