JP2002135128A - Data-compression method, data compression/expansion method, data-compression device, and data compression/ expansion device - Google Patents

Data-compression method, data compression/expansion method, data-compression device, and data compression/ expansion device

Info

Publication number
JP2002135128A
JP2002135128A JP2000326119A JP2000326119A JP2002135128A JP 2002135128 A JP2002135128 A JP 2002135128A JP 2000326119 A JP2000326119 A JP 2000326119A JP 2000326119 A JP2000326119 A JP 2000326119A JP 2002135128 A JP2002135128 A JP 2002135128A
Authority
JP
Japan
Prior art keywords
character
dictionary
encoding
interval
base pointer
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
JP2000326119A
Other languages
Japanese (ja)
Inventor
Toshiyuki Hirose
寿幸 廣瀬
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2000326119A priority Critical patent/JP2002135128A/en
Publication of JP2002135128A publication Critical patent/JP2002135128A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a dictionary with capable of conducting processing in single path processing ability, and moreover can obtain sufficient compressibility. SOLUTION: A compression/expansion section 12, which comprises a slide dictionary part 121, a base pointer part 122, an interval calculation part 123, and a gamma-encoding part 124, stores read data as the contents of a dictionary, reads the contents of the dictionary used for encoding from a location of a base pointer, finds longest agreement character string out of the contents, encodes an interval from the base pointer to the first agreement character, and moves the base pointer to a location of the agreement character prior to next character encoding, to perform data compression by a slide dictionary method.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、文章データ等のデ
ータを圧縮するデータ圧縮方法、データ圧縮・伸長方
法、データ圧縮装置及びデータ圧縮・伸長装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data compression method for compressing data such as text data, a data compression / decompression method, a data compression device, and a data compression / decompression device.

【0002】[0002]

【従来の技術】近年、情報処理技術の発達により、コン
ピュータによって文字コード,ベクトル情報,画像など
様々な種類の膨大なデータが処理されるようになってい
る。そして、従来より、二次記憶装置の容量の節約,デ
ータ通信における通信時間の短縮を実現するための技術
として、データ圧縮が知られている。これは、データの
中に含まれる、冗長な情報を取り除くこと、データ列を
他の短いデータ列に変換することなどによって実現され
る。
2. Description of the Related Art In recent years, with the development of information processing technology, a huge amount of various types of data such as character codes, vector information, and images have been processed by computers. Conventionally, data compression has been known as a technique for reducing the capacity of the secondary storage device and shortening the communication time in data communication. This is realized by removing redundant information included in the data, converting the data string to another short data string, and the like.

【0003】データ圧縮の手法は、圧縮データを元のデ
ータに完全には復元できない非可逆圧縮法と、圧縮デー
タを元のデータに完全に復元できる可逆圧縮法の2種類
に分けられる。非可逆圧縮法は、データの完全な復元が
できないので、音声や画像などのデータの圧縮に主に利
用されている。また、データの完全な保存が求められる
二次記憶装置等には元のデータに完全に復元できる可逆
圧縮法が使われる。
[0003] Data compression techniques are classified into two types: an irreversible compression method in which compressed data cannot be completely restored to original data, and a lossless compression method in which compressed data can be completely restored to original data. Since the irreversible compression method cannot completely restore data, it is mainly used for compression of data such as audio and images. For a secondary storage device or the like that requires complete storage of data, a reversible compression method that can completely restore the original data is used.

【0004】可逆圧縮の手法としては、データ内の文字
の出現確立から個々の符号を発生するハフマン符号や算
術符号等の確立統計型符号化方式と、データ内の文字列
の繰り返し出現性を利用したスライド辞書法(LZ77
符号)や動的辞書法(LZ78符号)などの辞書型符号
化方式がある。
[0004] As a method of lossless compression, a statistical coding method such as a Huffman code or an arithmetic code that generates individual codes from the appearance of characters in data and a repetitive appearance of a character string in data are used. Slide dictionary method (LZ77
Code) and a dynamic dictionary method (LZ78 code).

【0005】ここで、スライド辞書法(LZ77符号)
は、J.Ziv とA.Lempelが1977年に発表したデータ圧
縮アルゴリズムであって、既に読み込まれたデータを辞
書として登録し、その中から最も長い一致文字列を探し
出して、一致した位置と一致した長さで元の符号を置き
換えて出力していくというものである。スライド辞書法
(LZ77符号)では、適応範囲が一部に限られる局所
的な辞書を持ち、スライド窓と呼ばれる文字列の中を移
動する窓を使って辞書から文字列を抽出する。
Here, the slide dictionary method (LZ77 code)
Is a data compression algorithm released in 1977 by J.Ziv and A.Lempel, which registers already read data as a dictionary, finds the longest matching character string from it, and matches it with the matching position. The original code is replaced with the length that has been set and output. In the slide dictionary method (LZ77 code), a local dictionary having a limited adaptation range is provided, and a character string is extracted from the dictionary using a window called a sliding window that moves in the character string.

【0006】すなわち、スライド辞書法(LZ77符
号)では、現在符号化を行っている文字を含めた文字列
をスライド窓と呼び、そのスライド窓中にある文字列が
参照の対象となる。また、符号語は、 m:最長一致文字列のスライド窓の先頭からの位置(オ
フセット) l:スライド窓にある最長一致文字列の長さ x:一致しなかった最初の文字(最長一致文字列の次の
文字) なるm,l,xからなる2進数で表される。文字列がス
ライド窓に存在しなかった場合はm=0,l=0とす
る。また、スライド窓が符号語を出力するたびにl+1
文字分次の文字列にずらす。
That is, in the slide dictionary method (LZ77 code), a character string including a character currently being encoded is called a slide window, and the character string in the slide window is to be referred to. The codeword is: m: the position (offset) of the longest matching character string from the top of the sliding window l: the length of the longest matching character string in the sliding window x: the first character that did not match (the longest matching character string) Is represented by a binary number consisting of m, l, x. If the character string does not exist in the sliding window, m = 0 and l = 0. Also, every time the sliding window outputs a codeword, l + 1
Shift to the next character string.

【0007】このようにスライド辞書法(LZ77符
号)では、最長一致文字列を過去のテキストから見つ
け、その開始位置と長さを符号語として使う。
As described above, in the slide dictionary method (LZ77 code), the longest matching character string is found from the past text, and its start position and length are used as code words.

【0008】この種の技術は、例えば、特開昭60−1162
28号公報公報に記載されている。
[0008] This type of technology is disclosed in, for example, Japanese Patent Application Laid-Open No. 60-1162.
No. 28 gazette.

【0009】また、スライド辞書法(LZ77符号)に
は、開始位置と長さに関する表現の仕方や最長一致文字
列の探索の方法によって幾つかのバリエーションが存在
する。
There are several variations in the slide dictionary method (LZ77 code) depending on how to express the start position and length and how to search for the longest matching character string.

【0010】[0010]

【発明が解決しようとする課題】ところで、ハフマン符
号や算術符号等を採用したデータ圧縮は、2パスで処理
を行うので処理が重く、ハードウエアでは実用的でな
く、ソフトウエアで行う必要がある。
By the way, data compression employing Huffman code, arithmetic code, and the like is performed in two passes and is therefore heavy, impractical in hardware, and must be performed in software. .

【0011】また、データ内の文字列の繰り返し出現性
を利用した辞書型符号化方式の動的辞書法(LZ78符
号)を採用したデータ圧縮は、1パスで処理を行うこと
ができるのであるが、辞書に大きなメモリを必要とす
る。
Also, data compression employing a dynamic dictionary method (LZ78 code) of a dictionary type encoding method utilizing the repetitive appearance of character strings in data can be processed in one pass. , Requires a large memory for the dictionary.

【0012】そして、辞書型符号化方式のスライド辞書
法(LZ77符号)を採用したデータ圧縮は、1パスで
処理を行うことができ、比較的に小さな辞書で実行する
ことができるのであるが、さらなる辞書の小型化と圧縮
率の改善が必要とされている。
Data compression using the slide dictionary method (LZ77 code) of the dictionary type encoding method can be performed in one pass, and can be executed with a relatively small dictionary. There is a need for further miniaturization of the dictionary and improvement of the compression ratio.

【0013】そこで、本発明の目的は、上述の如き従来
の実状に鑑み、1パスで処理が可能でしかも小さな辞書
で十分な圧縮率を得ることができるようにしたデータ圧
縮方法、データ圧縮・伸長方法、データ圧縮装置及びデ
ータ圧縮・伸長装置を提供することにある。
Accordingly, an object of the present invention is to provide a data compression method, a data compression method and a data compression method capable of performing processing in one pass and obtaining a sufficient compression ratio with a small dictionary in view of the above-mentioned conventional situation. An object of the present invention is to provide a decompression method, a data compression device, and a data compression / decompression device.

【0014】[0014]

【課題を解決するための手段】本発明は、読み込まれた
データを辞書として登録し、その中から最も長い一致文
字列を探し出して、一致した位置と一致した長さで元の
符号を置き換えて出力するスライド辞書法によるデータ
圧縮方法であって、符号化における辞書の参照をベース
ポインタの位置から行い、上記ベースポインタから最初
に一致した文字までのインターバルを符号化し、次の文
字を符号化する前に、ベースポインタを文字が一致した
位置に移動することを特徴とする。
According to the present invention, the read data is registered as a dictionary, the longest matching character string is searched from the dictionary, and the original code is replaced with the matching position and length. This is a data compression method based on a slide dictionary method for outputting, in which a reference to a dictionary in encoding is performed from the position of a base pointer, an interval from the base pointer to the first matching character is encoded, and the next character is encoded. Previously, the base pointer is moved to a position where characters match.

【0015】また、本発明は、読み込まれたデータを辞
書として登録し、その中から最も長い一致文字列を探し
出して、一致した位置と一致した長さで元の符号を置き
換えて出力するスライド辞書法によるデータ圧縮・伸長
方法であって、圧縮時には、符号化における辞書の参照
をベースポインタの位置から行い、上記ベースポインタ
から最初に一致した文字までのインターバルを符号化
し、次の文字を符号化する前に、ベースポインタを文字
が一致した位置に移動する処理を繰り返すことにより符
号化を行い、伸長時には、符号化した文字について、復
号における辞書の参照をベースポインタの位置から行
い、上記ベースポインタから最初に一致した文字までの
インターバルを復号し、次の文字を復号する前に、ベー
スポインタを文字が一致した位置に移動する処理を繰り
返すことにより復号することを特徴とする。
The present invention also provides a slide dictionary which registers read data as a dictionary, finds the longest matching character string from the dictionary, replaces the original code with a length matching the matching position, and outputs the result. A data compression / expansion method based on the method. At the time of compression, a dictionary in encoding is referenced from the position of a base pointer, an interval from the base pointer to the first matching character is encoded, and the next character is encoded. Before performing the encoding, the encoding is performed by repeating the process of moving the base pointer to the position where the character matches, and at the time of decompression, for the encoded character, reference to the dictionary in decoding is performed from the position of the base pointer in decoding. From the first character to the first matched character, and before decoding the next character, move the base pointer to one character. Characterized by decoding by repeating the process of moving to the position.

【0016】また、本発明は、読み込まれたデータを辞
書として登録し、その中から最も長い一致文字列を探し
出して、一致した位置と一致した長さで元の符号を置き
換えて出力するスライド辞書法によりデータ圧縮処理を
行うデータ圧縮装置であって、読み込まれたデータが辞
書として登録されるスライド辞書部と、符号化における
上記スライド辞書部の参照位置として前回文字が一致し
た位置を指定するベースポインタと、上記ベースポイン
タから最初に一致した文字までのインターバルを算出す
るインターバル算出部と、上記インターバル算出部によ
り算出されたインターバルを符号化する符号化部とを備
えることを特徴とする。
The present invention also provides a slide dictionary that registers read data as a dictionary, finds the longest matching character string from the dictionary, replaces the original code with a length matching the matching position, and outputs the slide dictionary. A data compression apparatus for performing data compression processing by a method, comprising: a slide dictionary section in which read data is registered as a dictionary; and a base for designating a position at which a previous character matched as a reference position of the slide dictionary section in encoding. It is characterized by comprising a pointer, an interval calculating section for calculating an interval from the base pointer to the first matching character, and an encoding section for encoding the interval calculated by the interval calculating section.

【0017】さらに、本発明は、読み込まれたデータを
辞書として登録し、その中から最も長い一致文字列を探
し出して、一致した位置と一致した長さで元の符号を置
き換えて出力するスライド辞書法によるデータ圧縮・伸
長装置であって、符号化における辞書の参照をベースポ
インタの位置から行い、上記ベースポインタから最初に
一致した文字までのインターバルを符号化し、次の文字
を符号化する前に、ベースポインタを文字が一致した位
置に移動する処理を繰り返すことにより符号化を行う圧
縮処理手段と、符号化した文字について、復号における
辞書の参照をベースポインタの位置から行い、上記ベー
スポインタから最初に一致した文字までのインターバル
を復号し、次の文字を復号する前に、ベースポインタを
文字が一致した位置に移動する処理を繰り返すことによ
り復号する伸長処理手段とを備えることを特徴とする。
Further, according to the present invention, a slide dictionary in which read data is registered as a dictionary, a longest matching character string is searched from the dictionary, and an original code is replaced by a length matching a matching position and output. A data compression / decompression device based on the method, wherein a reference to a dictionary in encoding is performed from a position of a base pointer, an interval from the base pointer to a first matched character is encoded, and before encoding a next character, Compression processing means for performing encoding by repeating the process of moving the base pointer to the position where the character matches, and referring to the dictionary in decoding from the position of the base pointer for decoding the encoded character, Decode the interval up to the character that matches the character, and before decoding the next character, move the base pointer to the position where the character matches. Characterized in that it comprises a decompression processing means for decoding by repeating the process of moving to.

【0018】[0018]

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

【0019】本発明は、例えば図1に示すような構成の
テープストリーマドライブ10に適用される。
The present invention is applied to, for example, a tape streamer drive 10 having a configuration as shown in FIG.

【0020】このテープストリーマドライブ10は、外
部のホストコンピュータ20との間でデータの授受を行
うためのインターフェースとしてSCSI(Smoll Compu
terSystem Interface) インターフェイス11を備え
る。このSCSIインターフェイス11には、圧縮/伸
長処理部12が接続されている。この圧縮/伸長処理部
12には、IF/ECCコントローラ13が接続されて
いる。このIF/ECCコントローラ13には、バッフ
ァメモリ14、記録用RF処理部15及び再生用RF処
理部16が接続されている。そして、上記記録用RF処
理部15及び再生用RF処理部16には、ロータリート
ランス17を介して記録ヘッド18A,18B及び再生
ヘッド19A,19Bが接続されている。
The tape streamer drive 10 has a SCSI (Smoll Compu- ter) as an interface for exchanging data with an external host computer 20.
terSystem Interface). A compression / expansion processing unit 12 is connected to the SCSI interface 11. An IF / ECC controller 13 is connected to the compression / decompression processing unit 12. The buffer memory 14, the recording RF processing unit 15, and the reproduction RF processing unit 16 are connected to the IF / ECC controller 13. The recording heads 18A and 18B and the reproducing heads 19A and 19B are connected to the recording RF processing unit 15 and the reproducing RF processing unit 16 via a rotary transformer 17.

【0021】なお、このテープストリーマドライブ10
は、磁気テープ1に対して、ヘリカルスキャン方式によ
り記録/再生を行うもので、上記記録ヘッド18A,1
8B及び再生ヘッド19A,19Bが図示しない回転ド
ラムに設けられている。記録ヘッド18A,18Bは互
いにアジマス角の異なる2つのギャップが極めて近接し
て配置される構造となっている。再生ヘッド19A,1
9Bも互いにアジマス角の異なるヘッドとされるが、例
えば90度離れた状態で配置される。
The tape streamer drive 10
Performs recording / reproducing on the magnetic tape 1 by a helical scan method. The recording heads 18A, 1
8B and reproduction heads 19A and 19B are provided on a rotating drum (not shown). The recording heads 18A and 18B have a structure in which two gaps having different azimuth angles are arranged very close to each other. Reproducing head 19A, 1
9B are also heads having different azimuth angles, but are arranged, for example, 90 degrees apart.

【0022】このテープストリーマドライブ10は、デ
ータ記録時にホストコンピュータ20から、固定長のレ
コード(record)という伝送データ単位によりS
CSIインターフェイス11を介して逐次データが入力
され、圧縮/伸長部12に供給される。なお、このよう
なテープストリーマドライブシステムにおいては、可変
長のデータの集合単位によってホストコンピュータ20
よりデータが伝送されるモードも存在する。
The tape streamer drive 10 transmits the data from the host computer 20 at the time of data recording by using a transmission data unit called a fixed-length record.
Data is sequentially input via the CSI interface 11 and supplied to the compression / decompression unit 12. In such a tape streamer drive system, the host computer 20 is controlled by a set unit of variable-length data.
There are also modes in which more data is transmitted.

【0023】圧縮/伸長部12では、入力されたデータ
について図示しないシステムコントローラによる指示に
従い必要に応じて、本発明に係るデータ圧縮/伸長方法
により圧縮/伸長処理が施される。
The compression / expansion unit 12 performs a compression / expansion process on the input data according to an instruction from a system controller (not shown) by a data compression / expansion method according to the present invention as needed.

【0024】圧縮/伸長部12により圧縮処理が施され
たデータは、IF/ECCコントローラ13に供給され
る。IF/ECCコントローラ13では、圧縮/伸長部
12から供給されたデータをバッファメモリ14に一旦
蓄積して、最終的にグループ(Group)という磁気
テープの40トラック分に相当する固定長の単位として
データを扱うようにして、このデータに対してECCフ
ォーマット処理を行う。
The data subjected to the compression processing by the compression / expansion unit 12 is supplied to an IF / ECC controller 13. The IF / ECC controller 13 temporarily stores the data supplied from the compression / expansion unit 12 in the buffer memory 14, and finally stores the data as a fixed length unit corresponding to 40 tracks of a magnetic tape called a group (Group). And performs ECC format processing on this data.

【0025】IF/ECCコントローラ13におけるE
CCフォーマット処理では、記録データについて誤り訂
正コードを付加するとともに、磁気記録に適合するよう
にデータについて変調処理を行う。そして、このECC
フォーマット処理を施した記録データを記録用RF処理
部15に供給する。記録用RF処理部15では供給され
た記録データに対して増幅、記録イコライジング等の処
理を施して記録信号を生成する。この記録用RF処理部
15により生成された記録信号は、ロータリートランス
17を介して記録ヘッド18A,18Bに供給され、磁
気テープ1に記録される。
E in the IF / ECC controller 13
In the CC format processing, an error correction code is added to recording data, and the data is subjected to modulation processing so as to be compatible with magnetic recording. And this ECC
The recording data subjected to the format processing is supplied to the recording RF processing unit 15. The recording RF processing unit 15 performs processing such as amplification and recording equalization on the supplied recording data to generate a recording signal. The recording signal generated by the recording RF processing unit 15 is supplied to the recording heads 18A and 18B via the rotary transformer 17, and is recorded on the magnetic tape 1.

【0026】また、データ再生動作について簡単に説明
すると、磁気テープ1の記録データが再生ヘッド19
A,19BによりRF再生信号として読み出され、この
RF再生信号がロータリートランス17を介して再生用
RF処理部16に供給される。この再生用RF処理部1
6では、供給されたRF再生信号に対して、再生イコラ
イジング、再生クロック生成、2値化、デコード(例え
ばビタビ復号)などの処理が行われる。このようにして
読み出されたデータはIF/ECCコントローラ13に
供給され、バッファメモリ14に一時蓄積されて、誤り
訂正処理等が施される。そして、上記IF/ECCコン
トローラ13により誤り訂正処理等が施されたデータ
は、所定の時点で上記バッファメモリ14から読み出さ
れて圧縮/伸長部12に供給される。
The data reproducing operation will be briefly described. The data recorded on the magnetic tape 1 is read from the reproducing head 19.
A and 19B read out as an RF reproduction signal, and this RF reproduction signal is supplied to the reproduction RF processing unit 16 via the rotary transformer 17. This RF processing unit for reproduction 1
In 6, the supplied RF reproduction signal is subjected to processing such as reproduction equalization, reproduction clock generation, binarization, decoding (for example, Viterbi decoding). The data read in this way is supplied to the IF / ECC controller 13, where it is temporarily stored in the buffer memory 14 and subjected to error correction processing and the like. The data subjected to the error correction processing and the like by the IF / ECC controller 13 is read from the buffer memory 14 at a predetermined time and supplied to the compression / decompression unit 12.

【0027】圧縮/伸長部12では、図示しないシステ
ムコントローラによる判断に基づいて、当該記録時に圧
縮/伸長部12により圧縮が施されたデータであれば伸
長処理を行い、非圧縮データであればデータ伸長処理を
行わずにデータをそのまま出力する。
The compression / decompression unit 12 performs decompression processing if the data has been compressed by the compression / decompression unit 12 at the time of the recording, and decompresses the data if it is uncompressed data, based on the judgment by the system controller (not shown). Outputs the data as it is without performing decompression processing.

【0028】圧縮/伸長部12の出力データはSCSI
インターフェイス11を介して再生データとしてホスト
コンピュータ20に出力される。
The output data of the compression / expansion unit 12 is SCSI
The data is output to the host computer 20 as reproduction data via the interface 11.

【0029】ここで、このテープストリーマドライブ1
0における圧縮/伸長部12は、その機能的な構成を図
2に示してあるように、スライド辞書部121、ベース
ポインタ部122、インターバル算出部123及びガン
マ符号化部124により構成され、図3のフローチャー
トに示す手順に従って圧縮処理を行い、また、図4のフ
ローチャートに示す手順に従って伸長処理を行う。
Here, the tape streamer drive 1
As shown in FIG. 2, the compression / decompression unit 12 at 0 includes a slide dictionary unit 121, a base pointer unit 122, an interval calculation unit 123, and a gamma encoding unit 124. The compression process is performed according to the procedure shown in the flowchart of FIG. 4, and the decompression process is performed according to the procedure shown in the flowchart of FIG.

【0030】すなわち、この圧縮/伸長部12による圧
縮処理では、図3のフローチャートに示すように、圧縮
処理を開始すると、先ず、ステップS1において0埋め
によりスライド辞書を初期化するとともにライトポイン
タ、ベースポインタ及びランレングスを0にする。
That is, in the compression processing by the compression / decompression unit 12, as shown in the flowchart of FIG. 3, when the compression processing is started, first, in step S1, the slide dictionary is initialized by padding with zeros, and the write pointer and the base are initialized. Set the pointer and run length to 0.

【0031】次のステップS2では1文字入力し、ステ
ップS3において「前の文字」+「現在の文字」につい
て辞書検索を行い、次のステップS4で一致するか否か
を判定する。
In the next step S2, one character is input. In step S3, a dictionary search is performed for "the previous character" + "the current character", and in the next step S4, it is determined whether or not they match.

【0032】このステップS4の判定結果がYESすな
わち「前の文字」+「現在の文字」がスライド辞書上の
文字列と一致する場合には、ステップS7に移ってイン
ターバル=マッチアドレス−ベースポインタによりイン
ターバルを算出する。
If the decision result in the step S4 is YES, that is, if "the previous character" + "the current character" coincides with the character string on the slide dictionary, the process shifts to a step S7, where interval = match address-base pointer. Calculate the interval.

【0033】また、上記ステップS4の判定結果がNO
すなわち「前の文字」+「現在の文字」がスライド辞書
上の文字列と一致しない場合には、ステップS5に移っ
て「現在の文字」について辞書検索を行い、次のステッ
プS6で一致するか否かを判定する。
If the result of the determination in step S4 is NO
That is, if "previous character" + "current character" does not match the character string on the slide dictionary, the process proceeds to step S5, where a dictionary search is performed for "current character", and whether or not it matches in the next step S6. Determine whether or not.

【0034】そして、このステップS6の判定結果がY
ESすなわち「現在の文字」がスライド辞書上の文字列
と一致する場合には、ステップS7に移ってインターバ
ル=マッチアドレス−ベースポインタによりインターバ
ルを算出する。
The result of the determination in step S6 is Y
If the ES, that is, the "current character" matches the character string on the slide dictionary, the process proceeds to step S7, and the interval is calculated by the interval = match address-base pointer.

【0035】次のステップS8では、ステップS7で算
出したインターバルが1であるか否かを判定する。
In the next step S8, it is determined whether or not the interval calculated in step S7 is one.

【0036】このステップS8の判定結果がYESすな
わちインターバルが1である場合には、ステップS9に
移ってランレングス=ランレングス+1すなわちランレ
ングスをインクリメントして、ステップS12に移って
ベースカウンタ=マッチアドレスすなわちベースポイン
タをマッチアドレスの位置に移動してから、ステップS
16に移る。
If the decision result in the step S8 is YES, that is, if the interval is 1, the process proceeds to a step S9, where the run length = run length + 1, that is, the run length is incremented, and the process proceeds to a step S12, where the base counter = match address That is, after moving the base pointer to the position of the match address,
Move to 16.

【0037】また、上記ステップS6の判定結果がNO
すなわちインターバルが1でない場合には、ステップS
10に移ってフラッシュ動作を行い、次のステップS1
1でインターバルを次の表1にしたがって符号化して出
力し、さらにステップS12でベースカウンタ=マッチ
アドレスすなわちベースポインタをマッチアドレスの位
置に移動してから、ステップS16に移る。
If the result of the determination in step S6 is NO
That is, if the interval is not 1, step S
Then, the process proceeds to step S1 where the flash operation is performed.
At step 1, the interval is coded according to the following Table 1, and is output. Further, at step S12, the base counter = match address, that is, the base pointer is moved to the position of the match address, and then the process proceeds to step S16.

【0038】[0038]

【表1】 [Table 1]

【0039】また、上記ステップS8の判定結果がNO
すなわち「現在の文字」がスライド辞書上の文字列と一
致しない場合には、ステップS13に移ってフラッシュ
動作を行い、次のステップS14で「1」+「現在の文
字」を出力し、さらにステップS15でベースポインタ
=ベースポインタ+1すなわちベースポインタをインク
リメントしてから、ステップS16に移る。
The result of the determination in step S8 is NO.
That is, if the "current character" does not match the character string on the slide dictionary, the process proceeds to step S13 to perform a flash operation, and in the next step S14, "1" + "current character" is output. In S15, the base pointer = base pointer + 1, that is, the base pointer is incremented, and then the process proceeds to step S16.

【0040】ステップS16では、前の文字=文字すな
わち「前の文字」を更新するとともに、ライトポインタ
の示すアドレスに「現在の文字」を文字を書き込む。さ
らに、ライトポインタ=ライトポインタ+1すなわちラ
イトポインタをインクリメントする。
In step S16, the previous character = character, that is, the "previous character" is updated, and the character "current character" is written at the address indicated by the write pointer. Further, the write pointer = write pointer + 1, that is, the write pointer is incremented.

【0041】次のステップS17では、圧縮処理を継続
するか否かを判定する。このステップS17の判定結果
がYESすなわち圧縮処理を継続する場合には、上記ス
テップS2に戻り、ステップS2〜ステップS17の処
理を繰り返し行う。そして、このステップS17の判定
結果がNOすなわち圧縮処理を終了する場合には、次の
ステップS18に移ってフラッシュ動作を行ってから、
圧縮処理を終了する。
In the next step S17, it is determined whether or not to continue the compression processing. If the decision result in the step S17 is YES, that is, if the compression process is continued, the process returns to the step S2, and the processes in the steps S2 to S17 are repeated. When the result of the determination in step S17 is NO, that is, when the compression process is completed, the process proceeds to the next step S18, where the flash operation is performed.
The compression processing ends.

【0042】ここで、ステップS10,S13,S18
におけるフラッシュ動作では、ランレングスが1以上で
あればランレングスを表1にしたがって符号化して出力
し、ランレングスを「0」にする。
Here, steps S10, S13, S18
If the run length is 1 or more, the run length is encoded according to Table 1 and output, and the run length is set to "0".

【0043】また、この圧縮/伸長部12による伸長処
理では、図4のフローチャートに示すように、伸長処理
を開始すると、先ず、ステップS21において0埋めに
よりスライド辞書を初期化するとともにライトポイン
タ、ベースポインタ及びランレングスを0にして、次の
ステップS22で圧縮データを入力する。
In the decompression processing by the compression / decompression unit 12, as shown in the flowchart of FIG. 4, when the decompression processing is started, first, in step S21, the slide dictionary is initialized by padding with zeros, and the write pointer and the base are initialized. The pointer and the run length are set to 0, and compressed data is input in the next step S22.

【0044】次のステップS23では、入力された圧縮
データについてMSBが1であるか否かを判定する。
In the next step S23, it is determined whether or not the MSB of the input compressed data is 1.

【0045】このステップS23の判定結果がYESす
なわち入力した圧縮データのMSBが1である場合に
は、ステップS24において次の8ビットを文字として
出力し、ステップS25でベースポインタ=ベースポイ
ンタ+1すなわちベースポインタをインクリメントして
から、ステップS30に移る。
If the decision result in the step S23 is YES, that is, if the MSB of the input compressed data is 1, the next 8 bits are outputted as a character in a step S24, and in a step S25, the base pointer = the base pointer + 1, that is, the base After incrementing the pointer, the process moves to step S30.

【0046】また、上記ステップS23の判定結果がN
Oすなわち入力した圧縮データのMSBが1でない場合
には、ステップS26に移って表1にしたがってデコー
ドして、デコードした結果について次のステップS27
においてインターバルであるか否かを判定する。
The result of the determination in step S23 is N
If O, that is, if the MSB of the input compressed data is not 1, the process proceeds to step S26, where decoding is performed in accordance with Table 1, and the result of the decoding is determined in step S27.
It is determined whether or not it is an interval.

【0047】このステップS27の判定結果がYESす
なわちデコードした結果がインターバルである場合に
は、次のステップS28においてベースポインタ+イン
ターバルの文字を出力し、ステップS29でベースポイ
ンタ=ベースポインタ+1すなわちベースポインタをイ
ンクリメントしてから、ステップS30に移る。このス
テップS30では、ライトポインタの示すアドレスに文
字を書き込む。さらに、ライトポインタ=ライトポイン
タ+1すなわちライトポインタをインクリメントして、
ステップS35に移る。
If the decision result in the step S27 is YES, that is, if the decoded result is the interval, the character of the base pointer + interval is outputted in the next step S28, and in the step S29, the base pointer = the base pointer + 1, that is, the base pointer Then, the process proceeds to step S30. In this step S30, characters are written to the address indicated by the write pointer. Further, the write pointer = write pointer + 1, that is, the write pointer is incremented,
Move to step S35.

【0048】また、上記ステップS27の判定結果がN
Oすなわちデコードした結果がインターバルでない場合
には、次のステップS31に移ってベースポインタ+1
の文字を出力し、ステップS32でベースポインタ=ベ
ースポインタ+1すなわちベースポインタをインクリメ
ントして、ランレングス=ランレングス−1すなわちラ
ンレングスをデクリメントする。次のステップS33で
は、ライトポインタの示すアドレスに文字を書き込み、
さらに、ライトポインタ=ライトポインタ+1すなわち
ライトポインタをインクリメントする。
The result of step S27 is N
If O, that is, if the decoded result is not an interval, the process proceeds to the next step S31, where the base pointer +1
Is output, and in step S32, the base pointer = base pointer + 1, ie, the base pointer is incremented, and the run length = run length−1, ie, the run length is decremented. In the next step S33, characters are written to the address indicated by the write pointer,
Further, the write pointer = write pointer + 1, that is, the write pointer is incremented.

【0049】次のステップS34では、ランレングスが
0であるか否かを判定する。
In the next step S34, it is determined whether or not the run length is 0.

【0050】このステップS34の判定結果がYESす
なわちランレングスが0である場合には、次のステップ
S35に進む。
If the decision result in the step S34 is YES, that is, if the run length is 0, the flow advances to the next step S35.

【0051】また、このステップS34の判定結果がY
ESすなわちランレングスが0でない場合には、上記ス
テップS31に戻って、ステップS31〜S34の処理
をランレングスが0になるまで繰り返し行う。
The result of the determination in step S34 is Y
If the ES, that is, the run length is not 0, the process returns to step S31, and the processing of steps S31 to S34 is repeated until the run length becomes 0.

【0052】ステップS35では、伸長処理を継続する
か否かを判定する。このステップS35の判定結果がY
ESすなわち伸長処理を継続する場合には、上記ステッ
プS22に戻り、ステップS2〜ステップS35の処理
を繰り返し、次の圧縮データについて伸長処理を順次行
う。そして、このステップS35の判定結果がNOの場
合には、伸長処理を終了する。
In step S35, it is determined whether or not to continue the decompression processing. If the determination result of step S35 is Y
If the ES, that is, the decompression process is continued, the process returns to step S22, and the processes of steps S2 to S35 are repeated, and the decompression process is sequentially performed on the next compressed data. Then, if the decision result in the step S35 is NO, the decompression process ends.

【0053】ここで、このテープストリーマドライブ1
0における圧縮/伸長部12による圧縮処理の具体例に
ついて説明する。この具体例の説明では、スライド辞書
とポインタは、図5の(A)に示す状態になっているも
のと仮定する。すなわち、スライド辞書には、文字列
「ABCDEFGHIJ」が書き込まれており、ベース
ポインタはスライド辞書のアドレス0を示しているもの
とする。そして、文字列「CDEJ」を符号化するもの
とする。
Here, the tape streamer drive 1
A specific example of the compression processing by the compression / decompression unit 12 at 0 will be described. In the description of this specific example, it is assumed that the slide dictionary and the pointer are in the state shown in FIG. That is, the character string “ABCDEFGHIJ” is written in the slide dictionary, and the base pointer indicates the address 0 of the slide dictionary. Then, the character string “CDEJ” is encoded.

【0054】最初にインターバルを使った符号化につい
て説明する。
First, encoding using intervals will be described.

【0055】先ず、文字列「CDEJ」の最初の文字
「C」をステップS2で入力して、上記ステップS3〜
ステップS6によりスライド辞書で文字「C」を検索す
る。スライド辞書による検索は、スライド辞書の全アド
レスについて、ベースポインタで示されるアドレスの右
隣から1巡するように行う。文字「C」は、スライド辞
書のアドレス2で見つかる。ベースポインタはアドレス
0にあるので、ステップS7では2−0=2によりイン
ターバル2が算出される。インターバル2はステップS
10,S11で表1にしたがって「0010」に符号化
される。そして、図5の(B)に示すように、ステップ
S12でベースポインタをアドレス2に移動する。
First, the first character "C" of the character string "CDEJ" is input in step S2, and the above steps S3 to S3 are performed.
In step S6, the character "C" is searched in the slide dictionary. The search using the slide dictionary is performed for all addresses of the slide dictionary so as to make one round from the right side of the address indicated by the base pointer. The letter "C" is found at address 2 of the slide dictionary. Since the base pointer is at the address 0, the interval 2 is calculated in step S7 by 2-0 = 2. Interval 2 is step S
In step S11, the data is encoded into "0010" according to Table 1. Then, as shown in FIG. 5B, the base pointer is moved to address 2 in step S12.

【0056】次に、文字列「CDEJ」の2番目の文字
「D」をステップS2で入力して、上記ステップS3〜
ステップS6によりスライド辞書で文字「D」を検索す
る。文字「D」は、スライド辞書のアドレス3で見つか
る。ベースポインタはアドレス2にあるので、ステップ
S7では3−2=1によりインターバル1が算出され
る。インターバル1はステップS10,S11で表1に
したがって「01」に符号化される。そして、図5の
(C)に示すように、ステップS12でベースポインタ
をアドレス3に移動する。
Next, the second character "D" of the character string "CDEJ" is input in step S2,
In step S6, the character "D" is searched in the slide dictionary. The letter "D" is found at address 3 in the slide dictionary. Since the base pointer is at address 2, in step S7, interval 1 is calculated by 3-2 = 1. Interval 1 is encoded to “01” in accordance with Table 1 in steps S10 and S11. Then, as shown in FIG. 5C, the base pointer is moved to address 3 in step S12.

【0057】次に、文字列「CDEJ」の3番目の文字
「E」をステップS2で入力して、上記ステップS3〜
ステップS6によりスライド辞書で文字「E」を検索す
る。文字「E」は、スライド辞書のアドレス4で見つか
る。ベースポインタはアドレス3にあるので、ステップ
S7では4−3=1によりインターバル1が算出され
る。インターバル1はステップS10,S11で表1に
したがって「01」に符号化される。そして、図5の
(D)に示すように、ステップS12でベースポインタ
をアドレス4に移動する。
Next, the third character "E" of the character string "CDEJ" is input in step S2,
In step S6, the character "E" is searched in the slide dictionary. The letter "E" is found at address 4 in the slide dictionary. Since the base pointer is at address 3, in step S7, interval 1 is calculated by 4-3 = 1. Interval 1 is encoded to “01” in accordance with Table 1 in steps S10 and S11. Then, as shown in FIG. 5D, the base pointer is moved to address 4 in step S12.

【0058】さらに、文字列「CDEJ」の4番目の文
字「J」をステップS2で入力して、上記ステップS3
〜ステップS6によりスライド辞書で文字「J」を検索
する。文字「J」は、スライド辞書のアドレス9で見つ
かる。ベースポインタはアドレス4にあるので、ステッ
プS7では9−4=5によりインターバル5が算出され
る。インターバル5はステップS10,S11で表1に
したがって「000101」に符号化される。そして、
図5の(E)に示すように、ステップS12でベースポ
インタをアドレス9に移動する。
Further, the fourth character "J" of the character string "CDEJ" is inputted in step S2, and the above-mentioned step S3
Step S6 searches the slide dictionary for the character "J". The letter "J" is found at address 9 in the slide dictionary. Since the base pointer is at address 4, in step S7, interval 5 is calculated from 9-4 = 5. Interval 5 is encoded into “000101” in accordance with Table 1 in steps S10 and S11. And
As shown in FIG. 5E, the base pointer is moved to address 9 in step S12.

【0059】このように文字列「CDEJ」は、インタ
ーバルを使って「2,1,1,5」で表され、表1にし
たがって「0010,01,01,000101」に符
号化される。
As described above, the character string “CDEJ” is represented by “2, 1, 1, 5” using intervals, and is encoded into “0010, 01, 01, 00001” according to Table 1.

【0060】そして、インターバルを使った符号化では
インターバル1が連続することがあるので、これをラン
レングスに置き換えてから、ステップS10,S11で
表1にしたがって符号化する。
In the encoding using the interval, since the interval 1 may be continuous, it is replaced with a run length, and then the encoding is performed according to Table 1 in steps S10 and S11.

【0061】すなわち、上記文字列「CDEJ」の場
合、インターバルを使って「2,1,1,5」で表され
るので、これを「2,ランレングス2,5」として、表
1にしたがって「0010,0101,000101」
に符号化する。表1に示すように、ランレングス2−5
は、インターバル1を使って表す。
That is, since the character string "CDEJ" is represented by "2, 1, 1, 5" using intervals, it is defined as "2, run length 2, 5" and according to Table 1. "0010,0101,000101"
To be encoded. As shown in Table 1, run length 2-5
Is represented using interval 1.

【0062】このようにして圧縮した符号「0010,
0101,000101」は14ビットであり、文字の
符号長を8ビットとすると、14ビット/(8ビット×
4)=31.25%に圧縮されたことになる。
The code “0010,
“0101,000101” is 14 bits, and if the code length of the character is 8 bits, 14 bits / (8 bits ×
4) It means that it has been compressed to 31.25%.

【0063】ここで、表1に示すようにインターバルは
15までしか定義していない。インターバルが16以上
になる場合にはインターバルを符号化する代わりに、文
字を符号語として出力する。インターバルと、ランレン
グスを区別するために1を付加する。例えば文字「Z」
ならZのASCIIコードは0x5A(0101101
0)なので、「101011010」を符号語とする。
Here, as shown in Table 1, only up to 15 intervals are defined. If the interval is 16 or more, a character is output as a code word instead of encoding the interval. One is added to distinguish the interval from the run length. For example, the letter "Z"
Then, the ASCII code of Z is 0x5A (01010110)
0), "1010111010" is used as a codeword.

【0064】また、辞書にない文字を符号語として出力
する場合には、BSTW符号やハフマン符号に変換する
ことによって、全体の圧縮率を高めることができた。
When a character not in the dictionary is output as a code word, the overall compression ratio can be increased by converting the code word into a BSTW code or a Huffman code.

【0065】このテープストリーマドライブ10では、
データの圧縮処理及び伸長処理をそれぞれ1パスの処理
で行うことができ、しかも、512バイト程度の小さな
容量のスライド辞書で、十分な圧縮率を得ることができ
た。テキストファイルで56%、プログラムの実行ファ
イルで46%程度の圧縮率であった。したがって、テー
プ1巻き当たりの容量を見かけ上大きくすることができ
る。また、1パスで処理できるので、ソフトウエア化が
可能であり、ハードウエアにより容易に実現することが
できる。
In this tape streamer drive 10,
Data compression processing and decompression processing can be performed by one-pass processing, respectively, and a sufficient compression rate could be obtained with a slide dictionary having a small capacity of about 512 bytes. The compression ratio was about 56% for text files and about 46% for program execution files. Therefore, the capacity per tape winding can be increased in appearance. In addition, since processing can be performed in one pass, software can be used and can be easily realized by hardware.

【0066】[0066]

【発明の効果】以上のように、本発明によれば、1パス
で処理が可能でしかも小さな辞書で十分な圧縮率を得る
ことができ、ハードウエア化が容易なデータ圧縮方法、
データ圧縮・伸長方法、データ圧縮装置及びデータ圧縮
・伸長装置を提供することができる。
As described above, according to the present invention, a data compression method which can be processed in one pass, can obtain a sufficient compression ratio with a small dictionary, and can be easily implemented in hardware,
A data compression / expansion method, a data compression device, and a data compression / expansion device can be provided.

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

【図1】本発明を適用したテープストリーマドライブの
構成を示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a tape streamer drive to which the present invention has been applied.

【図2】上記テープストリーマドライブにおける圧縮/
伸長部の機能的な構成を示すブロック図である。
FIG. 2 shows compression / compression in the tape streamer drive.
FIG. 3 is a block diagram illustrating a functional configuration of an extension unit.

【図3】上記圧縮/伸長部により実行される圧縮処理の
手順を示すフローチャートである。
FIG. 3 is a flowchart illustrating a procedure of a compression process performed by the compression / decompression unit.

【図4】上記圧縮/伸長部により実行される伸長処理の
手順を示すフローチャートである。
FIG. 4 is a flowchart showing a procedure of a decompression process executed by the compression / decompression unit.

【図5】上記圧縮/伸長部による圧縮処理の具体例の説
明に供する図である。
FIG. 5 is a diagram provided for describing a specific example of a compression process performed by the compression / decompression unit.

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

10 テープストリーマドライブ、11 SCSIイン
ターフェイス、12圧縮/伸長処理部、13 IF/E
CCコントローラ、14 バッファメモリ、15 記録
用RF処理部、16 再生用RF処理部、17 ロータ
リートランス、18A,18B 記録ヘッド、19A,
19B 再生ヘッド、20 ホストコンピュータ、12
1 スライド辞書部、122 ベースポインタ部、12
3 インターバル算出部、124 ガンマ符号化部
10 tape streamer drive, 11 SCSI interface, 12 compression / decompression processing unit, 13 IF / E
CC controller, 14 buffer memory, 15 RF processing unit for recording, 16 RF processing unit for reproduction, 17 rotary transformer, 18A, 18B recording head, 19A,
19B playback head, 20 host computer, 12
1 slide dictionary unit, 122 base pointer unit, 12
3 Interval calculator, 124 gamma encoder

Claims (13)

【特許請求の範囲】[Claims] 【請求項1】 読み込まれたデータを辞書として登録
し、その中から最も長い一致文字列を探し出して、一致
した位置と一致した長さで元の符号を置き換えて出力す
るスライド辞書法によるデータ圧縮方法であって、 符号化における辞書の参照をベースポインタの位置から
行い、 上記ベースポインタから最初に一致した文字までのイン
ターバルを符号化し、 次の文字を符号化する前に、ベースポインタを文字が一
致した位置に移動することを特徴とするデータ圧縮方
法。
1. Data compression by a slide dictionary method in which read data is registered as a dictionary, a longest matching character string is searched from the dictionary, and an original code is replaced by a length matching a matching position and output. A dictionary lookup in the encoding from the position of the base pointer, encoding the interval from the base pointer to the first matched character, and setting the base pointer to the character before encoding the next character. A data compression method characterized by moving to a coincident position.
【請求項2】 上記インターバルを符号化する際に、小
さいインターバルを短い符号語に符号化することを特徴
とする請求項1記載のデータ圧縮方法。
2. The data compression method according to claim 1, wherein when encoding said interval, a small interval is encoded into a short code word.
【請求項3】 上記インターバルを符号化する際の語長
と文字の語長を比較して短い符号を出力することを特徴
とする請求項1記載のデータ圧縮方法。
3. The data compression method according to claim 1, wherein a short code is output by comparing a word length when encoding the interval with a word length of a character.
【請求項4】 文字の符号化して出力する場合に、上記
ベースポインタから最初に一致した文字までのインター
バルを符号化して圧縮する方法と、他の圧縮方法を選択
的に切り換えることを特徴とする請求項3記載のデータ
圧縮方法。
4. When encoding and outputting a character, selectively switching between a method of encoding and compressing an interval from the base pointer to the first matching character and another compression method. The data compression method according to claim 3.
【請求項5】 インターバル1が連続した場合に、これ
をランレングスとして符号化することを特徴とする請求
項1記載のデータ圧縮方法。
5. The data compression method according to claim 1, wherein when interval 1 is continuous, the interval 1 is encoded as run length.
【請求項6】 ベースポインタを移動する際に、直前に
入力された文字と、符号化する文字の2文字が一致した
位置に移動することを特徴とする請求項1記載のデータ
圧縮方法。
6. The data compression method according to claim 1, wherein when the base pointer is moved, the character entered immediately before and the character to be encoded are moved to a position where the two characters match.
【請求項7】 読み込まれたデータを辞書として登録
し、その中から最も長い一致文字列を探し出して、一致
した位置と一致した長さで元の符号を置き換えて出力す
るスライド辞書法によるデータ圧縮・伸長方法であっ
て、 圧縮時には、符号化における辞書の参照をベースポイン
タの位置から行い、上記ベースポインタから最初に一致
した文字までのインターバルを符号化し、次の文字を符
号化する前に、ベースポインタを文字が一致した位置に
移動する処理を繰り返すことにより符号化を行い、 伸長時には、符号化した文字について、復号における辞
書の参照をベースポインタの位置から行い、上記ベース
ポインタから最初に一致した文字までのインターバルを
復号し、次の文字を復号する前に、ベースポインタを文
字が一致した位置に移動する処理を繰り返すことにより
復号することを特徴とするデータ圧縮・伸長方法。
7. A data compression by a slide dictionary method in which read data is registered as a dictionary, a longest matching character string is searched from the dictionary, and an original code is replaced by a length matching a matching position and output. In a decompression method, at the time of compression, dictionary reference in encoding is performed from the position of the base pointer, the interval from the base pointer to the first matching character is encoded, and before encoding the next character, Encoding is performed by repeating the process of moving the base pointer to the position where the character matches, and at the time of decompression, for the encoded character, reference is made to the dictionary in decoding from the position of the base pointer for decoding, and matching is performed first from the base pointer. The base pointer to the position where the character matched before decoding the next character. Data compression and decompression method characterized by decoding by repeating the process of.
【請求項8】 読み込まれたデータを辞書として登録
し、その中から最も長い一致文字列を探し出して、一致
した位置と一致した長さで元の符号を置き換えて出力す
るスライド辞書法によりデータ圧縮処理を行うデータ圧
縮装置であって、 読み込まれたデータが辞書として登録されるスライド辞
書部と、 符号化における上記スライド辞書部の参照位置として前
回文字が一致した位置を指定するベースポインタと、 上記ベースポインタから最初に一致した文字までのイン
ターバルを算出するインターバル算出部と、 上記インターバル算出部により算出されたインターバル
を符号化する符号化部とを備えることを特徴とするデー
タ圧縮装置。
8. A data compression method using a slide dictionary method in which the read data is registered as a dictionary, the longest matching character string is searched from the dictionary, and the original code is replaced with a length matching the matching position and output. A data compression device for performing processing, a slide dictionary unit in which read data is registered as a dictionary; a base pointer for designating a position where a previous character matched as a reference position of the slide dictionary unit in encoding; A data compression device comprising: an interval calculation unit that calculates an interval from a base pointer to a first matching character; and an encoding unit that encodes the interval calculated by the interval calculation unit.
【請求項9】 上記符号化部では、上記インターバルを
符号化する際に、小さいインターバルを短い符号語に符
号化することを特徴とする請求項8記載のデータ圧縮装
置。
9. The data compression apparatus according to claim 8, wherein said encoding section encodes a small interval into a short codeword when encoding said interval.
【請求項10】 上記符号化部では、上記インターバル
を符号化する際の語長と文字の語長を比較して短い符号
を出力することを特徴とする請求項8記載のデータ圧縮
装置。
10. The data compression apparatus according to claim 8, wherein the encoding unit compares a word length when encoding the interval with a word length of a character and outputs a short code.
【請求項11】 上記符号化部では、インターバル1が
連続した場合に、これをランレングスとして符号化する
ことを特徴とする請求項8記載のデータ圧縮装置。
11. The data compression apparatus according to claim 8, wherein, when the interval 1 is continuous, the encoding unit encodes the interval 1 as a run length.
【請求項12】 上記ベースポインタを移動する際に、
直前に入力された文字と、符号化する文字の2文字が一
致した位置に移動することを特徴とする請求項8記載の
データ圧縮装置。
12. When moving the base pointer,
9. The data compression apparatus according to claim 8, wherein the character compression unit moves to a position where the immediately preceding character and the character to be encoded match.
【請求項13】 読み込まれたデータを辞書として登録
し、その中から最も長い一致文字列を探し出して、一致
した位置と一致した長さで元の符号を置き換えて出力す
るスライド辞書法によるデータ圧縮・伸長装置であっ
て、 符号化における辞書の参照をベースポインタの位置から
行い、上記ベースポインタから最初に一致した文字まで
のインターバルを符号化し、次の文字を符号化する前
に、ベースポインタを文字が一致した位置に移動する処
理を繰り返すことにより符号化を行う圧縮処理手段と、 符号化した文字について、復号における辞書の参照をベ
ースポインタの位置から行い、上記ベースポインタから
最初に一致した文字までのインターバルを復号し、次の
文字を復号する前に、ベースポインタを文字が一致した
位置に移動する処理を繰り返すことにより復号する伸長
処理手段とを備えることを特徴とするデータ圧縮・伸長
装置。
13. Data compression by a slide dictionary method in which read data is registered as a dictionary, a longest matching character string is searched from the dictionary, and an original code is replaced with a length matching a matching position and output. A decompression device, which references a dictionary in encoding from the position of a base pointer, encodes an interval from the base pointer to the first matching character, and encodes the base pointer before encoding the next character. Compression processing means for performing encoding by repeating a process of moving to a position where a character is matched; and referring to a dictionary for decoding of the encoded character from the position of the base pointer, and the first matched character from the base pointer. Before decoding the next character, and moving the base pointer to the position where the character matched before decoding the next character. Data compression and decompression device, characterized in that it comprises a decompression processing means for decoding by repeating.
JP2000326119A 2000-10-25 2000-10-25 Data-compression method, data compression/expansion method, data-compression device, and data compression/ expansion device Pending JP2002135128A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000326119A JP2002135128A (en) 2000-10-25 2000-10-25 Data-compression method, data compression/expansion method, data-compression device, and data compression/ expansion device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000326119A JP2002135128A (en) 2000-10-25 2000-10-25 Data-compression method, data compression/expansion method, data-compression device, and data compression/ expansion device

Publications (1)

Publication Number Publication Date
JP2002135128A true JP2002135128A (en) 2002-05-10

Family

ID=18803366

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000326119A Pending JP2002135128A (en) 2000-10-25 2000-10-25 Data-compression method, data compression/expansion method, data-compression device, and data compression/ expansion device

Country Status (1)

Country Link
JP (1) JP2002135128A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008090686A (en) * 2006-10-03 2008-04-17 Canon Inc Image processor, and image forming device provided therewith
JP2013150041A (en) * 2012-01-17 2013-08-01 Fujitsu Ltd Program, compressed file generation method, compression code expansion method, information processing apparatus and recording medium
JPWO2014097353A1 (en) * 2012-12-19 2017-01-12 富士通株式会社 Compression device, compression method, compression program, decompression device, decompression method, decompression program, and compression / decompression system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008090686A (en) * 2006-10-03 2008-04-17 Canon Inc Image processor, and image forming device provided therewith
US8391620B2 (en) 2006-10-03 2013-03-05 Canon Kabushiki Kaisha Image processing apparatus, image forming apparatus and image processing method
JP2013150041A (en) * 2012-01-17 2013-08-01 Fujitsu Ltd Program, compressed file generation method, compression code expansion method, information processing apparatus and recording medium
JPWO2014097353A1 (en) * 2012-12-19 2017-01-12 富士通株式会社 Compression device, compression method, compression program, decompression device, decompression method, decompression program, and compression / decompression system

Similar Documents

Publication Publication Date Title
US10033405B2 (en) Data compression systems and method
US8643515B2 (en) Compressing data using an encoding table
KR100894002B1 (en) Device and data method for selective compression and decompression and data format for compressed data
US7358874B2 (en) Data compression using a stream selector with edit-in-place capability for compressed data
US5874908A (en) Method and apparatus for encoding Lempel-Ziv 1 variants
CA2299902C (en) Method and apparatus for data compression using fingerprinting
US10224959B2 (en) Techniques for data compression verification
US7924178B2 (en) System and method for lossless data compression
JPH07283739A (en) Method and device to compress and extend data of short block
KR20030022896A (en) Dual mode data compression for operating code
US20090015444A1 (en) Data compression for communication between two or more components in a system
JPH0888568A (en) Reversible code encoding method for data
JPH04359315A (en) Data compression controller and data restoration controller
JP2536422B2 (en) Data compression device and data decompression device
JP2002135128A (en) Data-compression method, data compression/expansion method, data-compression device, and data compression/ expansion device
US9998142B1 (en) Techniques for invariant-reference compression
KR100359118B1 (en) Lossless data compression method for uniform entropy data
JP3242795B2 (en) Data processing device and data processing method
JP3241787B2 (en) Data compression method
US11967975B1 (en) Method and apparatus for recursive data compression using seed bits
GB2360915A (en) Run length compression encoding of selected bits of data words
JP3442105B2 (en) Data compression and decompression methods
JP2614318B2 (en) Halftone image data compression method
CN114637459A (en) Device for processing received data
JP2999587B2 (en) Data compression and decompression method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070202

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090612

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090623

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20091020