JPH0193217A - Data compression/expansion device - Google Patents

Data compression/expansion device

Info

Publication number
JPH0193217A
JPH0193217A JP25009787A JP25009787A JPH0193217A JP H0193217 A JPH0193217 A JP H0193217A JP 25009787 A JP25009787 A JP 25009787A JP 25009787 A JP25009787 A JP 25009787A JP H0193217 A JPH0193217 A JP H0193217A
Authority
JP
Japan
Prior art keywords
data
pieces
appearance frequency
compression
consecutive
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
JP25009787A
Other languages
Japanese (ja)
Inventor
Hiroyuki Aii
相井 宏之
Hirosuke Okano
岡野 啓輔
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP25009787A priority Critical patent/JPH0193217A/en
Publication of JPH0193217A publication Critical patent/JPH0193217A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Transmission Systems Not Characterized By The Medium Used For Transmission (AREA)
  • Reduction Or Emphasis Of Bandwidth Of Signals (AREA)

Abstract

PURPOSE:To efficiently perform the compression or the expansion of data by counting the appearance frequency of supplied data by an appearance frequency counting means, and substituting a value corresponding to the data with high appearance frequency or the said data and a consecutive number for only the said data. CONSTITUTION:The appearance frequency of the data to be compressed is found by an appearance frequency counting part 2, and N data with high appearance frequency and (N*I+1) data with low appearance frequency are extracted at a detection part 3, and the N data with high appearance frequency is substituted by (N*(I+1)+I)th data with low appearance frequency, or three bytes. By substituting the value corresponding to the data with high appearance frequency or the said data and the consecutive number for only the data with high appearance frequency, it is possible to perform the compression or the expansion of the data efficiently.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、固定ビット長(例えば8ビア)単位)のデー
タを蓄積したυ、伝送したりする装置において、簡単な
構成でデータの圧縮あるいは伸長を高速で行うデータ圧
縮伸長装置に関するものである。
[Detailed Description of the Invention] Industrial Application Field The present invention provides a method for compressing or decompressing data with a simple configuration in a device that stores and transmits data of a fixed bit length (e.g., 8 vias). The present invention relates to a data compression/expansion device that performs data compression/expansion at high speed.

従来の技術 従来、固定ビット長のデータを圧縮する方法としては、
出現頻度の高いデータに関して、該データとその連続個
数に置換する方法等が用いられている。
Conventional technology Conventionally, methods for compressing fixed bit length data are as follows:
For data that appears frequently, a method of replacing the data with the data and its consecutive number is used.

発明が解決しようとする問題点 しかし、上記した方法では、出現頻度の多いデータが1
個ずつ出現している場合、該データとその連続個数で置
き換えた場合、1 byteが2 byteになりデー
タ量が増加してしまうという問題点を有していた。
Problems to be Solved by the Invention However, in the above method, data that appears frequently is
In the case where the data appears one by one, if the data is replaced with the number of consecutive data, 1 byte becomes 2 bytes, resulting in an increase in the amount of data.

本発明は上記問題点に鑑み、出現頻度の異なるデータが
混在するデータを効率良く圧縮あるいは伸長することが
できるデータ圧縮伸長装置を提供することを目的とする
SUMMARY OF THE INVENTION In view of the above-mentioned problems, it is an object of the present invention to provide a data compression/expansion device that can efficiently compress or expand data in which data with different frequencies of appearance coexist.

問題点を解決するだめの手段 本発明は上記の目的を達するために、同一データが出現
する頻度を計数する出現頻度計数手段と、この計数結果
から出現頻度の多いデータN個と少ないデータM個を抽
出する手段と、同一データが何個連続しているかを計数
する連続個数計数手段とを有し、出現頻度の多いN個の
データについてのみ前記連続個数計数手段によシ何個連
続しているかを計数し、N個を示す数値と、置換する連
続個数を示す数値と、出現頻度の多いN個のデータと、
出現頻度の少ないM個のデータを蓄積あるいは送出後、
出現頻度の多いデータについては、該データと該データ
の連続個数、あるいは該データの連続個数に対応する出
現頻度が少ないデータを蓄積あるいは送出し、出現頻度
が少ないデータについては、識別データと該データを蓄
積あるいは送信し、その他のデータについてはそのまま
蓄積あるいは送出する構成となっている。
Means for Solving the Problems In order to achieve the above object, the present invention provides an appearance frequency counting means for counting the frequency at which the same data appears, and from this counting result, N pieces of data that appear frequently and M pieces of data that appear less frequently. and a continuous number counting means for counting how many pieces of the same data are consecutive. A numerical value indicating N pieces, a numerical value indicating the consecutive number of pieces to be replaced, and N pieces of data that appear frequently,
After accumulating or sending M pieces of data with low appearance frequency,
For data that appears frequently, the data and the number of consecutive pieces of this data, or data that appears less frequently corresponding to the number of consecutive pieces of this data are stored or sent, and for data that appears less frequently, the identification data and the data The configuration is such that the data is stored or transmitted, and other data is stored or transmitted as is.

作用 本発明は上記した構成により、与えられたデータに対し
、出現頻度計数手段で出現頻度を計数し、出現頻度が高
いデータに関してのみ該データに対応する値あるいは該
データと連続個数に置換することによシ、効率良く圧縮
もしくは伸長することができる。
According to the above-described configuration, the present invention counts the appearance frequency of given data using an appearance frequency counting means, and replaces only data with a high appearance frequency with a value corresponding to the data or a continuous number of the data. Therefore, it can be compressed or expanded efficiently.

実施例 第1図ムは本発明の一実施例におけるデータ圧縮伸長装
置のデータ圧縮回路を示すブロック図である。第1図に
おいて、1は圧縮すべきデータを記憶するためのデータ
記憶部、2は圧縮すべきデータに対して出現頻度を計数
する出現頻度計数部、3は出現頻度が多い順にN個を取
り出し、出現頻度が少ない順にM個を増シ出す検出部、
4は同一データが何個連続するかを計数する同一データ
連続数計数部、6は圧縮されたデータを記憶する圧縮デ
ータ記憶部、21はデータ記憶部21から取り出された
データ、22は出現頻度数、23は出現頻度が高いN個
のデータおよび出現頻度が少ないM個のデータ、24は
Hの値とN個のデータおよびMの値とM個のデータ、2
6は圧縮対象データについては圧縮されたデータをその
他のデータについてはそのままのデータをそれぞれ示す
Embodiment FIG. 1 is a block diagram showing a data compression circuit of a data compression/expansion apparatus in an embodiment of the present invention. In Fig. 1, 1 is a data storage unit for storing data to be compressed, 2 is an appearance frequency counter unit that counts the appearance frequency for the data to be compressed, and 3 is an extraction of N items in descending order of appearance frequency. , a detection unit that increases the number of M pieces in order of decreasing frequency of appearance;
4 is a same data consecutive number counter that counts how many pieces of the same data are consecutive; 6 is a compressed data storage unit that stores compressed data; 21 is data retrieved from the data storage unit 21; 22 is an appearance frequency. number, 23 is N data with high appearance frequency and M data with low appearance frequency, 24 is the value of H and N data, and the value of M and M data, 2
6 shows the compressed data for the data to be compressed, and the data as is for the other data.

以上のように構成された本実施例のデータ圧縮伸長装置
について以下その動作を説明する・。まず、(1)圧縮
すべきデータに対して出現頻度計数部2で出現頻度を求
め、出現頻度の多いデータN個および少ないデータ(N
傘i+1)個を検出部3で抽、出する。
The operation of the data compression/expansion apparatus of this embodiment configured as described above will be explained below. First, (1) the appearance frequency counting unit 2 calculates the appearance frequency of the data to be compressed, and N pieces of data with a high appearance frequency and N data with a low appearance frequency (N
The detection unit 3 extracts and outputs the umbrellas (i+1).

(2)出現頻度の多いN個のデータに対して、1個以下
連続して出現した場合は、出現頻度の少なイ(N 傘(
1−1)+1 )番目のデータに置換する。
(2) For N data that appear frequently, if one or less appears consecutively, the data that appears less frequently (N)
Replace with 1-1)+1)th data.

(3)出現頻度の多いN個のデータに対して、■+1個
以上連続して出現した場合は、第1図Bに示す3 by
toに置換する。
(3) If more than ■+1 appear consecutively for N data with high frequency of appearance, 3 by as shown in Figure 1B
Replace with to.

(4)出現頻度の少ない(N−1)個のデータに対して
は、第1図Cに示すように2 byteに置換する。
(4) For (N-1) pieces of data that appear less frequently, replace them with 2 bytes as shown in FIG. 1C.

(四 他のデータに対しては、゛そのままのデータを使
用する。
(4) For other data, use the data as is.

以上のようにして圧縮を行い、伸長に関しては、前もっ
て指定されたデータをもとに置換あるいは連続個数をも
とに圧縮前のデータに戻すことにより、与えられたデー
タに対し、出現頻度を計数し、出現頻度が高いデータに
関してのみ該データに対応する値あるいは該データと連
続個数に置換することによシ、効率良く圧縮もしくは伸
長することができるものである。
Compression is performed as described above, and for decompression, the frequency of occurrence is counted for the given data by replacing it based on the data specified in advance or returning it to the data before compression based on the number of consecutive pieces. However, by replacing only data with a high frequency of appearance with a value corresponding to the data or a continuous number of data, it is possible to efficiently compress or expand the data.

以下、対象とするデータを8ピツトの固定長とした場合
についてさらに詳しく説明する。この場合、圧縮すべき
データは、“ooOoOooo″から“1111111
1”までの256種類が存在し、それぞれについて出現
する頻度を求め、出現頻度が多いデータについては連続
個数を計数し、出現頻度の少ないデータあるいはデータ
の値と連続個数での表現に置換する。
The case where the target data has a fixed length of 8 pits will be explained in more detail below. In this case, the data to be compressed is from “ooOoOooo” to “1111111
There are 256 types up to 1'', and the frequency of appearance for each is determined, and for data that appears frequently, the number of consecutive items is counted, and the data is replaced with data that appears less frequently, or the value of the data and the representation of the number of consecutive items.

第2図は本実施例をより詳細に説明するだめの図で、(
ム)は出現頻度の計数結果、(B)は圧縮の対象となる
データおよび置換するデータを示しているデータ構造を
示している。まず、出現頻度を計数し、(ム)に示す2
66種類のデータに対して出現頻度の分布を求め、例え
ば、多いほうから2個を取シ出す。この場合、oo、F
F”が多いほうからの2個となシ、この2個のみが、本
方式による圧縮対象のデータとなる。
FIG. 2 is a diagram for explaining this embodiment in more detail.
(B) shows the data structure showing the data to be compressed and the data to be replaced. First, count the frequency of appearance, and
The distribution of appearance frequencies is determined for 66 types of data, and, for example, the two items with the highest frequency are selected. In this case, oo, F
Only the two data with the largest number of "F" and the number "F" are the data to be compressed by this method.

(B)において、“0206”は本方式による圧縮対象
データが2個であり、置換する連続個数が6回であるこ
とを示し、次の“○OFD  Fs FeF3XE”は
、圧縮対象データが“Oo″で置換対象データが”FD
  F97873 EM”であることを示し、次の、“
FF  FA  F7 Fs  F2 1CD”は、圧
縮対象データが°“FF”で置換対象データが’FAF
7 F5  F2  ED“′であることを示し、次の
II K Onは置換データが出現したときに付加する
データを示す。すなわち、00″は“F D ”、“o
o、oo”は“F9”、“oo oo oo”は“26
″、”oo oo oo oo”は“F3”に、”oo
 o。
In (B), "0206" indicates that the data to be compressed by this method is 2 and the number of consecutive replacements is 6 times, and the next "○OFD Fs FeF3XE" indicates that the data to be compressed is "Oo ”, the data to be replaced is “FD”
F97873 EM” and the following “
FF FA F7 Fs F2 1CD" means that the data to be compressed is ° "FF" and the data to be replaced is 'FAF.
7 F5 F2 ED "'", and the next II K On indicates data to be added when replacement data appears. In other words, 00" indicates "F D ", "o
o, oo” is “F9”, “oo oo oo” is “26”
”, “oo oo oo oo” is “F3”, “oo
o.

oo oo oo”は” I!: E”に置換され、′
00”が5回以上127回以下のとき、例えば、10回
ならば“0080 oA” に置換され、128回増加
するごとに°“80゛が11911+、“82′′と増
加していく。同様に、“F F ”は“F人″、”FF
  FF”は“FT”、”FF FF FF”は“F5
”、″FF FFFF FF”は“F2”に、“FF 
 FF FF  FFFF”は“XI)” に置換され
る。また、°“FDFA  F9 F77875  F
2  EE  ED  EC” が出現した時は、それ
ぞれ“”ECFD”のように“EC”を付加する。
oo oo oo” is “I! : Replaced with E'','
When 00" is 5 to 127 times, for example, 10 times, it is replaced with "0080 oA", and every time it increases by 128 times, °"80゛ increases to 11911 + "82''. Similarly. , “F F” is “F person”, “FF”
FF” is “FT”, “FF FF FF” is “F5”
”, “FF FFFF FF” is “F2”, “FF
FF FF FFFF” is replaced with “XI)”. Also, °“FDFA F9 F77875 F
When "2 EE ED EC" appears, "EC" is added respectively, such as ""ECFD".

第3図は前記の方式により圧縮したデータを伸長するた
めの伸長回路の一実施例で、10は圧縮データ記憶部、
11は圧縮・置換対象データ記憶部、12はデータ伸長
回路、13は復元データ記憶部をそれぞれ示している。
FIG. 3 shows an embodiment of a decompression circuit for decompressing data compressed by the above method, in which 10 is a compressed data storage unit;
Reference numeral 11 indicates a compression/replacement target data storage section, 12 a data decompression circuit, and 13 a restored data storage section.

この伸長回路では、N個の圧縮対象データおよびM個の
置換対象データを11に示す圧縮・置換対象データ記憶
部に記憶後、圧縮されたデータを順次記憶部から読・み
出し、置換対象データであれば該データに対応するデー
タに置換し、圧縮対象データであればそのデータを引き
続き送られてくる2 byteのデータにより繰り返し
個数分のデータに置換し、圧縮対象外データであればそ
のままのデータで出力することにより順次圧縮前のデー
タに復元させる。
In this decompression circuit, after storing N pieces of data to be compressed and M pieces of data to be replaced in a compression/replacement target data storage unit shown in 11, the compressed data is sequentially read out from the storage unit, and the data to be replaced is If so, replace it with the data corresponding to that data, if it is data to be compressed, replace that data with data for the number of repetitions using 2 byte data that is sent continuously, and if it is data not to be compressed, leave it as is. By outputting data, the data is sequentially restored to the data before compression.

発明の効果 以上のように本発明は、例えば8ビット単位で処理する
ことにより非常に高速で処理することができる。又、出
現頻度の高いデータについてのみ該データと連続個数あ
るいは出現頻度の少ないデータの組合わせによりデータ
の圧縮もしくは伸長を行うため、比較的簡単な構成で効
率の良い圧縮もしくは伸長が実現できる。
Effects of the Invention As described above, the present invention can perform processing at very high speed by processing, for example, in 8-bit units. In addition, since data compression or expansion is performed only on data that appears frequently, by combining the data with consecutive pieces of data or data that appears less frequently, efficient compression or expansion can be achieved with a relatively simple configuration.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図人は本発明の一実施例におけるデータ圧縮伸長装
置のデータ圧縮回路を示すブロック図、第1図B、0は
データの置換状態を示すデータ構成図、第2図人、Bは
本発明の詳細な説明するだめの図、第3図は同データ伸
長装置を示すブロック図である。 1・・・・・・データ記憶部、2・・・・・・出現頻度
計数部、3・・・・・・検出部、4・・・・・・同一デ
ータ連続数計数部、6−・・・・・圧縮データ記憶部、
(ム)・・・・・各データの出現頻度、■)・・・・・
・データ構造、10・・・・・・圧縮データ記憶部、1
1・・・・・・圧縮・置換対象データ記憶部、12・・
・・・・データ伸長部、13・・・・・復元データ記憶
部。 代理人の氏名 弁理士 中 尾 敏 男 ほか1名第1
図 MS8       LSB  MS8       
LSBJj:浬続個敗/128 J2:達続個妓/128の余り すなわち、達綬個数= J I $ 128+丁2第2
図 第3図 /Q      II
FIG. 1 is a block diagram showing a data compression circuit of a data compression/expansion device in an embodiment of the present invention; FIG. 1 is a data configuration diagram showing a data replacement state; FIG. FIG. 3 is a block diagram showing the data decompression device, which is not intended to explain the invention in detail. DESCRIPTION OF SYMBOLS 1... Data storage unit, 2... Appearance frequency counting unit, 3... Detecting unit, 4... Same data consecutive number counting unit, 6-... ...compressed data storage section,
(mu)... Frequency of appearance of each data, ■)...
・Data structure, 10... Compressed data storage section, 1
1... Data storage unit to be compressed/replaced, 12...
. . . Data decompression section, 13 . . . Restored data storage section. Name of agent: Patent attorney Toshio Nakao and 1 other person No. 1
Figure MS8 LSB MS8
LSBJj: 128 J2: 128 J2: Remainder of 128, the number of 128 = J I $ 128 + D2 2nd
Figure 3/Q II

Claims (2)

【特許請求の範囲】[Claims] (1)固定ビット長のデータ複数個を蓄積したり、伝送
したりする装置であって、同一データが出現する頻度を
計数する出現頻度計数手段と、計数結果から出現頻度の
多いデータN個と少ないデータM個を抽出する手段と、
同一データが何個連続しているかを計数する連続個数計
数手段とを有し、出現頻度の多いN個のデータについて
のみ前記連続個数計数手段により何個連続しているかを
計数し、N個を示す数値と、置換する連続個数を示す数
値と、出現頻度の多いN個のデータと、出現頻度の少な
いM個のデータを蓄積あるいは送出後、出現頻度の多い
データについては、該データと該データの連続個数、あ
るいは該データの連続個数に対応する出現頻度が少ない
データを蓄積あるいは送出し、出現頻度が少ないデータ
については、識別データと該データを蓄積あるいは送信
し、その他のデータについてはそのまま蓄積あるいは送
出することにより圧縮を行うことを特徴とするデータ圧
縮伸長装置。
(1) A device that stores and transmits multiple pieces of data with a fixed bit length, including appearance frequency counting means for counting the frequency at which the same data appears, and N pieces of data that appear frequently based on the counting results. A means for extracting M pieces of small data;
a continuous number counting means for counting the number of consecutive pieces of the same data; the number of consecutive pieces of data is counted by the continuous number counting means only for N pieces of data that appear frequently; After storing or sending the numerical value indicating the number of consecutive items to be replaced, the N data items that appear frequently, and the M pieces of data that appear less frequently, the data that appears frequently and the data or data that appears less frequently corresponding to the number of consecutive pieces of data is stored or sent, and for data that appears less frequently, the identification data and the data are stored or sent, and other data is stored as is. Alternatively, a data compression/expansion device is characterized in that compression is performed by sending data.
(2)出現頻度の少ないM個のデータについては対応す
るデータに置換し、出現頻度の多いN個のデータについ
てはデータと連続個数を示す数値を用いて繰り返し個数
分のデータに置換えることによりデータを伸長して復元
することを特徴とする特許請求範囲の第1項記載のデー
タ圧縮伸長装置。
(2) By replacing M pieces of data with a low frequency of appearance with corresponding data, and replacing N pieces of data with a high frequency of appearance with data for the number of repetitions using the data and a numerical value indicating the number of consecutive pieces. A data compression/decompression device according to claim 1, characterized in that the data compression/decompression device decompresses and restores data.
JP25009787A 1987-10-02 1987-10-02 Data compression/expansion device Pending JPH0193217A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25009787A JPH0193217A (en) 1987-10-02 1987-10-02 Data compression/expansion device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25009787A JPH0193217A (en) 1987-10-02 1987-10-02 Data compression/expansion device

Publications (1)

Publication Number Publication Date
JPH0193217A true JPH0193217A (en) 1989-04-12

Family

ID=17202768

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25009787A Pending JPH0193217A (en) 1987-10-02 1987-10-02 Data compression/expansion device

Country Status (1)

Country Link
JP (1) JPH0193217A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998043359A1 (en) * 1997-03-24 1998-10-01 Advantest Corporation Method and device for compressing and expanding data pattern
US6661839B1 (en) 1998-03-24 2003-12-09 Advantest Corporation Method and device for compressing and expanding data pattern

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5561171A (en) * 1978-10-31 1980-05-08 Nippon Telegr & Teleph Corp <Ntt> Tone code system for facsimile signal

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5561171A (en) * 1978-10-31 1980-05-08 Nippon Telegr & Teleph Corp <Ntt> Tone code system for facsimile signal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998043359A1 (en) * 1997-03-24 1998-10-01 Advantest Corporation Method and device for compressing and expanding data pattern
KR100341211B1 (en) * 1997-03-24 2002-08-22 가부시키가이샤 아드반테스트 Method of compressing and expanding data pattern and data pattern compressing and expanding apparatus
US6661839B1 (en) 1998-03-24 2003-12-09 Advantest Corporation Method and device for compressing and expanding data pattern

Similar Documents

Publication Publication Date Title
US7071853B2 (en) Method of compressing data packets
US5140321A (en) Data compression/decompression method and apparatus
JP3009727B2 (en) Improved data compression device
JPH01125028A (en) Method and apparatus for compression of compatible data
US20040075596A1 (en) Huffman data compression method
US6040790A (en) Method of building an adaptive huffman codeword tree
JPH0358207B2 (en)
JPS607300B2 (en) Japanese data compression method
JPH0193217A (en) Data compression/expansion device
US6292115B1 (en) Data compression for use with a communications channel
JPH0815262B2 (en) Data compression / decompression processor
US7930435B2 (en) Hub and spoke compression
SE9903191D0 (en) Compression and decompression coding scheme and apparatus
JPS63314031A (en) Data compressing/extending device
JP2830697B2 (en) Data processing device
JPH0628149A (en) Method for compressing plural kinds of data
JP2001282858A (en) Data acquisition device using log data compression method
JP3104302B2 (en) Data compression device
JP2003273746A (en) Variable length code decoder
CN100547934C (en) Code compression method
CN115102554A (en) Compression method of time sequence data, electronic equipment and storage medium
JPH0278323A (en) Data compression restoring system
JPS63176049A (en) Data compression system
JPH056260A (en) Japanese data compressing system
Robert et al. Fault-tolerant text data compression algorithms