JPH06332666A - Compressing method for data - Google Patents

Compressing method for data

Info

Publication number
JPH06332666A
JPH06332666A JP5118504A JP11850493A JPH06332666A JP H06332666 A JPH06332666 A JP H06332666A JP 5118504 A JP5118504 A JP 5118504A JP 11850493 A JP11850493 A JP 11850493A JP H06332666 A JPH06332666 A JP H06332666A
Authority
JP
Japan
Prior art keywords
data
compressed
value
location
character
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
JP5118504A
Other languages
Japanese (ja)
Inventor
Kazuo Suzuki
和夫 鈴木
Katsuhiro Utsunomiya
勝広 宇都宮
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.)
Hitachi Software Engineering Co Ltd
Original Assignee
Hitachi Software Engineering 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 Hitachi Software Engineering Co Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP5118504A priority Critical patent/JPH06332666A/en
Publication of JPH06332666A publication Critical patent/JPH06332666A/en
Pending legal-status Critical Current

Links

Landscapes

  • Document Processing Apparatus (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

PURPOSE:To facilitate the compression of text data for displaying a Japanese language document by rearranging characters in order of a larger frequency of a appearance and registering them in a file, and outputting a value of location from the head of the registered characters as compressed text data. CONSTITUTION:In a character-string of text data to be compressed, characters are sorted in order of a larger frequency of appearance, and each character is registered in a file 7 in sorted order. Subsequently, a value of location on the file 7 of each registered character is obtained, and by the value of location, each character of the text data to be compressed is represented. That is, each character of the text data to be compressed is converted into the value of location. Each converted character is outputted to a compressed data text file 8 as compressed text data. By excuting such data compression, the memory capacity for storing the compressed text data can be made small.

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, and more particularly to a data compression method suitable for displaying Japanese sentences on a portable information processing electronic device.

【0002】[0002]

【従来の技術】近年、半導体デバイス製造技術の急速な
進歩により、各種情報処理を行うことができる携帯型の
電子機器が開発されている。
2. Description of the Related Art In recent years, due to rapid progress in semiconductor device manufacturing technology, portable electronic equipment capable of performing various types of information processing has been developed.

【0003】このような携帯型の情報処理用電子機器、
例えば、電子手帳のような電子機器においては、表示用
メッセージなどのテキストデータを数多く取扱えること
が使い勝手を左右する一つの要因になっている。
Such a portable information processing electronic device,
For example, in an electronic device such as an electronic notebook, handling a large amount of text data such as a display message is one factor that affects usability.

【0004】これら表示用メッセージなどのテキストデ
ータを数多く取扱うためには大きなメモリ容量が必要で
あるが、前記電子手帳のような電子機器のメモリ容量は
4メガバイト程度に限られている。
A large memory capacity is required to handle a large amount of text data such as display messages, but the memory capacity of electronic equipment such as the electronic notebook is limited to about 4 megabytes.

【0005】この限られたメモリ容量内に数多くのテキ
ストデータを記憶するためには、テキストデータをでき
るだけ効率的に圧縮する必要がある。このため、様々な
データの圧縮方法が考えられている。
In order to store a large amount of text data in this limited memory capacity, it is necessary to compress the text data as efficiently as possible. Therefore, various data compression methods have been considered.

【0006】例えば、特開昭63−310018号公報
に開示されているデータ圧縮方法は、所定ビットの被圧
縮データが複数バイト分連続している場合のデータ列の
データ圧縮方法に関するものであり、ここで開示されて
いるデータの圧縮方法は、繰り返し部分の先頭の1バイ
トのデータに、この繰り返し部分が続く長さの情報を付
加することによってデータを圧縮する方法である。
For example, the data compression method disclosed in Japanese Laid-Open Patent Publication No. 63-310018 relates to a data compression method for a data string when the data to be compressed of a predetermined bit is continuous for a plurality of bytes. The data compression method disclosed here is a method of compressing data by adding information of the length of the repeated portion to the leading 1-byte data of the repeated portion.

【0007】このような繰返し部分が多く出現する例と
して、日本語ワード・プロセッサなどにおける漢字フォ
ントデータがある。この漢字フォントデータは、1つの
文字を、例えば、32×32ドットで表現した場合、各
ドットに対応した1024ビットのデータ列になる。
An example where many such repeated parts appear is Kanji font data in a Japanese word processor or the like. This Kanji font data is a 1024-bit data string corresponding to each dot when one character is represented by 32 × 32 dots, for example.

【0008】この1024ビットで表現された1文字の
データ列の中には、文字線が連続している部分に”
1”、あるいは文字線がない空白部分では”0”などの
データの繰り返し部分が多く出現する。
[0008] In the data string of one character represented by 1024 bits, the part where the character line is continuous is "
1 ", or a blank part without a character line, has many repeated parts of data such as" 0 ".

【0009】従って、前記データ圧縮方法は、漢字フォ
ントデータのような繰り返し部分が多く出現するデータ
の圧縮方法として有効な方法である。
Therefore, the data compression method is an effective method for compressing data such as Kanji font data in which many repetitive parts appear.

【0010】[0010]

【発明が解決しようとする課題】しかしながら、表示用
メッセージなどの文章(文字列)では、同一文字が連続
して出現することはまずあり得ないことであり、前記デ
ータ圧縮方法をテキストデータなどの圧縮に適用して
も、圧縮率が低くて実用にならないという問題がある。
However, in a sentence (character string) such as a display message, it is unlikely that the same characters will appear consecutively. Even if it is applied to compression, there is a problem that the compression rate is low and it is not practical.

【0011】本発明の目的は、携帯型の情報処理用電子
機器などで日本語文章を表示するためのテキストデータ
の圧縮を容易に行うことができるデータの圧縮方法を提
供することにある。
It is an object of the present invention to provide a data compression method capable of easily compressing text data for displaying a Japanese sentence on a portable information processing electronic device or the like.

【0012】[0012]

【課題を解決するための手段】前記目的を達成するため
に、本発明は、被圧縮テキストデータを構成する各文字
について該被圧縮テキストデータ中での出現回数を求め
た後、出現回数の多い順に文字を並べ替えてファイルに
登録し、その登録した文字のファイル上での先頭からの
ロケーションの値を被圧縮テキストデータの圧縮後のテ
キストデータとして出力することを特徴とする。
In order to achieve the above object, according to the present invention, after the number of appearances of each character constituting compressed text data is found in the compressed text data, the number of appearances is large. Characters are rearranged in order and registered in a file, and the value of the location of the registered character from the beginning on the file is output as compressed text data of the compressed text data.

【0013】[0013]

【作用】前記手段によれば、被圧縮テキストデータの文
字列の中で、出現回数の多い順に文字をソートし、各文
字がソートされた順にファイルに登録される。
According to the above means, in the character string of the compressed text data, the characters are sorted in descending order of appearance frequency, and each character is registered in the file in the sorted order.

【0014】次に、この登録された各文字のファイル上
でのロケーションの値が求められ、このロケーションの
値によって被圧縮テキストデータの各文字が表わされ
る。すなわち、被圧縮テキストデータの各文字がロケー
ションの値に変換されることになる。
Next, the value of the location of each registered character on the file is obtained, and each character of the compressed text data is represented by the value of this location. That is, each character of the compressed text data is converted into a location value.

【0015】このロケーションの値に変換された各文字
は、圧縮後のテキストデータとして出力される。
Each character converted to this location value is output as compressed text data.

【0016】このようなデータの圧縮が行われることに
より、圧縮後のテキストデータを記憶するメモリ容量を
小さくすることができる。また、メモリ容量が限られて
いる場合は、より多くのテキストデータが記憶されるこ
とになる。
By performing such data compression, it is possible to reduce the memory capacity for storing the compressed text data. If the memory capacity is limited, more text data will be stored.

【0017】[0017]

【実施例】以下、本発明の実施例を図面を用いて詳細に
説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0018】図1は、本発明の一実施例の全体構成を示
すブロック構成図である。図1において、1はコマンド
などを入力するための入力装置、2はデータ処理結果な
どを表示するための表示装置、3はデータ処理を行う処
理装置(CPU)、4はプログラムやデータを記憶する
ためのメインメモリである。
FIG. 1 is a block diagram showing the overall construction of an embodiment of the present invention. In FIG. 1, 1 is an input device for inputting commands and the like, 2 is a display device for displaying data processing results, 3 is a processing device (CPU) for performing data processing, 4 is a program and data storage Is the main memory for.

【0019】また、5はデータ圧縮プログラム51、デ
ータ伸長プログラム52などを記憶している外部記憶装
置である。
An external storage device 5 stores a data compression program 51, a data decompression program 52 and the like.

【0020】6は圧縮対象のテキストを記憶しているテ
キストファイル、7はデータの圧縮・伸長に使用するた
めのファイル、8は圧縮後のデータを記憶する圧縮デー
タテキストファイル、9は各種装置を接続するためのバ
スラインである。
6 is a text file storing the text to be compressed, 7 is a file used for data compression / decompression, 8 is a compressed data text file for storing the compressed data, and 9 is various devices. It is a bus line for connecting.

【0021】図2はデータの圧縮・伸長の処理に必要な
各種テーブルを説明するための説明図である。図2にお
いて、41はデータを圧縮・伸長する工程において作成
される各種テーブルを集めたメインメモリ4内のテーブ
ルである。
FIG. 2 is an explanatory diagram for explaining various tables necessary for data compression / decompression processing. In FIG. 2, reference numeral 41 is a table in the main memory 4 in which various tables created in the process of compressing / decompressing data are collected.

【0022】42は圧縮対象文章である被圧縮テキス
ト、43は被圧縮テキスト42の文字列から同一文字を
出現回数の多い順にソートした出現回数ソートテーブル
であり、出現回数の多い順にソートした文字列431、
同一文字の出現回数432、ファイル7上での先頭から
のロケーション433により構成される。
Reference numeral 42 is a compressed text which is a text to be compressed, and 43 is an appearance count sort table in which the same characters are sorted from the character string of the compressed text 42 in descending order of appearance count. 431,
The number of appearances of the same character 432 and the location 433 from the beginning on the file 7 are included.

【0023】図2において、例えば被圧縮テキスト42
の文字列の中で、「、(コンマ)」、「文」、「字」、
「を」および「し」が3回、「圧」、「縮」が2回、
「列」、「こ」、「の」および「は」がそれぞれ1回出
現しているので、出現回数ソートテーブル43の出現回
数432の欄にそれぞれの出現回数「3」、「2」、
「1」と書き込まれる。
In FIG. 2, for example, the compressed text 42
In the character string of, ", (comma)", "sentence", "character",
"O" and "shi" three times, "pressure", "contraction" twice,
Since “column”, “ko”, “no”, and “ha” each appear once, the number of occurrences “3”, “2”, and
Written as "1".

【0024】この時、同一文字が何回出現したとして
も、各文字が1度だけファイル7に登録される。その
際、ファイル7上での先頭からのロケーションの値が出
現回数ソートテーブル43上のロケーション433の欄
に書き込まれる。
At this time, no matter how many times the same character appears, each character is registered in the file 7 only once. At this time, the value of the location from the beginning on the file 7 is written in the location 433 column on the appearance count sort table 43.

【0025】また、44は被圧縮テキスト42の文字列
441と、ファイル7上での先頭からのロケーションA
442と、ロケーションA442の値に「9」を加算し
て新しく設定したロケーションB443の値とから構成
されるロケーションテーブルである。
Further, 44 is a character string 441 of the compressed text 42 and a location A from the beginning on the file 7.
It is a location table composed of 442 and the value of location B443 newly set by adding "9" to the value of location A442.

【0026】また、45はロケーションB443の値を
16進数で表わした圧縮データテキストテーブルであ
リ、文字列431に対応する値が1バイトおよび2バイ
トで表わされている。
Reference numeral 45 is a compressed data text table in which the value of the location B443 is expressed in hexadecimal, and the value corresponding to the character string 431 is expressed in 1 byte and 2 bytes.

【0027】例えば、圧縮データテキストテーブル45
に書き込まれている圧縮データの値「11」451は、
ロケーションB443に書き込まれているロケーション
の値「17」444を16進数で表したものであり、1
バイトで表すことができる。
For example, the compressed data text table 45
The compressed data value “11” 451 written in
The value "17" 444 of the location written in the location B443 is represented by a hexadecimal number.
It can be expressed in bytes.

【0028】また、圧縮データテキストテーブル45に
書き込まれている圧縮データの値「0109」452
は、ロケーションB443に書き込まれているロケーシ
ョンの値「265」445を16進数で表わしたもので
あり、2バイトを必要としている。
The value of the compressed data written in the compressed data text table 45 is "0109" 452.
Is a hexadecimal representation of the location value "265" 445 written in location B443 and requires 2 bytes.

【0029】さらに、46は圧縮されたデータの伸長処
理に使用するテーブルであり、1バイト目のデータを読
み込むためのワークエリアM1461と2バイト目のデ
ータを読み込むためのワークエリアM2462とから構
成される。
Further, 46 is a table used for decompressing the compressed data, which is a work area M 1 461 for reading the first byte data and a work area M 2 462 for reading the second byte data. Composed of and.

【0030】図3はデータの圧縮処理の手順を示すフロ
ーチャートである。以下、図3を用いてデータの圧縮処
理の手順を説明する。
FIG. 3 is a flow chart showing the procedure of data compression processing. The procedure of data compression processing will be described below with reference to FIG.

【0031】まず、前記図1における入力装置1からデ
ータ圧縮プログラム51を起動するコマンドが入力され
ると、処理装置(CPU)3は、外部記憶装置5からデ
ータ圧縮プログラム51をメインメモリ4に読み込み、
データ圧縮プログラム51の実行が開始される。
First, when a command for starting the data compression program 51 is input from the input device 1 in FIG. 1, the processing device (CPU) 3 reads the data compression program 51 from the external storage device 5 into the main memory 4. ,
The execution of the data compression program 51 is started.

【0032】図3において、データ圧縮プログラム51
は、まずテキストファイル6から被圧縮テキスト42を
メインメモリ4に読み込む(ステップ301)。
In FIG. 3, the data compression program 51
First reads the compressed text 42 from the text file 6 into the main memory 4 (step 301).

【0033】次に、読み込んだ被圧縮テキスト42を先
頭から1文字づつサーチして同一文字の出現回数を求
め、出現回数の多い順にソートする(ステップ30
2)。
Next, the compressed text 42 that has been read is searched character by character from the beginning to find the number of appearances of the same character, and sorted in descending order of the number of appearances (step 30).
2).

【0034】この段階で、ソートした文字列431をフ
ァイル7に登録する(ステップ303)。
At this stage, the sorted character string 431 is registered in the file 7 (step 303).

【0035】次に、ファイル7に登録した文字列431
のファイル7上での先頭からのロケーションの値を求め
る(ステップ304)。
Next, the character string 431 registered in the file 7
The value of the location from the beginning on the file 7 is obtained (step 304).

【0036】そして、メインメモリ4に読み込まれた被
圧縮テキスト42の各文字をステップ304で求めたロ
ケーションの値で表わす(ステップ305)。
Then, each character of the compressed text 42 read into the main memory 4 is represented by the value of the location obtained in step 304 (step 305).

【0037】例えば、被圧縮テキスト42の先頭の文字
「こ」はロケーション433の値が「8」に該当するた
め「8」として表わされる。また、「プログラム」の
「プ」は、ロケーションの値が「256」のため、「2
56」として表わされる。
For example, the first character "ko" of the compressed text 42 is represented as "8" because the value of the location 433 corresponds to "8". In addition, since the value of location is "256", "2" in "Program" is "2".
56 ".

【0038】こうしてロケーションA442の値が求ま
ると、ロケーションA442の値に「9」を加算してロ
ケーションB433の値を求める(ステップ306)。
これは、ロケーションの値を1バイトで表わせるもの
と、2バイト必要なものとがあるためであり、データの
伸長処理において、ロケーションの値が1バイトか2バ
イトかの識別を可能にするための処理である。
When the value of the location A442 is obtained in this way, "9" is added to the value of the location A442 to obtain the value of the location B433 (step 306).
This is because there are those that can express the location value with 1 byte and those that require 2 bytes, so that it is possible to identify whether the location value is 1 byte or 2 bytes in the data decompression process. Processing.

【0039】例えば前記図2において、ロケーションテ
ーブル44の文字列441の欄の先頭の文字「こ」はロ
ケーションA442の値が「8」であり、文字列441
の欄の「プ」はロケーションA442の値が「256」
である。ここで「こ」はロケーションの値を1バイトで
表わせるが、「プ」は2バイト必要になる。
For example, in FIG. 2 described above, the first character “ko” in the column of the character string 441 of the location table 44 has the value of the location A 442 is “8” and the character string 441.
The value of location A442 is "256"
Is. Here, "ko" can represent the location value in 1 byte, but "pu" requires 2 bytes.

【0040】以上の処理が終了すると、ロケーションB
443の値を圧縮データテキストファイル8に登録して
データの圧縮処理が完了する(ステップ307)。
When the above processing is completed, location B
The value of 443 is registered in the compressed data text file 8 and the data compression processing is completed (step 307).

【0041】図2の圧縮データテキストテーブル45
は、圧縮データテキストファイル8に登録されたデータ
と同じ内容を表わしたものである。
The compressed data text table 45 of FIG.
Represents the same contents as the data registered in the compressed data text file 8.

【0042】すなわち、ロケーションB443の値を1
6進数で示したものであり、圧縮データテキストテーブ
ル45の値「11」451は文字列441の「こ」に対
応し1バイトで表わされている。
That is, the value of location B443 is set to 1
The value "11" 451 in the compressed data text table 45 is represented by a hexadecimal number and corresponds to "ko" in the character string 441 and is represented by 1 byte.

【0043】また、圧縮データテキストテーブル45の
値「0109」452は文字列441の「プ」に対応し
て2バイトで表わされている。
The value "0109" 452 of the compressed data text table 45 is represented by 2 bytes corresponding to the "p" of the character string 441.

【0044】図4はデータの伸長処理の手順を説明する
ためのフローチャートである。以下、図4のフローチャ
ートを用いてデータの伸長処理手順について説明する。
FIG. 4 is a flow chart for explaining the procedure of data decompression processing. The data decompression processing procedure will be described below with reference to the flowchart of FIG.

【0045】まず、前記図1における入力装置1からデ
ータ伸長プログラム52を起動するコマンドが入力され
ると、処理装置(CPU)3は、外部記憶装置5からデ
ータ伸長プログラム52をメインメモリ4に読み込み、
データ伸長プログラム52の実行が開始される。
First, when a command to activate the data decompression program 52 is input from the input device 1 in FIG. 1, the processing device (CPU) 3 reads the data decompression program 52 from the external storage device 5 into the main memory 4. ,
The execution of the data decompression program 52 is started.

【0046】図4において、データ伸長プログラム52
は圧縮データテキストファイル8から1バイト分のデー
タをワークエリアM1461に読み込む(ステップ40
1)。
In FIG. 4, the data decompression program 52
Reads 1 byte of data from the compressed data text file 8 into the work area M 1 461 (step 40
1).

【0047】1バイト分のデータを読み込んだ後、デー
タがあるか否かを確認し(ステップ402)、データが
なければ処理を終了する。
After reading 1-byte data, it is confirmed whether or not there is data (step 402), and if there is no data, the process is terminated.

【0048】ステップ402において、データがある場
合は、読み込んだデータの値(M1の値)が16進数の
「09」以上か否かを判定する(ステップ403)。
If there is data in step 402, it is determined whether or not the value of the read data (the value of M 1 ) is hexadecimal "09" or more (step 403).

【0049】ここで、読み込んだデータの値(M1
値)が「09」以上の場合、この圧縮データは1バイト
で表現されているロケーションの値であるので、ワーク
エリアM1461に読み込まれた値から「9」を減算す
る(ステップ404)。これは、データ圧縮時にロケー
ションの値に「9」が加算されているためである。
Here, when the value of the read data (the value of M 1 ) is "09" or more, this compressed data is the value of the location represented by 1 byte, and thus is read into the work area M 1 461. "9" is subtracted from the calculated value (step 404). This is because "9" is added to the value of the location when the data is compressed.

【0050】次に、ファイル7上での先頭からのロケー
ションの値がワークエリアM1461に読み込まれた値
に該当する文字をメインメモリ4に読み込むことによ
り、元の文字に変換する(ステップ405)。
Next, the character whose position value from the beginning on the file 7 corresponds to the value read into the work area M 1 461 is read into the main memory 4 to be converted into the original character (step 405). ).

【0051】一方、読み込まれたデータの値(M1
値)が16進数の「09」以下の場合、この圧縮データ
は2バイトで表現されているロケーションの値であるの
で、次の1バイト分のデータをワークエリアM2462
に読み込み(ステップ407)、ワークエリアM146
1、M2462に読み込まれた値から「9」を減算する
(ステップ408)。
On the other hand, when the value of the read data (the value of M 1 ) is less than or equal to the hexadecimal number "09", this compressed data is the value of the location expressed by 2 bytes, so the next 1 byte Minute data to work area M 2 462
Read in (step 407), work area M 1 46
1, "9" is subtracted from the value read in M 2 462 (step 408).

【0052】次に、ファイル7上での先頭からのロケー
ションの値がワークエリアM1461、M2462に読み
込まれた値に該当する文字をメインメモリ4に読み込む
ことにより、元の文字に変換する(ステップ409)。
Next, the character whose position value from the beginning on the file 7 corresponds to the value read into the work areas M 1 461 and M 2 462 is read into the main memory 4 to be converted into the original character. (Step 409).

【0053】こうして圧縮データテキストファイル8の
データがなくなるまで前記処理を繰り返すことにより、
圧縮されたデータに対する伸長処理を行うことができ
る。
By repeating the above processing until there is no data in the compressed data text file 8 in this way,
Decompression processing can be performed on compressed data.

【0054】以上説明したデータ圧縮・伸長処理は、一
般的にパーソナルソンピュータなど比較的容量の大きな
処理装置上で行われる。
The data compression / decompression process described above is generally performed on a processing device having a relatively large capacity, such as a personal computer.

【0055】このように、データの圧縮処理を終了した
後、ファイル7、圧縮データテキストファイル8及びデ
ータ伸長プログラム52を携帯型の情報処理用電子機器
などにダウンロードしておくことにより、圧縮後のテキ
ストデータを必要に応じて伸長し、表示するなどの処理
を行うことができる。
In this way, after the data compression processing is completed, the file 7, the compressed data text file 8 and the data decompression program 52 are downloaded to a portable information processing electronic device or the like, so that the data after the compression is compressed. Processing such as decompressing the text data and displaying it can be performed.

【0056】これにより、メモリ容量が4メガバイト程
度の前記電子手帳のような電子機器であっても、1文字
のフォントのサイズが40×40、あるいは48×48
ドットの場合に、文章(文字列)として約2000文字
種程度までのテキストデータの表示を行うことができ
る。
As a result, even in an electronic device such as the electronic notebook having a memory capacity of about 4 megabytes, the font size of one character is 40 × 40 or 48 × 48.
In the case of dots, text data of up to about 2000 character types can be displayed as a sentence (character string).

【0057】なお、本実施例では、圧縮率を上げるため
に圧縮後のデータはロケーションの値が「255」以下
のものは1バイトで表わし、ロケーションの値が「25
6」以上のものは2バイトで表わす例を説明したが、こ
れ以外のビット構成であってもよい。
In the present embodiment, in order to increase the compression rate, the data after the compression has a location value of "255" or less is represented by 1 byte, and the location value has a value of "25".
Although an example in which "6" or more is represented by 2 bytes has been described, other bit configurations may be used.

【0058】また、本実施例ではロケーション433の
値に「9」を加算することにより1バイトか2バイトか
の識別をするようにしたが、これは「9」に限定される
ものではなく、圧縮後の文字数を推定して最適な値を設
定すればよい。
Further, in the present embodiment, "9" is added to the value of the location 433 to identify whether it is 1 byte or 2 bytes, but this is not limited to "9". The optimum number may be set by estimating the number of characters after compression.

【0059】また、本実施例では、パーソナルコンピュ
ータなどから携帯型の情報処理用電子機器などへのデー
タやプログラムのダウンロードの方法については、一般
的に行われている方法を用いるため説明を省略する。
Further, in the present embodiment, the method of downloading the data or program from the personal computer or the like to the portable information processing electronic device or the like is a commonly used method, and the description thereof will be omitted. .

【0060】[0060]

【発明の効果】以上述べたように本発明によれば、被圧
縮テキストデータを構成する各文字について該被圧縮テ
キストデータ中での出現回数を求めた後、出現回数の多
い順に文字を並べ替えてファイルに登録し、その登録し
た文字のファイル上での先頭からのロケーションの値を
被圧縮テキストデータの圧縮後のテキストデータとして
出力するので、日本語文章(文字列)を表示するための
テキストデータの圧縮を容易に行うことができる。
As described above, according to the present invention, the number of appearances in each character forming the compressed text data is found in the compressed text data, and then the characters are rearranged in the descending order of the number of appearances. Registered in the file and the value of the location of the registered character from the beginning in the file is output as the compressed text data of the compressed text data, so the text for displaying Japanese sentences (character strings) Data can be easily compressed.

【0061】また、この圧縮後のテキストデータを用い
ることにより、電子手帳のような携帯型の情報処理用電
子機器のようにメモリ容量が小さい電子機器であって
も、数多くのテキストデータを取扱うことができるとい
う効果がある。
By using the compressed text data, a large amount of text data can be handled even with an electronic device having a small memory capacity such as a portable information processing electronic device such as an electronic notebook. There is an effect that can be.

【0062】また、前記ロケーションの値は、前記ファ
イル上でのロケーションの値に応じて1バイトまたはと
2バイトで構成されているので、データの伸長処理も前
記圧縮処理の逆の手順により比較的簡単な処理で効率良
く行うことができる。
Further, since the value of the location is composed of 1 byte or 2 bytes depending on the value of the location on the file, the data decompression process is relatively performed by the reverse procedure of the compression process. It can be performed efficiently with simple processing.

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

【図1】 本発明の一実施例の全体構成を示すブロック
構成図である。
FIG. 1 is a block configuration diagram showing an overall configuration of an embodiment of the present invention.

【図2】 実施例のデータの圧縮・伸長処理に必要なテ
ーブルを説明するための説明図である。
FIG. 2 is an explanatory diagram for explaining a table required for data compression / decompression processing according to the embodiment.

【図3】 実施例のデータの圧縮処理の手順を示すフロ
チャートである。
FIG. 3 is a flowchart showing a procedure of data compression processing according to the embodiment.

【図4】 実施例のデータの伸長処理の手順を示すフロ
チャートである。
FIG. 4 is a flowchart showing a procedure of data decompression processing according to the embodiment.

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

1…入力装置、2…表示装置、3…処理装置(CP
U)、4…メインメモリ、41…メインメモリ内のテー
ブル、42…被圧縮テキスト、43…出現回数ソートテ
ーブル、44…ロケーションテーブル、45…圧縮デー
タテキストテーブル、5…外部記憶装置、6…テキスト
ファイル、7…ファイル、8…圧縮データテキストファ
イル、9…バスライン。
1 ... Input device, 2 ... Display device, 3 ... Processing device (CP
U), 4 ... Main memory, 41 ... Main memory table, 42 ... Compressed text, 43 ... Occurrence count sort table, 44 ... Location table, 45 ... Compressed data text table, 5 ... External storage device, 6 ... Text File, 7 ... File, 8 ... Compressed data text file, 9 ... Bus line.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 被圧縮テキストデータを構成する各文字
について該被圧縮テキストデータ中での出現回数を求め
た後、出現回数の多い順に文字を並べ替えてファイルに
登録し、その登録した文字のファイル上での先頭からの
ロケーションの値を被圧縮テキストデータの圧縮後のテ
キストデータとして出力することを特徴とするデータの
圧縮方法。
1. After obtaining the number of appearances of each character forming the compressed text data in the compressed text data, the characters are rearranged in the descending order of the number of appearances and registered in a file. A method for compressing data, wherein the value of the location from the beginning on the file is output as the compressed text data of the compressed text data.
【請求項2】 前記ロケーションの値は、前記ファイル
上でのロケーションに応じて1バイトまたは2バイトで
構成されることを特徴とする請求項1記載のデータの圧
縮方法。
2. The method of compressing data according to claim 1, wherein the value of the location is composed of 1 byte or 2 bytes depending on the location on the file.
JP5118504A 1993-05-20 1993-05-20 Compressing method for data Pending JPH06332666A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5118504A JPH06332666A (en) 1993-05-20 1993-05-20 Compressing method for data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5118504A JPH06332666A (en) 1993-05-20 1993-05-20 Compressing method for data

Publications (1)

Publication Number Publication Date
JPH06332666A true JPH06332666A (en) 1994-12-02

Family

ID=14738302

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5118504A Pending JPH06332666A (en) 1993-05-20 1993-05-20 Compressing method for data

Country Status (1)

Country Link
JP (1) JPH06332666A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003523564A (en) * 1999-12-23 2003-08-05 ゼントロニクス プロプライエタリー リミテッド Method for storing and retrieving minified data
JP2004015743A (en) * 2002-06-11 2004-01-15 Vehicle Information & Communication System Center Compressing/encoding/transmitting apparatus and method, and decompressing/decoding/receiving apparatus and method for road traffic information

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003523564A (en) * 1999-12-23 2003-08-05 ゼントロニクス プロプライエタリー リミテッド Method for storing and retrieving minified data
JP2004015743A (en) * 2002-06-11 2004-01-15 Vehicle Information & Communication System Center Compressing/encoding/transmitting apparatus and method, and decompressing/decoding/receiving apparatus and method for road traffic information

Similar Documents

Publication Publication Date Title
JP3152868B2 (en) Search device and dictionary / text search method
JPH0756955A (en) Method and system for search of compressed data
US20140059075A1 (en) Extracting method, information processing method, computer product, extracting apparatus, and information processing apparatus
KR100495593B1 (en) File processing method, data processing device, and storage medium
US6834283B1 (en) Data compression/decompression apparatus using additional code and method thereof
JP5549177B2 (en) Compression program, method and apparatus, and decompression program, method and apparatus
JPH06332666A (en) Compressing method for data
JPH0546358A (en) Compressing method for text data
JPH0554077A (en) Word dictionary retriever
JPH0546357A (en) Compressing method and restoring method for text data
JPH0140370B2 (en)
JPH07182354A (en) Method for generating electronic document
JP4329493B2 (en) Dictionary data compression apparatus, electronic dictionary apparatus, and program
JPH0140372B2 (en)
JP4345438B2 (en) Dictionary data compression apparatus, electronic dictionary apparatus, and program
JP3236747B2 (en) Data decompression method
JP2772125B2 (en) Dictionary search method
JP3155600B2 (en) Information retrieval device
JPH06187371A (en) Storing method and reading method for compressed place name data
JPH069043B2 (en) Character processing method
JP3603099B2 (en) Method and apparatus for lossless encoding of data
JP2865446B2 (en) Sentence processing equipment
JPH0194473A (en) Japanese input device
JPH05342195A (en) Dictionary retrieving method
JPS61285573A (en) Kana-to-kanji converting device