JP3051501B2 - Data compression method - Google Patents

Data compression method

Info

Publication number
JP3051501B2
JP3051501B2 JP16554391A JP16554391A JP3051501B2 JP 3051501 B2 JP3051501 B2 JP 3051501B2 JP 16554391 A JP16554391 A JP 16554391A JP 16554391 A JP16554391 A JP 16554391A JP 3051501 B2 JP3051501 B2 JP 3051501B2
Authority
JP
Japan
Prior art keywords
length
variable
character
data compression
represented
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
JP16554391A
Other languages
Japanese (ja)
Other versions
JPH0514206A (en
Inventor
茂 吉田
佳之 岡田
泰彦 中野
広隆 千葉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP16554391A priority Critical patent/JP3051501B2/en
Publication of JPH0514206A publication Critical patent/JPH0514206A/en
Application granted granted Critical
Publication of JP3051501B2 publication Critical patent/JP3051501B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ユニバーサル型アルゴ
リズムを用いて文字情報等の入力文字列を圧縮符号化す
るデータ圧縮方法に関する。近年、文字コード、ベクト
ル情報、画像など様々な種類のデータがコンピュータで
扱われるようになっており、扱われるデータ量も急速に
増加してきている。大量のデータを扱うときは、データ
の中の冗長な部分を省いてデータ量を圧縮することで、
記憶容量を減らしたり、速く伝送したりできるようにな
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention compresses and encodes an input character string such as character information using a universal algorithm.
Lud on over data compression method. In recent years, various types of data such as character codes, vector information, and images have been handled by computers, and the amount of data handled has rapidly increased. When dealing with large amounts of data, compressing the amount of data by eliminating redundant parts in the data,
It will be possible to reduce storage capacity and transmit faster.

【0002】このような様々なデータを1つの方式でデ
ータ圧縮できる方法としてユニバーサル符号化が提案さ
れている。ここで、本発明の分野は、文字コードの圧縮
に限らず、様々なデータに適用できるが、以下では、情
報理論で用いられている呼称を踏襲し、データの1ワー
ド単位を文字と呼び、データが任意ワードつながったも
のを文字列と呼ぶことにする。
[0002] Universal encoding has been proposed as a method capable of compressing such various data by one method. Here, the field of the present invention is not limited to character code compression, and can be applied to various types of data. In the following, one word unit of data is called a character, following the name used in information theory, Data in which arbitrary words are connected is called a character string.

【0003】ユニバーサル符号の代表的な方法として、
ジブ−レンペル(Ziv-Lempel)符号がある(詳しくは、
例えば、宗像『Ziv-Lempelのデータ圧縮法』、情報処
理、Vol.26,No.1,1985年を参照のこと)。ジブーレンペ
ル符号では(1)ユニバーサル型と、(2)増分分解型(Incr
emental parsing )の2つのアルゴリズムが提案されて
いる。
[0003] As a typical method of the universal code,
There is a Ziv-Lempel code (for details,
For example, see Munakata "Ziv-Lempel Data Compression Method", Information Processing, Vol. 26, No. 1, 1985). Jibulempel code has (1) universal type and (2) incremental decomposition type (Incr
two algorithms have been proposed.

【0004】更に、ユニバーサル型アルゴリズムの改良
として、LZSS符号(T.C. Bell,“Better OPM/L Tex
t Compression ”,IEEE Trans. on Commun., Vol.COM-3
4, No.12, Dec. 1986 参照)や、1/4インチ・カート
リッジ磁気テープの標準圧縮方式であるQIC−122
符号がある。また、増分分解型アルゴリズムの改良とし
ては、LZW(Lempel-Ziv-Welch)符号がある(T.A. W
elch, “A Technique for High-Performance Data Comp
ression ”,Computer, June 1984参照)。
Further, as an improvement of the universal algorithm, LZSS codes (TC Bell, “Better OPM / L Tex
t Compression ”, IEEE Trans. on Commun., Vol.COM-3
4, No. 12, Dec. 1986), and QIC-122, a standard compression method for 1/4 inch cartridge magnetic tape.
There is a sign. As an improvement of the incremental decomposition type algorithm, there is a LZW (Lempel-Ziv-Welch) code (TA W
elch, “A Technique for High-Performance Data Comp
ression ", Computer, June 1984).

【0005】これらの改良符号は補助記憶装置のファイ
ル圧縮や、パソコン通信でのデータ伝送に利用されるよ
うになっている。
[0005] These improved codes are used for file compression of an auxiliary storage device and data transmission through personal computer communication.

【0006】[0006]

【従来の技術】まず従来のユニバーサル型アルゴリズム
とその改良の1つであるQIC−122符号について説
明する。 [ユニバーサル型アルゴリズム]ユニバーサル型アルゴ
リズムは、演算量は多いが、高圧縮率が得られるデータ
圧縮方式である。
2. Description of the Related Art First, a conventional universal algorithm and a QIC-122 code which is one of the improvements will be described. [Universal type algorithm] The universal type algorithm is a data compression method that requires a large amount of calculation but can obtain a high compression rate.

【0007】即ち、ユニバーサル型アルゴリズムにあっ
ては、符号化しようとする文字列をを、符号化済みの文
字列の任意の位置から最大長一致する系列、所謂部分列
に区切り、入力文字列を過去の最大長一致する部分列の
複製として符号化する。図9にユニバーサル型ジブーレ
ンペル符号の符号化方式を示す。図9において、辞書と
しての機能をもつPバッファ12には入力済みの文字列
が格納されており、文字入力部としてのQバッファ10
にはこれから符号化しようとする文字列が入力されてい
る。パターンマッチング部14はQバッファ10の文字
列をPバッファ12の系列と照合し、Pバッファ12の
中で一致する最大長の文字部分列を検索する。そして、
Pバッファ12中で検索した最大長一致する部分列を指
定するため図10の情報の組 Pバッファ中の最大長一致系列の開始位置(開始アドレ
ス) 一致長(レングス) として符号化する。なお、一致系列がなければ不一致の
シンボルと共に生データを出力する。
That is, in the universal type algorithm, a character string to be coded is divided into a sequence that matches the maximum length from an arbitrary position of the coded character string, that is, a so-called subsequence, and the input character string is divided. Encode as a copy of the past substring that matches the maximum length. FIG. 9 shows an encoding method of the universal type Jeho Lempel code. In FIG. 9, a P-buffer 12 having a function as a dictionary stores character strings that have already been input, and a Q-buffer 10 serving as a character input unit.
Is a character string to be encoded. The pattern matching unit 14 compares the character string in the Q buffer 10 with the series in the P buffer 12 and searches the P buffer 12 for a matching character substring of the maximum length. And
In order to specify the substring that matches the maximum length searched in the P buffer 12, the information is coded as the start position (start address) coincidence length (length) of the maximum length matching sequence in the P buffer in FIG. If there is no matching series, the raw data is output together with the unmatched symbols.

【0008】次にQバッファ10内の符号化した文字列
をPバッファ12に移して新たな符号化済み文字列を登
録する。以下、同様の操作を繰り返し、入力文字列を部
分列に分解して符号化する。このようにジブーレンペル
符号では現在の文字列を、符号化済みの過去の文字列か
らの複製として符号化するものである。ジブーレンペル
符号を用いた場合、文字コードの文書情報は1/2程度
に圧縮できる。
Next, the coded character string in the Q buffer 10 is transferred to the P buffer 12, and a new coded character string is registered. Hereinafter, the same operation is repeated to decompose the input character string into subsequences and encode them. As described above, in the Zibo Lempel code, a current character string is encoded as a copy from an encoded past character string. In the case of using the Zivurempel code, the character code document information can be compressed to about 1/2.

【0009】[QIC−122符号]3Mを中心とする
メーカの団体であるQIC(Quauter Inch Cartrrige S
tandard Inc.)が1/4インチ・カートリッジ磁気テー
プの標準圧縮方式として採用した符号である。QIC−
122符号のアルゴリズムでは、Pバッファとして20
48バイトの履歴をもち、Qバッファの符号化する文字
列をPバッファ中の文字列の複製として表すモードと、
生データを1バイトづつ符号化するモードの2つのモー
ドをもつ。そして、Pバッファ中の最大長一致文字列が
2文字以上の場合、複製モードで符号化し、それ以外の
ときは生データ・モードで符号化する。
[QIC-122 code] QIC (Quauter Inch Cartrrige S), a group of manufacturers centering on 3M
tandard Inc.) as a standard compression method for 1/4 inch cartridge magnetic tape. QIC-
In the algorithm of 122 codes, 20 buffers are used as the P buffer.
A mode having a 48-byte history and representing the character string to be encoded in the Q buffer as a copy of the character string in the P buffer;
It has two modes of encoding raw data one byte at a time. When the maximum length matching character string in the P buffer is two or more characters, the encoding is performed in the copy mode, and otherwise, the encoding is performed in the raw data mode.

【0010】図11はBNFメタ言語で表わされたQI
C−122符号の符号語フォーマットを示す。またBN
Fメタ言語に用いるメタ記号は図12に示す意味をも
つ。図11のQIC−122符号の符号語フォーマット
を詳細に説明すると次のようになる。 (1)圧縮系列(Compressed Stream )は、圧縮ストリ
ング(Compressed String)とエンドマーカで構成され
る。
FIG. 11 shows a QI expressed in the BNF meta language.
3 shows a codeword format of the C-122 code. Also BN
The meta symbols used in the F meta language have the meanings shown in FIG. The codeword format of the QIC-122 code of FIG. 11 will be described in detail as follows. (1) A compressed stream (Compressed Stream) is composed of a compressed string (Compressed String) and an end marker.

【0011】(2)圧縮ストリングは、生データについ
ては識別ビット0に続くASCII生バイトで表現さ
れ、また圧縮データについては識別ビット1に続いて圧
縮バイトで表現される。 (3)ASCII生バイトは、8ビットを1バイトして
表現される。 (4)圧縮バイトは、オフセット(開始位置)とレング
ス(一致長)の組でなる。
(2) The compressed string is represented by an ASCII raw byte following the identification bit 0 for raw data, and a compressed byte following the identification bit 1 for compressed data. (3) An ASCII raw byte is represented by one byte of 8 bits. (4) A compressed byte is a set of an offset (start position) and a length (match length).

【0012】(5)オフセット(開始位置)は、識別ビ
ット1の場合は7ビットで表現される。また識別ビット
0のは場合は11ビットで表現される。 (6)エンドマーカは、110000000であり、オ
フセットは0となる。 (7)ビットbは0又は1である。 (8)レングス(一致長)は、図12のように可変長符
号で表現される。
(5) The offset (start position) is represented by 7 bits in the case of the identification bit 1. The identification bit 0 is represented by 11 bits. (6) The end marker is 1100000000000, and the offset is 0. (7) The bit b is 0 or 1. (8) The length (match length) is represented by a variable length code as shown in FIG.

【0013】図13にQIC−122符号の符号化の具
体例を示す。図13は文字列「ABAAAAAACAB
A」が入力した場合を例にとっている。まず最初の3文
字「ABA」に関してはPバッファ中の一致する文字数
が1文字以下であることからASCII生バイトのビッ
ト系列を出力する。4文字目から8文字目までの5つの
「A」については、Pバッファの直前文字「A」と一致
することから、 圧縮バイト識別ビット 7ビットオフセット識別ビット オフセット=1 レングス=5バイト でなるビット系列「1 1 0000001 110
0」として出力する。
FIG. 13 shows a specific example of the encoding of the QIC-122 code. FIG. 13 shows the character string “ABAAAAAAACAB”.
The case where "A" is input is taken as an example. For the first three characters "ABA", a bit sequence of ASCII raw bytes is output because the number of matching characters in the P buffer is one or less. The five "A" characters from the fourth character to the eighth character match the character "A" immediately before in the P buffer, so the compressed byte identification bit 7-bit offset identification bit Offset = 1 Length = 5 bytes The series "1 1 000 0001 110
Output as "0".

【0014】ここで最大長一致の部分列の開始位置を示
すオフセットの値は、Pバッファの最新登録位置(アド
レス)から前に遡って何番目かを示している。9番目の
文字「C」はPバッファにないことからASCII生バ
イトを出力する。10〜12番目の文字「ABA」はP
バッファの先頭からの3文字として既に登録済みである
ので、 圧縮バイト識別ビット 7ビットオフセット識別ビット オフセット=9 レングス=3バイト でなるビット系列「1 1 0001001 01」を
出力する。
Here, the offset value indicating the start position of the substring having the maximum length match indicates the number of the latest registered position (address) in the P buffer going back. Since the ninth character "C" is not in the P buffer, it outputs an ASCII raw byte. The 10th to 12th characters "ABA" are P
Since the three characters have already been registered as the three characters from the head of the buffer, a bit sequence “1 1000100101” consisting of compressed byte identification bits, 7-bit offset identification bits, offset = 9 length = 3 bytes is output.

【0015】以上で全ての入力文字の符号化が済んだの
でエンドデータとして「1 1 0000000」を出
力して処理を終了する。
[0015] Since all the input characters have been encoded as described above, "1 100000" is output as end data, and the processing is terminated.

【0016】[本願発明者が提案したデータ圧縮方式]
しかしながら、ジブーレンペル符号やQIC−122符
号等を用いた従来のユニバーサル符号を用いたデータ圧
縮方式にあっては、複製すべき最大長一致する文字列を
「一致開始位置」と「一致長」の組で表わして符号化し
ていたため、Pバッファに保持する符号化済み文字列が
増加してくると、一致開始位置はPバッファを構成する
メモリのアドレスで表現されているために、長いビット
数で表わさなければならなくなり、符号化した文字列間
に冗長性が残り、高い圧縮率を得ることができなくなる
問題があった。
[Data compression method proposed by the present inventor]
However, in a conventional data compression method using a universal code using a Zibou Lempel code, a QIC-122 code, or the like, a character string having the maximum length to be copied is set to a “match start position” and a “match length”. When the number of encoded character strings held in the P buffer increases, the match start position is represented by a long bit number because the match start position is represented by the address of the memory constituting the P buffer. In such a case, there is a problem that redundancy remains between the encoded character strings and a high compression ratio cannot be obtained.

【0017】そこで本願発明者等は、文字間の相関を取
り込むことにより符号化済み文字列間の冗長性を削減し
た符号化により高い圧縮率を得ることのできるユニバー
サル符号を用いたデータ圧縮方式を提案している。図1
4に本願発明者等が提案している符号化処理の原理を示
す。。図14において、まずQバッファ10にこれから
符号化しようとする文字列「acba・・・」が格納さ
れていたとすると、既に符号化済みの直前の一文字であ
る直前文字「b」を含み、この直前文字「b」に続いて
Qバッファ10の文字列に一致する文字列がPバッファ
12にあるか否かが探索する。この条件を満足する文字
列として例えば文字列S1,S2,S3,S4が検索で
きたとする。
Accordingly, the present inventors have developed a data compression system using a universal code which can obtain a high compression rate by encoding with reduced redundancy between encoded character strings by taking in correlation between characters. is suggesting. FIG.
FIG. 4 shows the principle of the encoding process proposed by the present inventors. . In FIG. 14, assuming that a character string “acba...” To be coded from now on is stored in the Q buffer 10, the character string “b” includes the immediately preceding character “b” which is one character immediately before being coded. After the character "b", a search is performed to determine whether a character string matching the character string in the Q buffer 10 exists in the P buffer 12. It is assumed that, for example, character strings S1, S2, S3, and S4 can be searched as character strings that satisfy this condition.

【0018】文字列S1〜S4の出現番号は、Pバッフ
ァ12に右から登録を行っているため 文字列S1:1番目 文字列S2:2番目 文字列S3:3番目 文字列S4:4番目 の出現順番となり、順に出現番号1,2,3,4が割り
付けられる。
Since the appearance numbers of the character strings S1 to S4 are registered in the P buffer 12 from the right, the character string S1: the first character string S2: the second character string S3: the third character string S4: the fourth The appearance order is set, and the appearance numbers 1, 2, 3, and 4 are sequentially assigned.

【0019】次に文字列S1〜S4の中から入力文字列
に最大長一致する文字列S4を検索し、この文字列S4
の開始位置を出現番号4で表わし、一致長と組にした符
号語として出力する。一方、文字列S2のように直前文
字「b」が連続する文字列については、連続文字列S2
の開始点または終点のいずれか一方に出現番号を割り付
けて符号化する。また連続文字列Sの開始点と終点に2
つの出現番号を割り付け、2つの出現番号と一致長との
組の符号語として符号化していもよい。
Next, a character string S4 that matches the input character string with the maximum length is searched from the character strings S1 to S4.
Is represented by the appearance number 4 and is output as a code word paired with the matching length. On the other hand, for a character string in which the preceding character "b" is continuous, such as the character string S2, the continuous character string S2
Is encoded by assigning an appearance number to either the start point or the end point. Also, the start and end points of the continuous character string S are 2
One occurrence number may be allocated and encoded as a code word of a set of two occurrence numbers and a matching length.

【0020】図15はQICー122符号を例にとって
図14の出現番号を用いたユニバーサル符号化アルゴリ
ズムの一実施例を示したフローチャートである。図15
において、まずステップS1でPバッファの内容を空に
し、またQバッファに符号化しようとする入力データを
詰める。次にステップS2でQバッファの直前文字の位
置からの文字列に一致するPバッファの最長文字列Sを
検索する。続いてステップS3で検索できた最長文字列
Sが3文字以上か否か判別する。
FIG. 15 is a flow chart showing an embodiment of a universal encoding algorithm using the appearance numbers of FIG. 14 using the QIC-122 code as an example. FIG.
First, in step S1, the contents of the P buffer are emptied, and the Q buffer is filled with input data to be encoded. Next, in step S2, the longest character string S in the P buffer that matches the character string from the position of the immediately preceding character in the Q buffer is searched. Subsequently, it is determined whether or not the longest character string S retrieved in step S3 has three or more characters.

【0021】最長文字列Sが1文字或いは2文字の場合
はステップS4に進んで生データ・モードとなり、生デ
ータ・モードであることを示すフラクビット0とASC
IIコードでなる生データ1バイトを出力する。即ち、
図17(a)のデータ形式の符号語を出力する。一方、
最長文字列Sが3文字以上であった場合には、ステップ
S5に進んで複製モードとし、圧縮データであることを
示すフラグビット1に続いて最長文字列の出現順番と一
致長の組を符号化する。即ち、図17(b)のデータ形
式の符号語を出力する。
If the longest character string S is one or two characters, the flow advances to step S4 to enter the raw data mode.
Output 1 byte of raw data consisting of II code. That is,
The codeword of the data format of FIG. 17A is output. on the other hand,
If the longest character string S is three or more characters, the process proceeds to step S5 to set the copy mode, and sets a flag bit 1 indicating that the data is compressed data, and codes a set of the order of appearance and the matching length of the longest character string. Become That is, a code word in the data format shown in FIG.

【0022】ステップS6では符号化済みのQバッファ
の文字列又は文字をPバッファに移すと共に、同じ数の
新たな文字をQバッファに入力する。更にQIC−12
2符号のアルゴリズムではPバッファは2048バイト
と固定であるため、Pバッファに移した文字数分の最も
古い文字をPバッファから捨てる。以下同様な処理を繰
り返す。
In step S6, the encoded character string or character in the Q buffer is transferred to the P buffer, and the same number of new characters are input to the Q buffer. QIC-12
In the two-code algorithm, the P buffer is fixed at 2048 bytes, and the oldest characters corresponding to the number of characters transferred to the P buffer are discarded from the P buffer. Hereinafter, similar processing is repeated.

【0023】図16は図15の複製モードで符号化され
るQIC−122符号語を利用したフォーマット説明図
であり、図11と比較してオフセットが出現番号を示す
3ビットの固定長表現となっている。この場合、出現順
番を7番目まで符号化できる。ここで、出現番号0はE
NDマークに用いている。また、一致長は、直前文字を
含め、3文字以上の文字列を表わしているので、 一致長=|S|−2 を用いるものとする。更に、出現番号は右から数えた
が、逆に左から数えてもよい。
FIG. 16 is a diagram for explaining a format using the QIC-122 codeword encoded in the duplication mode of FIG. 15. In FIG. 16, the offset is a 3-bit fixed-length representation indicating the appearance number as compared with FIG. ing. In this case, the order of appearance can be encoded up to the seventh. Here, the appearance number 0 is E
Used for ND mark. Since the matching length represents a character string of three or more characters including the immediately preceding character, the matching length = | S | -2 is used. Furthermore, although the appearance numbers are counted from the right, they may be counted from the left.

【0024】このように従来の開始位置を示していたオ
フセットが7ビット或いは11ビットであったものを出
現番号を用いた場合には、出現番号を示すオフセットを
3ビットと少ないビット数で表現でき、これによって圧
縮率を向上できる。
As described above, when the appearance number is used instead of the conventional 7-bit or 11-bit offset indicating the start position, the offset indicating the appearance number can be represented by a small number of bits of 3 bits. Thus, the compression ratio can be improved.

【0025】[0025]

【発明が解決しようとする課題】しかしながら、本願発
明者等が提案した文字間の相関を取り込んだユニバーサ
ル符号を用いたデータ圧縮方式にあっては、Pバッファ
内の出現番号を固定長で表すため、直前文字の出現個数
に対し最大一致長となる部分列の出現番号が若かった場
合には、不要なビット数が余分に取られたり、逆に予定
した最大出現個数を越えたような場合には最大一致長部
分列の出現番号を全ては表せない場合が生じ、圧縮符号
に無駄が生ずるという問題が残されている。
However, in the data compression system using the universal code which takes in the correlation between characters proposed by the inventors of the present invention, the appearance number in the P buffer is represented by a fixed length. If the number of occurrences of the subsequence that has the maximum match length with respect to the number of occurrences of the preceding character is small, unnecessary bits may be taken extra or, conversely, if the maximum number of occurrences is exceeded. May not be able to represent all occurrence numbers of the maximum matching length subsequence, and there is a problem that the compression code is wasted.

【0026】本発明は、このような問題点に鑑みてなさ
れたもので、出現個数が未定であっても効率良くビット
表現して更に圧縮率を向上するようにしたユニバーサル
符号を用いたデータ圧縮方式を提供することを目的とす
る。
The present invention has been made in view of such a problem. Even if the number of appearances is undecided, data compression using a universal code which efficiently expresses bits and further improves a compression ratio is performed. The aim is to provide a scheme.

【0027】[0027]

【課題を解決するための手段】図1は本発明の原理説明
図である。まず本発明は、本願発明者等が既に提案して
いる符号化済み文字列を辞書12に保持しておき、文字
入力部10の入力文字列に対する直前文字18と同じ先
頭文字から始まる前記辞書12に保持された符号化済み
文字列の一致部分列S1,S2,S3,S4の出現個数
nを検出すると共に最大長一致する部分列S4を検索
し、最大長一致する部分列S4の開始位置として該最大
長一致部分列S4の直前文字が現れる出現順番nと一致
長Lとの組で符号化する符号化部14を備えたユニバー
サル符号を用いたデータ圧縮方式を対象とする。
FIG. 1 is a diagram illustrating the principle of the present invention. First, the present invention stores an encoded character string already proposed by the present inventors in the dictionary 12 and starts the dictionary 12 starting from the same first character as the immediately preceding character 18 for the input character string of the character input unit 10. , The number n of occurrences of the matching substrings S1, S2, S3, and S4 of the encoded character string stored in the substring S4 is searched, and the substring S4 that matches the maximum length is searched. The present invention is directed to a data compression method using a universal code including an encoding unit 14 that encodes a set of an appearance order n in which the character immediately preceding the maximum length matching subsequence S4 appears and a matching length L.

【0028】このように文字間の相関を取り込んで符号
化文字列間の冗長性を削減するようにしたユニバーサル
符号を用いたデータ圧縮方式につき本発明にあっては、
出現番号iを出現個数nに基づくビット数に応じて可変
長符号化することを特徴とする。またビット端数補償に
よる可変長符号化として符号化部14は、出現個数をn
とした場合にlog2 n以上の最小の整数を表わす「l
og2 n」で与えられるビット数をpとし、出現個数n
の最上位ビットを除く(p−1)ビットで表わしたもの
をn* とし、更に符号化する出現番号iの最上位ビット
を除く(p−1)ビットで表わしたものをi* した場
合、 i* >n* であればi* を可変長符号とし、 i* ≦n* であれば、i* の後に前記出現番号iの最上位ビットを
付加したものを可変長符号とする。
According to the present invention, there is provided a data compression system using a universal code in which the correlation between characters is taken in as described above to reduce the redundancy between encoded character strings.
It is characterized in that the appearance number i is variable-length coded according to the number of bits based on the number of appearances n. Also, the encoding unit 14 performs variable length encoding by bit fraction compensation,
Where “l” representing the smallest integer equal to or greater than log 2 n
og 2 n ”, p is the number of bits, and n
If n * is represented by (p-1) bits excluding the most significant bit of, and i * is represented by (p-1) bits excluding the most significant bit of the occurrence number i to be encoded, If i * > n * , i * is a variable length code. If i * ≦ n * , a variable length code is obtained by adding the most significant bit of the occurrence number i after i * .

【0029】更にPhasing in Binary Codes による可変
長符号化として符号化部14は、出現個数をnとした場
合にlog2 n以上の最小の整数を表わす「log2
n」で与えられるビット数をpとし、出現個数nの最上
位ビットを除く(p−1)ビットで表わしたものをn*
とし、更に符号化する出現番号iの最上位ビットを除く
(p−1)ビットで表わしたものをi* した場合、 i* <2P −n−1 であればi* を可変長符号とし、 i* ≧2P −n−1 であれば、i* に(2P −n−1)を加えた値をpビッ
トで表わして可変長符号とする。
Further, as variable-length encoding by Phasing in Binary Codes, the encoding unit 14 uses “log 2 ” representing a minimum integer equal to or greater than log 2 n when the number of appearances is n.
The number of bits given by "n" is p, and the number represented by (p-1) bits excluding the most significant bit of the number of occurrences n is n *
And then, further except for the most significant bit of the occurrence number i to be encoded (p-1) if those expressed in bits and i *, the i * a variable length code if i * <2 and P -n-1 if i * ≧ 2 a P -n-1, and variable-length code i * to the value obtained by adding (2 P -n-1) represented by p bits.

【0030】更にまた符号化部14は、直前文字18に
続く入力文字列に一致するn個の部分列が等確率で出現
するとみなし、出現順番iを多値算術符号化することを
特徴とする。更に符号化部14は、入力文字列を1/4
インチ・カートリッジ磁気テープの標準圧縮方式である
QIC−122符号に符号化する。
Furthermore, the encoding unit 14 regards n substrings that match the input character string following the immediately preceding character 18 as appearing with equal probability, and encodes the appearance order i in multi-level arithmetic. . Further, the encoding unit 14 converts the input character string into 1 /
Encode to the QIC-122 code which is a standard compression method for inch cartridge magnetic tape.

【0031】[0031]

【作用】以上説明したように本発明によれば、Qバッフ
ァの入力文字列に対する既に符号化済みの直前文字(P
バッファの最新登録の一文字)を先頭文字とする符号化
済み文字決の中の一致部分列を全て検索して出現個数n
を知り、一致部分列の中の最大長一致する部分列の複製
として符号化する際に、従来は最大一致長部分列の開始
位置と一致長の組で符号化していたものを、本発明は、
最大一致長の部分列のPバッファでの出現番号iと一致
長との組で表わして符号化し、更に出現番号iを固定長
とせずに可変長として符号化する。
As described above, according to the present invention, the immediately preceding character (P
Search for all the matching substrings in the encoded character set whose first character is the latest character in the buffer), and search for n
When encoding as a copy of a subsequence that matches the maximum length in the matching subsequence, the present invention uses what is conventionally coded with the set of the start position of the maximum matching length subsequence and the matching length. ,
The subsequence having the maximum matching length is represented by a set of the occurrence number i and the matching length in the P buffer and coded, and further, the occurrence number i is coded as a variable length instead of a fixed length.

【0032】このため従来の開始位置(開始アドレス)
に比べ、部分列の出現番号iの数の方が遙かに少なく、
出現番号iを少ないビット数で表現でき、更に出現順番
を可変長のビット数で表現するので、符号表現に無駄が
なく、少ないビット数で表現でき、高い圧縮率を得るこ
とができる。
For this reason, the conventional start position (start address)
, The number of occurrence numbers i of the subsequence is much smaller,
Since the appearance number i can be represented by a small number of bits and the appearance order is represented by a variable-length bit number, the code representation can be represented by a small number of bits without waste, and a high compression rate can be obtained.

【0033】[0033]

【実施例】図2は本発明の一実施例を示した実施例構成
図である。図2において、16はバッファメモリであ
り、符号化を行おうとする文字列を格納する文字列入力
部としてのQバッファ10と、符号化済み文字列を登録
した辞書として機能するPバッファ12に割当られる。
FIG. 2 is a block diagram showing an embodiment of the present invention. In FIG. 2, reference numeral 16 denotes a buffer memory, which is allocated to a Q buffer 10 as a character string input unit for storing a character string to be encoded and a P buffer 12 functioning as a dictionary in which encoded character strings are registered. Can be

【0034】14はCPUを用いた符号化部としてのパ
ターンマッチング部であり、ユニバーサル符号化アルゴ
リズムに従ってQバッファ10の文字列に最大長一致す
る部分列をPバッファ12から検索し、最大長一致する
部分列の複製としてその開始位置と一致長の組でなる符
号語を出力する。即ち、パターンマッチング部14は、
Pバッファ12内の直前文字の出現個数をnとし、出現
番号をiとすると、図3の符号化のフローチャートに示
す符号化処理を行う。
Reference numeral 14 denotes a pattern matching unit as an encoding unit using a CPU, which searches the P buffer 12 for a partial sequence that matches the maximum length of the character string in the Q buffer 10 according to the universal encoding algorithm, and matches the maximum length. As a copy of the subsequence, a codeword consisting of a set of the start position and the matching length is output. That is, the pattern matching unit 14
Assuming that the number of occurrences of the immediately preceding character in the P buffer 12 is n and the occurrence number is i, the encoding process shown in the encoding flowchart of FIG. 3 is performed.

【0035】図3のフローチャートは図15に示した本
願発明者等が既に提案した方式と基本的に同じであり、
相違点はステップS2でPバッファ内の直前文字の出現
個数nを求めておき、ステップS5で最長一致文字列S
の出現番号iを出現個数nに基づくビット数で表現して
可変長符号化するようにしたことである。図4は本発明
のデータ圧縮方式で得られた符号語を復元するユニバー
サル型復号化アルゴリズムを示したフローチャートであ
る。
The flowchart of FIG. 3 is basically the same as the scheme already proposed by the present inventors shown in FIG.
The difference is that the number n of occurrences of the immediately preceding character in the P buffer is determined in step S2, and the longest matching character string S is determined in step S5.
Is represented by the number of bits based on the number n of occurrences and is subjected to variable-length encoding. FIG. 4 is a flowchart showing a universal decoding algorithm for restoring a codeword obtained by the data compression method of the present invention.

【0036】図4の復号処理においては、ステップS3
でフラグビット1から複製モードを判別してステップS
5に進んだ際に、図3のステップS2と同様にPバッフ
ァ内の直前文字の出現個数nを求め、出現個数nに基づ
くビット数分だけ可変長の符号を切り出して出現番号i
を復号し、ステップS6でPバッファの直前文字列の出
現番号と一致長から最長文字列Sを復元している。
In the decoding process of FIG. 4, step S3
To determine the duplication mode from the flag bit 1 and step S
5, the number n of occurrences of the immediately preceding character in the P-buffer is obtained in the same manner as in step S2 of FIG.
Is decoded, and in step S6, the longest character string S is restored from the occurrence number and the matching length of the character string immediately before in the P buffer.

【0037】次に本発明の符号化処理で行われる出現番
号の可変長符号化の具体的な実施例を説明する。 (1)可変固定長符号化 Pバッファ内の直前文字の出現個数をnとすると、出現
番号を「log2 n」ビットで出現番号iを表して符号
化する。ここで「log2n」はlog2 n以上の最小
の整数を表わす。
Next, a description will be given of a specific embodiment of variable-length encoding of an appearance number performed in the encoding processing of the present invention. (1) Variable Fixed Length Coding Assuming that the number of occurrences of the immediately preceding character in the P buffer is n, the occurrence number is encoded by expressing the occurrence number i with “log 2 n” bits. Here, “log 2 n” represents a minimum integer equal to or greater than log 2 n.

【0038】例えばある入力文字列を符号化する際にP
バッファ内の検索で得られた出現文字数nがn=12個
であったとすると、この時の最長文字列Sの出現番号i
は、 「log2 n」=「log2 12」=4ビット で表現される可変長符号となる。これを可変固定長符号
化という。 (2)ビット端数補償による可変固定長符号化 前記(1)の可変固定長符号化では、出現個数nに対応
した最大値i=nまでの出現番号iを「log2 n」ビ
ットで表すと 「log2 n」−log2 nビット のビットロスが生じる。このビットの端数のロスを減し
て出現番号iを表現することにより符号化効率を向上さ
せるものとしてビット端数補償がある(例えば「Ziv-Le
mpel符号の改良とシミュレーションによる性能評価−
(II)」、電子通信学会技術研究報告C84-135, pp.1-8,
1984参照)。
For example, when encoding a certain input character string, P
Assuming that the number n of appearance characters obtained by the search in the buffer is n = 12, the appearance number i of the longest character string S at this time is
Is a variable-length code represented by “log 2 n” = “log 2 12” = 4 bits. This is called variable fixed length coding. (2) Variable Fixed-Length Coding by Bit Fraction Compensation In the variable fixed-length coding of the above (1), if the occurrence number i up to the maximum value i = n corresponding to the number n of occurrences is represented by “log 2 n” bits A bit loss of “log 2 n” −log 2 n bits occurs. Bit fraction compensation is a technique for improving the coding efficiency by reducing the loss of the fraction of bits and expressing the appearance number i (for example, “Ziv-Le”
Improvement of mpel code and performance evaluation by simulation
(II) ", IEICE Technical Report C84-135, pp.1-8,
1984).

【0039】このビット端数補償にあっては、出現個数
nに対応した最大出現番号をi=nとした時のビット数
pを p=「log2 n」 また出現番号iの最上位ビットを除く(p−1)ビット
で表したものをi* とする。同様に最大出現番号nの最
上位ビットを除く(p−1)ビットで表したものをn*
とする。
In this bit fraction compensation, when the maximum appearance number corresponding to the appearance number n is i = n, the bit number p is p = “log 2 n”, and the most significant bit of the appearance number i is excluded. What is represented by (p-1) bits is i * . Similarly, a value represented by (p-1) bits excluding the most significant bit of the maximum appearance number n is n *
And

【0040】このような条件のもとで、ビット端数補償
による出現番号iの可変長符号語は、i* ≦n* のと
き、i* で表し、i* >n* のとき、i* の後に最上
位ビットを付けて表す。ここで出現個数n=12の出現
番号i=0〜11をビット端数補償で表す例を第5図に
示す。
[0040] Under such conditions, the variable-length code words of the appearance number i by bit fraction compensation is, when i * ≦ n *, expressed in i *, when i *> n *, i * of This is indicated by adding the most significant bit to the end. FIG. 5 shows an example in which the appearance numbers i = 0 to 11 of the appearance number n = 12 are represented by bit fraction compensation.

【0041】図5においては、 p=「log2 n」=「log2 12」=4ビット p−1=3ビット であり、i* ≦3ビットのとき、i* で表し、i*
>3ビットのとき、i* の後に最上位ビットを付けて表
す。
[0041] In FIG. 5, p = a "log 2 n" = "log 2 12" = 4 bits p-1 = 3 bits, i * ≦ 3 when bit, expressed in i *, i *
When> 3 bits, i * is followed by the most significant bit.

【0042】即ち、参照番号(出現番号)i=0〜11
の4ビットの2進表示は、前記の条件を満たす参照番
号i=4〜7の4つについては、上位1ビットを除いた
下位3ビットi* で表わす。一方、前記の条件を満た
す参照番号i=0〜3及びi=8〜11については、上
位1ビットを除いた下位3ビットi* の後に2進表示の
上位1ビットを付けて区別する。 [Phasing in Binary Codes ]このPBC可変長符号
化は、例えば「 Text Compression」, Prentice-Hall I
nc. 1990, pp.293-294 に記載される。
That is, reference numbers (appearance numbers) i = 0 to 11
In the four-bit binary notation, four reference numbers i = 4 to 7 satisfying the above conditions are represented by lower three bits i * excluding the upper one bit. On the other hand, the reference numbers i = 0 to 3 and i = 8 to 11 satisfying the above conditions are distinguished by attaching the lower 3 bits i * excluding the upper 1 bit to the upper 1 bit in binary notation. [Phasing in Binary Codes] This PBC variable-length encoding is performed, for example, in “Text Compression”, Prentice-Hall I
nc. 1990, pp. 293-294.

【0043】PBC可変長符号化ではi<2P −n−
1のとき、i* で表し、i≧2P −n−1のとき、出
現番号iに(2P −n−1)を加えた値(i+2P −n
−1)をpビットで表す。出現個数n=12の時の出現
番号(参照番号)i=0〜11についてのPBC符号化
の具体例を図6に示す。
In PBC variable length coding, i <2 P -n-
When 1, expressed by i *, when i ≧ 2 P -n-1, was added to the occurrence number i (2 P -n-1) value (i + 2 P -n
-1) is represented by p bits. FIG. 6 shows a specific example of PBC encoding for the occurrence numbers (reference numbers) i = 0 to 11 when the number of appearances n = 12.

【0044】図6において、前記の条件を満足するの
は参照番号i=0〜3の場合であり、この場合には、p
=4ビットで表現されたi=0〜3の2進表示コードは
最上位ビットを除く3ビットでPBC表現される。また
前記の条件を満足するのは参照番号i=4〜11の場
合であり、この場合には、p=4ビットで表現されたi
=4〜11の2進表示に4の2進表示「100」を加算
した4ビットでPBC表現される。 (4)多値算術符号化 前記(2)(3)の可変長符号化は、出現番号iによっ
てpビットとp−1ビットで表しており、出現番号iの
一個ずつでみるとビットの端数のロスを減じることがで
きるものの、出現番号列全体としてみると冗長性がまだ
残る。
In FIG. 6, the above condition is satisfied when reference numbers i = 0 to 3, and in this case, p
= The binary display code of i = 0 to 3 expressed by 4 bits is expressed by PBC with 3 bits excluding the most significant bit. The above condition is satisfied when reference numbers i = 4 to 11, and in this case, i = i expressed by p = 4 bits.
= 4 to 11 binary representations and 4 binary representations "100" are represented by 4 bits in PBC representation. (4) Multi-Level Arithmetic Coding The variable-length coding of (2) and (3) is represented by p bits and p-1 bits by the occurrence number i. Can be reduced, but there is still redundancy in the appearance number sequence as a whole.

【0045】そこで、ビットのロスを更に削除するた
め、出現個数n個の文字列が等確率で出現するものと仮
定して出現番号(シンボル)iを多値算術符号化する
(多値算術符号化については、例えば、文献“Arithmet
ic Coding for Data Compression”, Communication o
f the ACM, June 1987, Vol.30, No.6, pp.520-540参
照)。
Therefore, in order to further reduce the bit loss, the occurrence number (symbol) i is multi-value arithmetically encoded by assuming that n character strings appear with equal probability (multi-value arithmetic code). For example, see the document “Arithmet
ic Coding for Data Compression ”, Communication o
f the ACM, June 1987, Vol. 30, No. 6, pp. 520-540).

【0046】図7(a)(b)に複数個のシンボルの符
号化に用いる多値算術符号化の符号化、復号化の概略フ
ローを示す。図7(a)多値算術符号化は、データ列を
[0,1]の数直線上の一点に対応付けるものであり、
シンボルごとに出現したシンボルの出現確率から求めた
累積出現確率によって[0,1]区間を逐次、細分割す
るものである。
FIGS. 7 (a) and 7 (b) show schematic flows of encoding and decoding of multi-level arithmetic encoding used for encoding a plurality of symbols. FIG. 7 (a) multi-level arithmetic coding associates a data string with a point on a number line of [0, 1].
The [0, 1] section is sequentially subdivided according to the cumulative appearance probabilities obtained from the appearance probabilities of the symbols that have appeared for each symbol.

【0047】図8は多値算術符号化の処理内容を示した
もので、1回目の出現個数nn=4であり、最長文字
列の出現番号iがi=2番目であったとすると、上限=
1十下限=0の間の4分割された区間の中のi=2に対
応するの区間が選択される。次に2回目の出現個数も
同じn=2であり、この場合の最小文字列の出現番号i
がi=1番目であったとすると、更に4分割された中の
の区間が選択される。
FIG. 8 shows the processing contents of the multi-level arithmetic coding. Assuming that the first appearance number n is n = 4 and the appearance number i of the longest character string is i = 2, Upper limit =
The section corresponding to i = 2 in the section divided into four while the lower limit of ten = 0 is selected. Next, the same number of occurrences of the second time is n = 2, and the occurrence number i of the smallest character string in this case is
Is the i = 1st, the section in the four sub-areas is further selected.

【0048】以下同様に選択された区間の再分割が進
み、N回目に最終文字列に基づく区間が選択されると、
この選択区間の中の任意の一点の値(区間の上限又は下
限を示す値でも良い)との組を符号語として出力する。
また図7(a)のアルゴリズムでは、シンボル列全体の
符号化が終了するまで符号語が得られず、また、符号語
全体が得られないと復号ができないようになっている
が、実際の多値算術符号化では、有限桁の固定長のレジ
スタで演算して、ビット単位に符号語を得ることができ
る。
Thereafter, the subdivision of the selected section proceeds similarly, and when the section based on the final character string is selected Nth time,
A combination with an arbitrary point value (a value indicating the upper or lower limit of the section) in the selected section is output as a code word.
Further, in the algorithm of FIG. 7A, a code word cannot be obtained until encoding of the entire symbol sequence is completed, and decoding cannot be performed unless the entire code word is obtained. In value arithmetic coding, a codeword can be obtained in bit units by performing calculations using a fixed-length register having a finite number of digits.

【0049】即ち、図8の第1回目の符号化では、例え
ば上限が「001」下限が「010」であり、両者の最
上位ビットは共に「0」であることから、この最上位の
ビット「0」は出力してしまうようにする。2回目以降
についても同様である。更に多値算術符号化を用いる場
合、文字列の「一致長」についても、各一致長ごとに出
現数を計数しておき、計数値から推定した一致長の出現
確率を出現番号とともに多値算術符号化するようにして
もよい。
That is, in the first encoding shown in FIG. 8, for example, the upper limit is "001" and the lower limit is "010", and both the most significant bits are "0". "0" is output. The same applies to the second and subsequent times. Furthermore, when using multi-valued arithmetic coding, the number of occurrences of the “match length” of the character string is counted for each match length, and the occurrence probability of the match length estimated from the count value is calculated together with the occurrence number and the multi-value arithmetic. It may be encoded.

【0050】尚、上記の実施例はQIC−122符号を
例にとるものであったが、これに限定されずジブーレン
ペル符号等の適宜のユニバーサル符号につきそのまま適
用できる。
In the above embodiment, the QIC-122 code is used as an example, but the present invention is not limited to this, and the present invention can be applied to any appropriate universal code such as a Zibo Lempel code.

【0051】[0051]

【発明の効果】以上説明したように本発明によれば、符
号化文字列を符号化済文字列の複製として複製の開始位
置を「出現順番」と「一致長」の組で表すとき、「出現
順番」を可変長のビット数で表現するので、符号表現に
無駄がなく、より短いビット数で表すことができ、高い
圧縮率を得ることができる。
As described above, according to the present invention, when the coded character string is a copy of the coded character string, and the start position of the copy is represented by a set of "appearance order" and "match length", Since the “appearance order” is represented by a variable-length bit number, the code representation can be represented by a shorter bit number without waste, and a high compression rate can be obtained.

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

【図1】本発明の原理説明図FIG. 1 is a diagram illustrating the principle of the present invention.

【図2】本発明の実施例構成図FIG. 2 is a configuration diagram of an embodiment of the present invention.

【図3】本発明を用いたQIC−122符号化アルゴリ
ズムを示したフローチャート
FIG. 3 is a flowchart showing a QIC-122 encoding algorithm using the present invention.

【図4】本発明により符号化され符号語の復号化アルゴ
リズムを示したフローチャート
FIG. 4 is a flowchart illustrating a decoding algorithm of a codeword encoded according to the present invention;

【図5】本発明のビット端数補償による可変長符号化の
具体例説明図
FIG. 5 is a diagram illustrating a specific example of variable-length encoding by bit fraction compensation according to the present invention;

【図6】本発明のPBC符号化による具体例説明図FIG. 6 is a diagram illustrating a specific example of PBC encoding according to the present invention;

【図7】本発明の多値算術符号化の無効果及び復号化ア
ルゴリズムを示した説明図
FIG. 7 is an explanatory diagram showing the ineffectiveness of multi-level arithmetic coding and a decoding algorithm according to the present invention;

【図8】本発明の多値算出符号化の処理内容を示した説
明図
FIG. 8 is an explanatory diagram showing processing contents of multi-value calculation encoding according to the present invention;

【図9】ユニバーサル型ジブーレンペル符号の符号化方
式説明図
FIG. 9 is an explanatory diagram of an encoding method of a universal type Jeho Lempel code.

【図10】ユニバーサル符号語のデータ形式説明図FIG. 10 is a diagram illustrating the data format of a universal codeword.

【図11】QIC122符号のフォーマット説明図FIG. 11 is an explanatory diagram of a format of a QIC122 code.

【図12】図11に使用したBNFメタ言語の説明図FIG. 12 is an explanatory diagram of the BNF meta-language used in FIG.

【図13】QIC−122符号による符号化の具体例を
示した説明図
FIG. 13 is an explanatory diagram showing a specific example of encoding using a QIC-122 code;

【図14】本願発明者等が提案している符号化処理の原
理説明図
FIG. 14 is a diagram illustrating the principle of encoding processing proposed by the present inventors.

【図15】本願発明者等が提案しているQIC−122
符号化アルゴリズムを示したフローチャート
FIG. 15 shows QIC-122 proposed by the present inventors.
Flowchart showing the encoding algorithm

【図16】図15の複製モードの符号語フォーマット説
明図
16 is an explanatory diagram of a code word format in the duplication mode of FIG. 15;

【図17】図15の符号語のデータ形式説明図17 is an explanatory diagram of the data format of the code word in FIG.

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

10:文字入力部(Qバッファ) 12:辞書(Pバッファ) 14:符号化部(パターンマッチング部) 16:バッファメモリ 18:直前文字 10: Character input unit (Q buffer) 12: Dictionary (P buffer) 14: Encoding unit (pattern matching unit) 16: Buffer memory 18: Previous character

───────────────────────────────────────────────────── フロントページの続き (72)発明者 千葉 広隆 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (56)参考文献 特開 平3−70214(JP,A) 特開 平3−78322(JP,A) 特開 平3−209922(JP,A) 特開 平4−256192(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 5/00 H03M 7/40 ────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Hirotaka Chiba 1015 Kamiodanaka, Nakahara-ku, Kawasaki City, Kanagawa Prefecture Inside Fujitsu Limited (56) References JP-A-3-70214 (JP, A) JP-A-3-78322 (JP, A) JP-A-3-209922 (JP, A) JP-A-4-256192 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 5/00 H03M 7 / 40

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】符号化済文字列を辞書に保持し、 前記辞書に保持された符号化済文字列のうち、文字入力
部からの入力文字列の直前文字と同じ文字から始まり且
つ前記入力文字列と一致する一致部分列を検索して、前
記一致部分列の出現個数を検出し、 前記一致部分列の中から、前記入力文字列と最大長一致
する最大一致部分列を検索し、 前記最大長一致部分列の直前文字が現れる出現順番を示
す出現番号と、前記最大一致部分列と前記入力文字列と
の一致長との組を符号化するとともに、 前記出現番号を、前記出現個数に基づくビット数に応じ
て可変長符号化することを 特徴とするデータ圧縮方法
An encoded character string is stored in a dictionary, and a character input is performed from among the encoded character strings stored in the dictionary.
Starts with the same character as the character immediately before the character string input from the
Search for a matching substring that matches the input string
The number of occurrences of the matching substring is detected, and the maximum length matches with the input character string from among the matching substrings.
Search for the largest matching subsequence to indicate the order in which the character immediately preceding the maximum length matching subsequence appears.
The occurrence number, the maximum matching substring and the input character string,
And the occurrence number according to the number of bits based on the number of occurrences.
Features and to Lud over data compression method that variable-length coding Te.
【請求項2】請求項1記載のデータ圧縮方式に於いて、 前記可変長符号化は、前記出現番号iをlog2 n以上
の最小の整数を表わす「log2 n」ビットの可変長符
号で表すことを特徴とするデータ圧縮方法
Wherein at the data compression method of claim 1, wherein said variable-length coding, the occurrence number i represents the smallest integer more than log 2 n "log 2 n" bit variable length features and to Lud over data compression method to be represented by the symbol.
【請求項3】請求項1記載のデータ圧縮方法に於いて、 前記可変長符号化は 、出現個数をnとした場合にlog
2 n以上の最小の整数を表わす「log2 n」で与えられ
るビット数をpとし、出現個数nの最上位ビットを除く
(p−1)ビットで表わしたものをn*とし、更に符号
化する出現番号iの最上位ビットを除く(p−1)ビッ
トで表したものをi*とした場合、 i* >n* であればi* を可変長符号とし、 i* ≦n* であれば、i* の後に前記出現番号iの最上位ビット
を付加したものを可変長符号とすることを特徴とするデ
ータ圧縮方法
3. In data compression method of claim 1, wherein said variable-length coding, log when the number of occurrences is n
The number of bits given by “log 2 n” representing the smallest integer of 2 n or more is represented by p, and the number represented by (p−1) bits excluding the most significant bit of the number of occurrences n is represented by n * . appearance except for the most significant bits of the number i (p-1) if those in bits set to i *, i *> if n * a i * a variable-length code, i * ≦ n a * long to if, i * the occurrence number i features and to Lud <br/> over data compression method to be variable-length codes obtained by adding the most significant bit of after.
【請求項4】請求項1記載のデータ圧縮方法に於いて、 前記可変長符号化は、 出現個数をnとした場合にlog
2 n以上の最小の整数を表わす「log2 n」で与えられ
るビット数をpとし、出現個数nの最上位ビットを除く
(p−1)ビットで表わしたものをn*とし、更に符号
化する出現番号iの最上位ビットを除く(p−1)ビッ
トで表したものをi*とした場合、 i* <2P −n−1 であればi*を可変長符号とし、 i* ≧2P−n−1 であれば、i*に2P−n−1を加えた値をpビットで表
して可変長符号とすることを特徴とするデータ圧縮
4. In the data compression method of claim 1, wherein said variable-length coding, log when the number of occurrences is n
The number of bits given by “log 2 n” representing the smallest integer of 2 n or more is represented by p, and the number represented by (p−1) bits excluding the most significant bit of the number of occurrences n is represented by n * . When i * is represented by (p−1) bits excluding the most significant bit of the occurrence number i, if i * <2 P− n−1, i * is a variable length code, and i * ≧ if 2P-n-1, i * the characteristics and to Lud over data compression how to be a variable length code represents a value obtained by adding 2 P -n-1 with p-bit
Law .
【請求項5】請求項1記載のデータ圧縮方法に於いて、 前記可変長符号化は、 直前文字に続く入力文字列に一致
するn個の部分列が等確率で出現するとみなし、出現順
番iを多値算術符号化することを特徴とするデータ圧縮
方法
5. In data compression method of claim 1, wherein said variable-length coding assumes that n partial string that matches the input character string following the immediately preceding character appear with equal probability, the appearance features and to Lud over to the multilevel arithmetic coding order i data compression
How .
【請求項6】請求項1乃至請求項5記載のデータ圧縮方
に於いて、 前記可変長符号化は 、入力文字列を1/4インチ・カー
トリッジ磁気テープの標準圧縮方式であるQIC−12
2符号の符号語で符号化することを特徴とするデータ圧
方法
6. In claim 1 data compression method of claim 5, wherein said variable-length encoding, the input string is a standard compression scheme of 1/4 inch cartridge magnetic tape QIC- 12
Features and to Lud over data compression method to be encoded in code words of the two code.
JP16554391A 1991-07-05 1991-07-05 Data compression method Expired - Fee Related JP3051501B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16554391A JP3051501B2 (en) 1991-07-05 1991-07-05 Data compression method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16554391A JP3051501B2 (en) 1991-07-05 1991-07-05 Data compression method

Publications (2)

Publication Number Publication Date
JPH0514206A JPH0514206A (en) 1993-01-22
JP3051501B2 true JP3051501B2 (en) 2000-06-12

Family

ID=15814382

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16554391A Expired - Fee Related JP3051501B2 (en) 1991-07-05 1991-07-05 Data compression method

Country Status (1)

Country Link
JP (1) JP3051501B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7059516B2 (en) 2017-03-29 2022-04-26 富士通株式会社 Coding program, coding device and coding method

Also Published As

Publication number Publication date
JPH0514206A (en) 1993-01-22

Similar Documents

Publication Publication Date Title
JP3541930B2 (en) Encoding device and decoding device
JP3241788B2 (en) Data compression method
JP3231105B2 (en) Data encoding method and data restoration method
Pandey et al. An enhanced data compression algorithm
JP3105598B2 (en) Data compression method using universal code
JP2536422B2 (en) Data compression device and data decompression device
JP3051501B2 (en) Data compression method
JP3241787B2 (en) Data compression method
JP3127016B2 (en) Data compression and decompression method
JP3350118B2 (en) Data encoding method and data restoration method
JP3242795B2 (en) Data processing device and data processing method
JPH05152971A (en) Data compressing/restoring method
Ghuge Map and Trie based Compression Algorithm for Data Transmission
JP3078601B2 (en) Data compression method
JPH06161705A (en) Data encoding system and data decoding system
JP2954749B2 (en) Data compression method
JP3100206B2 (en) Data compression method
JP2999561B2 (en) Data compression and decompression device
JP3117760B2 (en) Data restoration method
JP2825960B2 (en) Data compression method and decompression method
JP3083329B2 (en) Data compression / decompression method
JP3442105B2 (en) Data compression and decompression methods
JP2999587B2 (en) Data compression and decompression method
JPH06149537A (en) Data compression method and restoration method
JP3388767B2 (en) Data compression method

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

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080331

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090331

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees