JP4640382B2 - Data file compression apparatus, program, and data file compression method - Google Patents
Data file compression apparatus, program, and data file compression method Download PDFInfo
- Publication number
- JP4640382B2 JP4640382B2 JP2007166533A JP2007166533A JP4640382B2 JP 4640382 B2 JP4640382 B2 JP 4640382B2 JP 2007166533 A JP2007166533 A JP 2007166533A JP 2007166533 A JP2007166533 A JP 2007166533A JP 4640382 B2 JP4640382 B2 JP 4640382B2
- Authority
- JP
- Japan
- Prior art keywords
- compression
- compressed
- file
- data
- instruction
- 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
Links
Images
Landscapes
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Description
本発明は、データファイルを圧縮するデータファイル圧縮装置、プログラム及びデータファイル圧縮方法に関する。 The present invention relates to a data file compression apparatus, a program, and a data file compression method for compressing a data file.
データファイルを圧縮するための圧縮方式には様々なものがある。例えば、データファイルのビットパターンの配列に着目して圧縮を行う圧縮方式として、RLE(Run Length Encoding)方式、LZ(Lempel Ziv)方式などがあり、データファイルのビットパターンの発生頻度に着目して圧縮を行う前記圧縮方式として、Huffman方式、Arithmetic方式、Range Coder方式などがある。そして、データファイルの圧縮効率を高くするため、データファイルを全ての圧縮方式で圧縮し、生成された全ての圧縮ファイルを比較して最も圧縮効率が高い圧縮ファイルのみを残す技術が知られている(例えば、特許文献1参照)。この技術によると、結果として、全ての圧縮方式のうち最も圧縮効率が高い圧縮方式でデータファイルを圧縮することができる。 There are various compression methods for compressing data files. For example, there are RLE (Run Length Encoding) method, LZ (Lempel Ziv) method, etc. as compression methods for performing compression by paying attention to the bit pattern arrangement of the data file, and paying attention to the occurrence frequency of the bit pattern of the data file. Examples of the compression method for performing compression include a Huffman method, an Arithmatic method, and a Range Coder method. In order to increase the compression efficiency of the data file, a technique is known in which the data file is compressed by all the compression methods, and all the generated compressed files are compared to leave only the compressed file having the highest compression efficiency. (For example, refer to Patent Document 1). According to this technology, as a result, the data file can be compressed by a compression method having the highest compression efficiency among all the compression methods.
データファイルの内容によっては、1つの圧縮方式で圧縮された圧縮ファイルを、さらに他の圧縮方式で圧縮する2重圧縮を用いることによって、より圧縮効率が高い圧縮ファイルを得ることができる場合がある。しかしながら、複数の圧縮方式の全てにおいて2重圧縮の全ての圧縮手順を検証しようとすると、圧縮手順の数が膨大になり、データファイルの圧縮に時間がかかりすぎてしまう。 Depending on the contents of the data file, there may be a case where a compressed file with higher compression efficiency can be obtained by using double compression in which a compressed file compressed by one compression method is further compressed by another compression method. . However, if it is attempted to verify all the compression procedures of the double compression in all of the plurality of compression methods, the number of compression procedures becomes enormous, and it takes too much time to compress the data file.
そこで、本発明は、データファイルを高い圧縮効率で素早く圧縮することができるデータファイル圧縮装置、プログラム及びデータファイル圧縮方法を提供することを目的とする。 Therefore, an object of the present invention is to provide a data file compression apparatus, a program, and a data file compression method capable of quickly compressing a data file with high compression efficiency.
本発明のデータファイル圧縮装置は、互いに異なる複数の圧縮方式から選択されたいずれかの圧縮方式でデータファイルを圧縮するデータ圧縮手段と、データファイルを前記複数の圧縮方式のそれぞれで圧縮することを前記データ圧縮手段に指示する第1圧縮指示手段と、前記第1圧縮指示手段の指示により前記データ圧縮手段が生成した複数の圧縮ファイルに基づいて、前記複数の圧縮方式における、ビットパターンの配列に着目して圧縮を行う前記圧縮方式の中で最も圧縮効率が高い前記圧縮方式である第1圧縮方式と、ビットパターンの発生頻度に着目して圧縮を行う前記圧縮方式の中で最も圧縮効率が高い前記圧縮方式である第2圧縮方式とを検出する検出手段と、前記第1圧縮方式で圧縮された圧縮ファイルをさらに前記第2圧縮方式で圧縮すること、及び、前記第2圧縮方式で圧縮された圧縮ファイルをさらに前記第1圧縮方式で圧縮することを前記データ圧縮手段に指示する第2圧縮指示手段とを備えている。さらに、前記第1及び第2圧縮指示手段のそれぞれの指示により前記データ圧縮手段が生成した複数の圧縮ファイルのうち、最も圧縮効率が高い圧縮ファイルを選択する選択手段とを備えている。 A data file compression apparatus according to the present invention includes a data compression unit that compresses a data file by any one of a plurality of different compression methods, and compresses the data file by each of the plurality of compression methods. Based on the first compression instruction means for instructing the data compression means and the plurality of compressed files generated by the data compression means in accordance with the instruction of the first compression instruction means, the bit pattern arrangement in the plurality of compression methods The first compression method, which is the compression method having the highest compression efficiency among the compression methods performing compression by paying attention, and the compression efficiency having the highest compression efficiency among the compression methods performing compression by paying attention to the occurrence frequency of bit patterns. Detection means for detecting a high second compression method, and a second compressed file further compressed by the first compression method. Compressing the formula, and, and a second compression instruction means for instructing said data compressing means to compress in the further first compression method compressed compressed file in the second compression system. And a selecting means for selecting a compressed file having the highest compression efficiency among a plurality of compressed files generated by the data compressing means in accordance with instructions from the first and second compression instructing means.
本発明のプログラムは、互いに異なる複数の圧縮方式から選択されたいずれかの圧縮方式でデータファイルを圧縮するデータ圧縮手段、データファイルを前記複数の圧縮方式のそれぞれで圧縮することを前記データ圧縮手段に指示する第1圧縮指示手段、前記第1圧縮指示手段の指示により前記データ圧縮手段が生成した複数の圧縮ファイルに基づいて、前記複数の圧縮方式における、ビットパターンの配列に着目して圧縮を行う前記圧縮方式の中で最も圧縮効率が高い前記圧縮方式である第1圧縮方式と、ビットパターンの発生頻度に着目して圧縮を行う前記圧縮方式の中で最も圧縮効率が高い前記圧縮方式である第2圧縮方式とを検出する検出手段、前記第1圧縮方式で圧縮された圧縮ファイルをさらに前記第2圧縮方式で圧縮すること、及び、前記第2圧縮方式で圧縮された圧縮ファイルをさらに前記第1圧縮方式で圧縮することを前記データ圧縮手段に指示する第2圧縮指示手段、及び、前記第1及び第2圧縮指示手段のそれぞれの指示により前記データ圧縮手段が生成した複数の圧縮ファイルのうち、最も圧縮効率が高い圧縮ファイルを選択する選択手段としてコンピュータを機能させる。 The program according to the present invention includes a data compression unit that compresses a data file using any one of a plurality of different compression methods, and the data compression unit that compresses a data file using each of the plurality of compression methods. Based on the plurality of compressed files generated by the data compression unit in response to an instruction from the first compression instruction unit, the compression is performed focusing on the bit pattern arrangement in the plurality of compression methods. The first compression method that is the compression method with the highest compression efficiency among the compression methods to be performed and the compression method with the highest compression efficiency among the compression methods that perform compression by focusing on the occurrence frequency of bit patterns Detection means for detecting a certain second compression method, and further compressing the compressed file compressed by the first compression method by the second compression method And a second compression instruction means for instructing the data compression means to further compress the compressed file compressed by the second compression method by the first compression method, and the first and second compression instruction means. The computer is caused to function as a selection unit that selects a compressed file having the highest compression efficiency among a plurality of compressed files generated by the data compression unit according to each instruction.
本発明のデータファイル圧縮方法は、データファイルを互いに異なる複数の圧縮方式のそれぞれで圧縮する第1圧縮工程と、前記第1圧縮工程において生成した複数の圧縮ファイルに基づいて、前記複数の圧縮方式における、ビットパターンの配列に着目して圧縮を行う前記圧縮方式の中で最も圧縮効率が高い前記圧縮方式である第1圧縮方式と、ビットパターンの発生頻度に着目して圧縮を行う前記圧縮方式の中で最も圧縮効率が高い前記圧縮方式である第2圧縮方式とを検出する検出工程と、前記第1圧縮方式で圧縮された圧縮ファイルをさらに前記第2圧縮方式で圧縮すること、及び、前記第2圧縮方式で圧縮された圧縮ファイルをさらに前記第1圧縮方式で圧縮することを前記データ圧縮手段に指示する第2圧縮工程とを備えている。さらに、前記第1及び第2圧縮工程のそれぞれにおいて生成した複数の圧縮ファイルのうち、最も圧縮効率が高い圧縮ファイルを選択する選択工程とを備えている。 The data file compression method according to the present invention includes a first compression step of compressing a data file with a plurality of different compression methods, and a plurality of compression methods based on the plurality of compressed files generated in the first compression step. The first compression method that is the compression method having the highest compression efficiency among the compression methods that perform compression focusing on the arrangement of bit patterns, and the compression method that performs compression focusing on the frequency of occurrence of bit patterns A detection step of detecting the second compression method, which is the compression method having the highest compression efficiency, and further compressing the compressed file compressed by the first compression method by the second compression method; and A second compression step for instructing the data compression means to further compress the compressed file compressed by the second compression method using the first compression method.And a selecting step of selecting a compressed file having the highest compression efficiency among the plurality of compressed files generated in each of the first and second compression steps.
本発明の発明者は、ビットパターンの配列に着目して圧縮を行う圧縮方式と、ビットパターンの発生頻度に着目して圧縮を行う圧縮方式とで2重圧縮を行ったときに、圧縮効率が大きく異なることを知見した。したがって、これら本発明によると、ビットパターンの配列に着目して圧縮を行う圧縮方式の中で最も圧縮効率が高い第1圧縮方式と、ビットパターンの発生頻度に着目して圧縮を行う圧縮方式の中で最も圧縮効率が高い第2圧縮方式とを検出し、これらの間でのみ2重圧縮の圧縮手順を検証することで圧縮効率の高い圧縮手順を効率よく特定することができる。これにより、全ての圧縮方式について2重圧縮の圧縮手順を検証する場合と比較して、圧縮効率の高い圧縮ファイルを素早く生成することができる。 The inventor of the present invention achieves compression efficiency when double compression is performed using a compression method that performs compression by focusing on the arrangement of bit patterns and a compression method that performs compression by focusing on the occurrence frequency of bit patterns. I found that it was very different. Therefore, according to the present invention, the first compression method having the highest compression efficiency among the compression methods that perform compression by focusing on the arrangement of bit patterns and the compression method that performs compression by focusing on the frequency of occurrence of bit patterns. By detecting the second compression method having the highest compression efficiency among them and verifying the compression procedure of the double compression only between them, it is possible to efficiently specify the compression procedure with the high compression efficiency. Thereby, compared with the case where the compression procedure of double compression is verified about all the compression systems, the compression file with high compression efficiency can be produced | generated rapidly.
本発明においては、前記複数の圧縮方式における、ビットパターンの配列に着目して圧縮を行う前記圧縮方式が、RLE(Run Length Encoding)方式及びLZ(Lempel Ziv)方式の少なくともいずれかであり、ビットパターンの発生頻度に着目して圧縮を行う前記圧縮方式が、Huffman方式、Arithmetic方式及びRange Coder方式の少なくともいずれかであってもよい。 In the present invention, in the plurality of compression schemes, the compression scheme that performs compression focusing on the bit pattern arrangement is at least one of the RLE (Run Length Encoding) scheme and the LZ (Lempel Ziv) scheme, The compression method that performs compression by paying attention to the occurrence frequency of the pattern may be at least one of the Huffman method, the Arithmatic method, and the Range Coder method.
また、本発明においては、外部から供給されたデータファイルを記憶する記憶手段と、前記データファイルのヘッダーに、当該データファイルに関して前記選択手段が選択した圧縮ファイルを生成する圧縮手順を示す符号が記録されているか否かを判断する判断手段と、前記判断手段が前記データファイルのヘッダーに前記符号が記録されていると判断したときに、当該データファイルを当該符号が示す前記圧縮手順で圧縮することを前記データ圧縮手段に指示する第3圧縮指示手段と、前記判断手段が前記データファイルのヘッダーに前記符号が記録されていないと判断したときに、前記圧縮手順を示す前記符号を、前記記憶手段に記憶された前記データファイルのヘッダーに記録する記録手段と、前記判断手段が当該データファイルのヘッダーに前記符号が記録されていないと判断したときに、前記選択手段が選択した圧縮ファイルを外部に送信し、前記符号が記録されていると判断したときに、前記第3圧縮指示手段の指示により前記データ圧縮手段が生成した圧縮ファイルを外部に送信する送信手段とをさらに備えていることが好ましい。 In the present invention, the storage means for storing the data file supplied from the outside and the code indicating the compression procedure for generating the compressed file selected by the selection means for the data file are recorded in the header of the data file. A determination means for determining whether or not the data file has been recorded; and when the determination means determines that the code is recorded in a header of the data file, the data file is compressed by the compression procedure indicated by the code. A third compression instruction means for instructing the data compression means, and when the determination means determines that the code is not recorded in the header of the data file, the code indicating the compression procedure is stored in the storage means. Recording means for recording in the header of the data file stored in the memory, and When it is determined that the code is not recorded in the file, the compressed file selected by the selection unit is transmitted to the outside, and when it is determined that the code is recorded, the third compression instruction unit instructs It is preferable to further comprise a transmission unit for transmitting the compressed file generated by the data compression unit to the outside.
これによると、データファイルの一連の圧縮処理を1回行えば、圧縮効率が高い圧縮手順を示す符号が当該データファイルのヘッダーに記録されるため、当該データファイルを再び圧縮するときは、当該データファイルに関して圧縮効率が高い圧縮手順を即座に特定することができる。これにより、圧縮効率の高い圧縮ファイルをさらに素早く生成することができる。 According to this, when a series of compression processing of a data file is performed once, a code indicating a compression procedure with high compression efficiency is recorded in the header of the data file. Therefore, when the data file is compressed again, the data A compression procedure with high compression efficiency for a file can be immediately identified. Thereby, a compressed file with high compression efficiency can be generated more quickly.
以下、本発明の好適な実施の形態について、図面を参照しつつ説明する。 Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.
図1は、本発明に係る好適な実施形態であるデータファイル圧縮装置である制御装置の機能ブロック図である。図1に示すように、制御装置1は、PC(パーソナルコンピュータ)上で起動する制御プログラムによって実現される。また、制御装置1は、インクジェットプリンタ2を制御するものであり、インクジェットプリンタ2とUSB(Universal Serial Bus)を介して通信可能に接続されている。また、制御装置1は外部から取り込んだ画像データを含む画像ファイル(データファイル)Pを圧縮してインクジェットプリンタ2に送信する(データファイル圧縮装置としての機能)とともに、ユーザからの指示に基づいて当該画像ファイルに係る画像が印刷されるように、インクジェットプリンタ2を制御する。なお、以下の説明においては、制御装置1のデータファイル圧縮装置としての機能を中心に説明する。
FIG. 1 is a functional block diagram of a control apparatus which is a data file compression apparatus according to a preferred embodiment of the present invention. As shown in FIG. 1, the control device 1 is realized by a control program that is activated on a PC (personal computer). The control device 1 controls the
制御装置1は、画像ファイル記憶部(記憶手段)11と、符号判断部(判断手段)12と、第1圧縮指示部(第1圧縮指示手段)13と、検出部(検出手段)14と、第2圧縮指示部(第2圧縮指示手段)15と、第3圧縮指示部(第3圧縮指示手段)16と、データ圧縮部(データ圧縮手段)17と、送信ファイル選択部(選択手段)18と、符号記録部(記録手段)19と、USBコントローラ(送信手段)20と、画像編集部30とを有している。画像ファイル記憶部11は、メモリーカード(図示せず)などを介して外部から供給された画像ファイルPを記憶するものである。なお、画像ファイルPは、ファイル情報が記録されたヘッダーと画像データが記録されたデータ本体とを有するものである。符号判断部12は、画像ファイル記憶部11に記憶された画像ファイルPのヘッダーにデータ圧縮部17による圧縮手順を示す符号が記録されているか否かを判断するものである。この符号については後に詳述する。
The control device 1 includes an image file storage unit (storage unit) 11, a code determination unit (determination unit) 12, a first compression instruction unit (first compression instruction unit) 13, a detection unit (detection unit) 14, Second compression instruction section (second compression instruction means) 15, third compression instruction section (third compression instruction means) 16, data compression section (data compression means) 17, and transmission file selection section (selection means) 18 A code recording unit (recording unit) 19, a USB controller (transmission unit) 20, and an
図2を参照しつつ、データ圧縮部17について説明する。図2は、データ圧縮部17の機能ブロック図である。図2に示すように、データ圧縮部17は、第1圧縮指示部13、第2圧縮指示部15及び第3圧縮指示部16からの指示によって、RLE方式、LZ方式、Huffman方式、Arithmetic方式及びRange Coder方式の計5つの圧縮方式から選択されたいずれかの圧縮方式で画像ファイルPのデータ本体を圧縮するものである。なお、RLE方式及びLZ方式は、ビットパターンの配列に着目して圧縮を行う圧縮方式(以下、圧縮方式Xと称する)に属する圧縮方式であり、Huffman方式、Arithmetic方式及びRange Coder方式は、ビットパターンの発生頻度に着目して圧縮を行う圧縮方式(以下、圧縮方式Yと称する)に属する圧縮方式である。なお、以下の説明において、RLE方式によって圧縮された圧縮ファイルを圧縮ファイルA、LZ方式によって圧縮された圧縮ファイルを圧縮ファイルB、Huffman方式によって圧縮された圧縮ファイルを圧縮ファイルC、Arithmetic方式によって圧縮された圧縮ファイルを圧縮ファイルD、Range Coder方式によって圧縮された圧縮ファイルを圧縮ファイルEと称する。
The
図1に戻って、第1圧縮指示部13は、符号判断部12が画像ファイルPのヘッダーに圧縮手順を示す符号が記録されていないと判断したときに、画像ファイルPのデータ本体を、上記5つの圧縮方式のそれぞれで圧縮することをデータ圧縮部17に指示するものである。第1圧縮指示部13の指示により、データ圧縮部17は、画像ファイルPのデータ本体を、上記5つの圧縮方式のそれぞれで圧縮して圧縮ファイルA〜Eを生成する。
Returning to FIG. 1, when the
検出部14は、第1圧縮指示部13の指示によりデータ圧縮部17が生成した圧縮ファイルA及びBのファイル容量を互いに比較して、上記圧縮方式Xに属する圧縮方式の中で最も圧縮効率が高い圧縮方式である第1圧縮方式を検出するとともに、第1圧縮指示部13の指示によりデータ圧縮部17が生成した圧縮ファイルC〜Eのファイル容量を互いに比較して、上記圧縮方式Yに属する圧縮方式の中で最も圧縮効率が高い前記圧縮方式である第2圧縮方式を検出するものである。
The
図3を参照しつつ、第2圧縮指示部15の機能について説明する。図3は、第2圧縮指示部15の指示によりデータ圧縮部17が行う圧縮手順を示したブロック図である。なお、図3においては、圧縮方式Xに関してLZ方式によって生成される圧縮ファイルBが最も圧縮効率が高く、圧縮方式Yに関してArithmetic方式によって生成される圧縮ファイルDが最も圧縮効率が高くなっているものとする。これにより、検出部14が、第1圧縮方式としてLZ方式を検出し、第2圧縮方式としてArithmetic方式を検出する。図3に示すように、第2圧縮指示部15は、第1圧縮方式(図3ではLZ方式)で圧縮された圧縮ファイル(圧縮ファイルB)をさらに第2圧縮方式(図3ではArithmetic方式)で圧縮すること、及び、第2圧縮方式で圧縮された圧縮ファイル(圧縮ファイルD)をさらに第1圧縮方式で圧縮することをデータ圧縮部17に指示する。第2圧縮指示部15の指示により、データ圧縮部17は、第1圧縮方式で圧縮された圧縮ファイルをさらに第2圧縮方式で圧縮して圧縮ファイルFを生成するとともに、第2圧縮方式で圧縮された圧縮ファイルをさらに第1圧縮方式で圧縮して圧縮ファイルGを生成する。
The function of the second
第3圧縮指示部16は、符号判断部12が画像ファイルPのヘッダーに圧縮手順を示す符号が記録されていると判断したときに、当該符号が示す圧縮手段あるいは、圧縮手段の組み合わせで画像ファイルPのデータ本体を圧縮することをデータ圧縮部17に指示する。第3圧縮指示部16の指示により、データ圧縮部17は、画像ファイルPのデータ本体を当該符号が示す圧縮手順で圧縮して圧縮ファイルを生成する。
When the
送信ファイル選択部18は、符号判断部12が画像ファイルPのヘッダーに圧縮手順を示す符号が記録されてないと判断したときに、第1圧縮指示部13の指示によりデータ圧縮部17が生成した圧縮ファイルA〜E、及び、第2圧縮指示部15の指示によりデータ圧縮部17が生成した圧縮ファイルF、Gのファイル容量を互いに比較して、これら圧縮ファイルA〜Gのうち、最も圧縮効率が高い圧縮ファイルを選択する。符号記録部19は、符号判断部12が画像ファイルPのヘッダーに圧縮手順を示す符号が記録されてないと判断したときに、送信ファイル選択部18が選択した圧縮ファイルに係る圧縮手順を示す符号を、画像ファイルPのヘッダーに記録するものである。
When the
USBコントローラ20は、符号判断部12が画像ファイルPのヘッダーに圧縮手順を示す符号が記録されてないと判断したときに、送信ファイル選択部18が選択した圧縮ファイルをインクジェットプリンタ2に送信し、符号判断部12が画像ファイルPのヘッダーに圧縮手順を示す符号が記録されていると判断したときに、データ圧縮部17が、第3圧縮指示部16により、画像ファイルPのデータ本体を当該符号が示す圧縮手段で圧縮した圧縮ファイルをインクジェットプリンタ2に送信するものである。
When the
画像編集部30は、ユーザの操作によって、画像ファイル記憶部11に記憶された画像ファイルPのデータ本体の画像データを編集するものである。また、画像編集部30は、画像ファイルPのデータ本体に関する編集結果が保存されるとき、画像ファイルPのヘッダーにある符号が記録される領域をクリアする。
The
次に、制御装置1の動作について図4を参照しつつ説明する。図4は、制御装置1の動作を示すフローチャートである。図4に示すように、制御装置1は、画像ファイル記憶部11に画像ファイルPが記憶された状態で、画像ファイルPをインクジェットプリンタ2へ送信する旨がユーザから指示されると、ステップS101(以下、単にS101と称する。他のステップも同様)に移行し、符号判断部12が、画像ファイル記憶部11に記憶された画像ファイルPのヘッダーにデータ圧縮部17による圧縮手順を示す符号が記録されているか否かを判断する。そして、符号判断部12が画像ファイルPのヘッダーに圧縮手順を示す符号が記録されていないと判断すると(S101:NO)、S102に移行し、第1圧縮指示部13が、画像ファイルPのデータ本体を、上記5つの圧縮方式のそれぞれで圧縮することをデータ圧縮部17に指示する。データ圧縮部17は、第1圧縮指示部13の指示により、画像ファイルPのデータ本体を、上記5つの圧縮方式のそれぞれで圧縮して圧縮ファイルA〜Eを生成する。
Next, the operation of the control device 1 will be described with reference to FIG. FIG. 4 is a flowchart showing the operation of the control device 1. As illustrated in FIG. 4, when the user instructs the control device 1 to transmit the image file P to the
その後、S103に移行し、検出部14が、圧縮ファイルA及びBのファイル容量を互いに比較して圧縮方式Xに属する圧縮方式の中で最も圧縮効率が高い圧縮方式である第1圧縮方式を検出するとともに、圧縮ファイルC〜Eのファイル容量を互いに比較して圧縮方式Yに属する圧縮方式の中で最も圧縮効率が高い前記圧縮方式である第2圧縮方式を検出する。
Thereafter, the process proceeds to S103, and the
その後、S104に移行し、第2圧縮指示部15が、第1圧縮方式で圧縮された圧縮ファイルをさらに第2圧縮方式で圧縮すること、及び、第2圧縮方式で圧縮された圧縮ファイルをさらに第1圧縮方式で圧縮することをデータ圧縮部17に指示する。データ圧縮部17は、第2圧縮指示部15の指示により、第1圧縮方式で圧縮された圧縮ファイルをさらに第2圧縮方式で圧縮して圧縮ファイルFを生成する。また、S105に移行して、データ圧縮部17は、第2圧縮指示部15の指示により、第2圧縮方式で圧縮された圧縮ファイルをさらに第1圧縮方式で圧縮して圧縮ファイルGを生成する。
Thereafter, the process proceeds to S104, where the second
その後、S106に移行して、送信ファイル選択部18が、圧縮ファイルA〜Gのファイル容量を互いに比較して、これら圧縮ファイルA〜Gのうち、最も圧縮効率が高い圧縮ファイルを選択する。その後、S107に移行して、符号記録部19が、送信ファイル選択部18が選択した圧縮ファイルに係る圧縮手順を示す符号を、画像ファイルPのヘッダーに記録する。そして、S108に移行して、USBコントローラ20が、送信ファイル選択部18が選択した圧縮ファイルをインクジェットプリンタ2に送信する。そして、図4のフローチャートを終了する。
Thereafter, the process proceeds to S106, and the transmission
一方、S101において、符号判断部12が画像ファイルPのヘッダーに圧縮手順を示す符号が記録されていると判断すると(S101:YES)、S109に移行し、第3圧縮指示部16が、当該符号が示す圧縮手段で画像ファイルPのデータ本体を圧縮することをデータ圧縮部17に指示する。データ圧縮部17は、第3圧縮指示部16の指示により、画像ファイルPのデータ本体を当該符号が示す圧縮手段で圧縮して圧縮ファイルを生成する。そして、S110に移行し、USBコントローラ20が、第3圧縮指示部16の指示によりデータ圧縮部17が圧縮した圧縮ファイルをインクジェットプリンタ2に送信する。そして、図4のフローチャートを終了する。
On the other hand, if the
インクジェットプリンタ2においては、制御装置1から送信された圧縮ファイルを受信すると、受信した圧縮ファイルを展開して画像ファイルPを生成し、ユーザからの指示に基づいて、当該画像ファイルPに係る画像を印刷用紙に印刷する。
In the
次に、画像編集部30の動作について図5を参照しつつ説明する。図5は、画像編集部30の動作を示すフローチャートである。図5に示すように、画像編集部30は、画像ファイル記憶部11に画像ファイルPが記憶された状態で、画像ファイルPのデータ本体に係る画像編集を開始する旨がユーザから指示されると、S201に移行し、画像ファイルPに係る画像データをメモリ上の作業エリアに展開する。そして、S202に移行し、編集モードを起動する。編集モードにおいては、ユーザが図示しないマウスやキーボードを用いて任意に画像データを編集することが可能となっている。
Next, the operation of the
そして、S203に移行し、ユーザが編集モードを終了させたか否かを判断する。ユーザが編集モードを終了させていないときは(S203:NO)、S202に移行して編集モードを継続する。ユーザが編集モードを終了させたときは(S203:YES)、S204に移行して画像データが編集されたか否かを判断する。画像データが編集されていないときは(S204:NO)、S205に移行し、作業エリアに展開した画像データを破棄する。そして、図5のフローチャートを終了する。 Then, the process proceeds to S203, and it is determined whether or not the user has ended the editing mode. When the user has not ended the edit mode (S203: NO), the process proceeds to S202 and the edit mode is continued. When the user ends the edit mode (S203: YES), the process proceeds to S204 to determine whether the image data has been edited. When the image data is not edited (S204: NO), the process proceeds to S205, and the image data developed in the work area is discarded. Then, the flowchart of FIG. 5 ends.
画像データが編集されていれば(S204:YES)、S206に移行し、編集された画像データを保存するか否かを判断する。編集された画像データを保存しないときは(S206:NO)、S205に移行し、作業エリアに展開した画像データを破棄する。そして、図5のフローチャートを終了する。編集された画像データを保存するときは(S206:YES)、S207に移行し、画像データを画像ファイル記憶部11に記憶される新たな画像ファイルPとして保存するとともに、当該画像ファイルPのヘッダーの圧縮手順が記録されるべき領域をクリアする。そして、図5のフローチャートを終了する。
If the image data has been edited (S204: YES), the process proceeds to S206 to determine whether to save the edited image data. When the edited image data is not stored (S206: NO), the process proceeds to S205, and the image data developed in the work area is discarded. Then, the flowchart of FIG. 5 ends. When saving the edited image data (S206: YES), the process proceeds to S207, where the image data is saved as a new image file P stored in the image
以上、説明した本実施形態によると、ビットパターンの配列に着目して圧縮を行う圧縮方式Xと、ビットパターンの発生頻度に着目して圧縮を行う圧縮方式Yとで2重圧縮を行ったときに、圧縮効率が大きく異なるため、圧縮方式Xの中で最も圧縮効率が高い第1圧縮方式と、圧縮方式Yの中で最も圧縮効率が高い第2圧縮方式とを検出し、これらの間でのみ2重圧縮の圧縮手順を検証することで圧縮効率の高い圧縮手順を効率よく特定することができる。これにより、5つ全ての圧縮方式について2重圧縮の圧縮手順を検証する場合と比較して、圧縮効率の高い圧縮ファイルを素早く生成することができる。 As described above, according to the present embodiment described above, when double compression is performed using the compression method X that performs compression by focusing on the bit pattern arrangement and the compression method Y that performs compression by focusing on the occurrence frequency of bit patterns. Since the compression efficiency differs greatly, the first compression method having the highest compression efficiency among the compression methods X and the second compression method having the highest compression efficiency among the compression methods Y are detected, and between these, Only by verifying the compression procedure of double compression, a compression procedure with high compression efficiency can be identified efficiently. Thereby, compared with the case where the compression procedure of double compression is verified about all the five compression systems, a compression file with high compression efficiency can be produced | generated rapidly.
また、本発明においては、画像ファイルPの一連の圧縮処理を1回行えば、圧縮効率が高い圧縮手順を示す符号が当該画像ファイルPのヘッダーに記録されるため、当該画像ファイルPを再び圧縮するときは、圧縮効率が高い圧縮手順を即座に特定することができる。これにより、圧縮効率の高い圧縮ファイルをさらに素早く生成することができる。 In the present invention, if a series of compression processing of the image file P is performed once, a code indicating a compression procedure with high compression efficiency is recorded in the header of the image file P. Therefore, the image file P is compressed again. When doing so, a compression procedure with high compression efficiency can be immediately identified. Thereby, a compressed file with high compression efficiency can be generated more quickly.
以上、本発明の好適な実施形態について説明したが、本発明は上述の実施形態に限られるものではなく、特許請求の範囲に記載した限りにおいて様々な変更が可能なものである。例えば、上述した実施形態においては、データ圧縮部17が、RLE方式、LZ方式、Huffman方式、Arithmetic方式及びRange Coder方式の計5つの圧縮方式から選択されたいずれかの圧縮方式で画像ファイルPのデータ本体を圧縮する構成であるが、データ圧縮部が、2〜4又は6以上の圧縮方式から選択されたいずれかの圧縮方式で画像ファイルPのデータ本体を圧縮する構成であってもよいし、これら5つの圧縮方式以外の圧縮方式で画像ファイルPのデータ本体を圧縮する構成であってもよい。また、データ圧縮部は、圧縮方式X、Yのそれぞれについて少なくとも1つの圧縮方式が含まれていれば、圧縮方式X、Yのいずれにも属さない他の圧縮方式で画像ファイルPのデータ本体を圧縮可能な構成であってもよい。この場合、データ圧縮部は、第1圧縮指示部の指示により、画像ファイルPのデータ本体を当該他の圧縮方式で圧縮して圧縮ファイルを生成し、送信ファイル選択部が、当該圧縮ファイルを含めて最も圧縮効率が高い圧縮ファイルを選択する構成であることが好ましい。
The preferred embodiments of the present invention have been described above. However, the present invention is not limited to the above-described embodiments, and various modifications can be made as long as they are described in the claims. For example, in the above-described embodiment, the
また、上述した実施形態においては、制御装置1が、送信ファイル選択部18が選択した圧縮ファイルに係る圧縮手順を示す符号を、画像ファイルPのヘッダーに記録する符号記録部19を有する構成であるが、符号記録部19を有さない構成であってもよい。
In the above-described embodiment, the control device 1 includes the
さらに、上述した実施形態においては、制御装置1がUSBコントローラ20を介して圧縮ファイルをインクジェットプリンタ2に送信する構成であるが、インクジェットプリンタ2以外の装置に圧縮ファイルを送信する構成であってもよいし、USB以外の通信手段によって圧縮ファイルを送信する構成であってもよいし、圧縮ファイルを送信しない構成であってもよい。
Furthermore, in the above-described embodiment, the control device 1 is configured to transmit the compressed file to the
加えて、上述した実施形態においては、制御装置1が、PC上で起動するプログラムによって実現される構成であるが、PC以外のコンピュータ上で起動するプログラムによって実現される構成であってもよい。 In addition, in the above-described embodiment, the control device 1 is configured by a program that is activated on a PC, but may be configured by a program that is activated on a computer other than the PC.
さらに、上述した実施形態においては、画像データを含む画像ファイルPのデータ本体を圧縮する構成であるが、動画データや音声データなど他のデータを含む任意のフォーマットのデータファイルであってもよいし、データファイルが予め圧縮された圧縮ファイルであってもよい。 Furthermore, in the above-described embodiment, the data body of the image file P including the image data is compressed. However, the data file may be in any format including other data such as moving image data and audio data. The data file may be a compressed file compressed in advance.
1 制御装置(データファイル圧縮装置)
2 インクジェットプリンタ
11 画像ファイル記憶部(記憶手段)
12 符号判断部(判断手段)
13 第1圧縮指示部(第1圧縮指示手段)
14 検出部(検出手段)
15 第2圧縮指示部(第2圧縮指示手段)
16 第3圧縮指示部(第3圧縮指示手段)
17 データ圧縮部(データ圧縮手段)
18 送信ファイル選択部(選択手段)
19 符号記録部(記録手段)
20 USBコントローラ(送信手段)
30 画像編集部
P 画像ファイル(データファイル)
1 Control device (data file compression device)
2
12 Code determination unit (determination means)
13 First compression instruction section (first compression instruction means)
14 Detection part (detection means)
15 Second compression instruction section (second compression instruction means)
16 Third compression instruction section (third compression instruction means)
17 Data compression unit (data compression means)
18 Transmission file selection part (selection means)
19 Code recording section (recording means)
20 USB controller (transmission means)
30 Image Editor P Image file (data file)
Claims (5)
データファイルを前記複数の圧縮方式のそれぞれで圧縮することを前記データ圧縮手段に指示する第1圧縮指示手段と、
前記第1圧縮指示手段の指示により前記データ圧縮手段が生成した複数の圧縮ファイルに基づいて、前記複数の圧縮方式における、ビットパターンの配列に着目して圧縮を行う前記圧縮方式の中で最も圧縮効率が高い前記圧縮方式である第1圧縮方式と、ビットパターンの発生頻度に着目して圧縮を行う前記圧縮方式の中で最も圧縮効率が高い前記圧縮方式である第2圧縮方式とを検出する検出手段と、
前記第1圧縮方式で圧縮された圧縮ファイルをさらに前記第2圧縮方式で圧縮すること、及び、前記第2圧縮方式で圧縮された圧縮ファイルをさらに前記第1圧縮方式で圧縮することを前記データ圧縮手段に指示する第2圧縮指示手段と、
前記第1及び第2圧縮指示手段のそれぞれの指示により前記データ圧縮手段が生成した複数の圧縮ファイルのうち、最も圧縮効率が高い圧縮ファイルを選択する選択手段とを備えていることを特徴とするデータファイル圧縮装置。 Data compression means for compressing the data file by any one of the compression methods selected from a plurality of different compression methods;
First compression instruction means for instructing the data compression means to compress a data file with each of the plurality of compression methods;
Based on a plurality of compressed files generated by the data compression means in accordance with an instruction from the first compression instruction means, the compression is the most compressed among the compression methods in which compression is performed by paying attention to the bit pattern arrangement in the plurality of compression methods. The first compression method, which is the compression method with high efficiency, and the second compression method, which is the compression method with the highest compression efficiency among the compression methods that perform compression by paying attention to the occurrence frequency of the bit pattern, are detected. Detection means;
Compressing the compressed file compressed by the first compression method by the second compression method, and further compressing the compressed file compressed by the second compression method by the first compression method. Second compression instruction means for instructing the compression means;
Selecting means for selecting a compressed file having the highest compression efficiency among a plurality of compressed files generated by the data compressing means in accordance with the respective instructions of the first and second compression instructing means. Data file compressor.
前記データファイルのヘッダーに、当該データファイルに関して前記選択手段が選択した圧縮ファイルを生成する圧縮手順を示す符号が記録されているか否かを判断する判断手段と、
前記判断手段が前記データファイルのヘッダーに前記符号が記録されていると判断したときに、当該データファイルを当該符号が示す前記圧縮手順で圧縮することを前記データ圧縮手段に指示する第3圧縮指示手段と、
前記判断手段が前記データファイルのヘッダーに前記符号が記録されていないと判断したときに、前記圧縮手順を示す前記符号を、前記記憶手段に記憶された前記データファイルのヘッダーに記録する記録手段と、
前記判断手段が当該データファイルのヘッダーに前記符号が記録されていないと判断したときに、前記選択手段が選択した圧縮ファイルを外部に送信し、前記符号が記録されていると判断したときに、前記第3圧縮指示手段の指示により前記データ圧縮手段が生成した圧縮ファイルを外部に送信する送信手段とをさらに備えていることを特徴とする請求項1又は2に記載のデータファイル圧縮装置。 Storage means for storing externally supplied data files;
Determining means for determining whether or not a code indicating a compression procedure for generating a compressed file selected by the selecting means with respect to the data file is recorded in a header of the data file;
A third compression instruction for instructing the data compression means to compress the data file by the compression procedure indicated by the code when the determination means determines that the code is recorded in a header of the data file; Means,
Recording means for recording the code indicating the compression procedure in the header of the data file stored in the storage means when the determination means determines that the code is not recorded in the header of the data file; ,
When the determination unit determines that the code is not recorded in the header of the data file, the compressed file selected by the selection unit is transmitted to the outside, and when it is determined that the code is recorded, 3. The data file compression apparatus according to claim 1, further comprising: a transmission unit that transmits the compressed file generated by the data compression unit according to an instruction from the third compression instruction unit to the outside.
データファイルを前記複数の圧縮方式のそれぞれで圧縮することを前記データ圧縮手段に指示する第1圧縮指示手段、
前記第1圧縮指示手段の指示により前記データ圧縮手段が生成した複数の圧縮ファイルに基づいて、前記複数の圧縮方式における、ビットパターンの配列に着目して圧縮を行う前記圧縮方式の中で最も圧縮効率が高い前記圧縮方式である第1圧縮方式と、ビットパターンの発生頻度に着目して圧縮を行う前記圧縮方式の中で最も圧縮効率が高い前記圧縮方式である第2圧縮方式とを検出する検出手段、
前記第1圧縮方式で圧縮された圧縮ファイルをさらに前記第2圧縮方式で圧縮すること、及び、前記第2圧縮方式で圧縮された圧縮ファイルをさらに前記第1圧縮方式で圧縮することを前記データ圧縮手段に指示する第2圧縮指示手段、及び、
前記第1及び第2圧縮指示手段のそれぞれの指示により前記データ圧縮手段が生成した複数の圧縮ファイルのうち、最も圧縮効率が高い圧縮ファイルを選択する選択手段としてコンピュータを機能させることを特徴とするプログラム。 A data compression means for compressing the data file by any one compression method selected from a plurality of different compression methods;
First compression instruction means for instructing the data compression means to compress a data file with each of the plurality of compression methods;
Based on a plurality of compressed files generated by the data compression means in accordance with an instruction from the first compression instruction means, the compression is the most compressed among the compression methods in which compression is performed by paying attention to the bit pattern arrangement in the plurality of compression methods. The first compression method, which is the compression method with high efficiency, and the second compression method, which is the compression method with the highest compression efficiency among the compression methods that perform compression by paying attention to the occurrence frequency of the bit pattern, are detected. Detection means,
Compressing the compressed file compressed by the first compression method by the second compression method, and further compressing the compressed file compressed by the second compression method by the first compression method. Second compression instruction means for instructing the compression means; and
A computer is caused to function as a selection unit that selects a compressed file having the highest compression efficiency among a plurality of compressed files generated by the data compression unit according to instructions of the first and second compression instruction units. program.
前記第1圧縮工程において生成した複数の圧縮ファイルに基づいて、前記複数の圧縮方式における、ビットパターンの配列に着目して圧縮を行う前記圧縮方式の中で最も圧縮効率が高い前記圧縮方式である第1圧縮方式と、ビットパターンの発生頻度に着目して圧縮を行う前記圧縮方式の中で最も圧縮効率が高い前記圧縮方式である第2圧縮方式とを検出する検出工程と、
前記第1圧縮方式で圧縮された圧縮ファイルをさらに前記第2圧縮方式で圧縮すること、及び、前記第2圧縮方式で圧縮された圧縮ファイルをさらに前記第1圧縮方式で圧縮することを前記データ圧縮手段に指示する第2圧縮工程と、
前記第1及び第2圧縮工程のそれぞれにおいて生成した複数の圧縮ファイルのうち、最も圧縮効率が高い圧縮ファイルを選択する選択工程とを備えていることを特徴とするデータファイル圧縮方法。 A first compression step of compressing the data file with each of a plurality of different compression methods;
The compression method having the highest compression efficiency among the compression methods in which compression is performed by paying attention to the arrangement of bit patterns in the plurality of compression methods based on the plurality of compressed files generated in the first compression step. A detection step of detecting a first compression method and a second compression method that is the compression method having the highest compression efficiency among the compression methods that perform compression by paying attention to the occurrence frequency of a bit pattern;
Compressing the compressed file compressed by the first compression method by the second compression method, and further compressing the compressed file compressed by the second compression method by the first compression method. A second compression step instructing the compression means;
A data file compression method comprising: a selection step of selecting a compressed file having the highest compression efficiency among a plurality of compressed files generated in each of the first and second compression steps.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007166533A JP4640382B2 (en) | 2007-06-25 | 2007-06-25 | Data file compression apparatus, program, and data file compression method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007166533A JP4640382B2 (en) | 2007-06-25 | 2007-06-25 | Data file compression apparatus, program, and data file compression method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2009005265A JP2009005265A (en) | 2009-01-08 |
| JP4640382B2 true JP4640382B2 (en) | 2011-03-02 |
Family
ID=40321129
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2007166533A Expired - Fee Related JP4640382B2 (en) | 2007-06-25 | 2007-06-25 | Data file compression apparatus, program, and data file compression method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4640382B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5415231B2 (en) * | 2009-11-09 | 2014-02-12 | 株式会社東芝 | Circuit breaker operation mechanism |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS6230475A (en) * | 1985-08-01 | 1987-02-09 | Panafacom Ltd | Image data transfer system |
| JPH06141190A (en) * | 1991-03-06 | 1994-05-20 | Mitsubishi Paper Mills Ltd | Binary picture data compressing method |
| JPH0832819A (en) * | 1994-07-12 | 1996-02-02 | Canon Inc | Image data processing method and apparatus |
| JPH08139938A (en) * | 1994-11-15 | 1996-05-31 | Canon Inc | Image processing device |
| JPH09261640A (en) * | 1996-03-22 | 1997-10-03 | Oki Electric Ind Co Ltd | Image coding device |
| JPH10293666A (en) * | 1997-04-21 | 1998-11-04 | Canon Inc | Image data processing apparatus and method, and printer |
| JP3656829B2 (en) * | 2001-01-09 | 2005-06-08 | Kddi株式会社 | Adaptive still image encoder |
-
2007
- 2007-06-25 JP JP2007166533A patent/JP4640382B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2009005265A (en) | 2009-01-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4914251B2 (en) | Information processing apparatus, information processing program, and recording medium | |
| JP3772849B2 (en) | Communication apparatus and image reading apparatus | |
| JP2004112526A (en) | Image processing apparatus, image forming apparatus, program, and storage medium | |
| JP4640382B2 (en) | Data file compression apparatus, program, and data file compression method | |
| JP4165451B2 (en) | Printing system, printing request terminal, compression algorithm selection program, and printing method | |
| JP2003303068A5 (en) | ||
| JP2009017430A (en) | Data file transmission device, program, data file transmission method and data structure | |
| US6462680B1 (en) | Method and system for compressing data | |
| JP4893956B2 (en) | Encoding device, decoding device, encoding method and program | |
| JP2007331390A (en) | Image forming apparatus and control method thereof | |
| JP2012015775A (en) | Image processor | |
| JP5312273B2 (en) | Image forming apparatus | |
| JP2005277932A (en) | Device and program for compressing data | |
| JP2005260408A (en) | Data compression apparatus and data compression program | |
| KR100533827B1 (en) | Image forming device and method for managing print files thereof | |
| JP4435586B2 (en) | Data compression apparatus and data compression program | |
| JP2001334708A (en) | Printing equipment | |
| JP2005167537A (en) | Image compression/expansion system | |
| JP2005252531A (en) | Device and program for compressing data | |
| JP4720872B2 (en) | Image processing apparatus and program | |
| JP2007079732A (en) | Print controller, method for controlling print controller, and program | |
| JP4521936B2 (en) | Printing apparatus and control method | |
| JP3031391B2 (en) | Printer | |
| JP2017022656A (en) | PRINT CONTROL DEVICE, PRINT DEVICE, CONTROL METHOD, AND PROGRAM | |
| JP2005260420A (en) | Data compression apparatus and data compression program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20101025 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20101102 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20101115 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4640382 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131210 Year of fee payment: 3 |
|
| LAPS | Cancellation because of no payment of annual fees |