JP2000350044A - Document compressor, document decoder, document compression method, document decoding method and computer-readable recording medium - Google Patents

Document compressor, document decoder, document compression method, document decoding method and computer-readable recording medium

Info

Publication number
JP2000350044A
JP2000350044A JP11159896A JP15989699A JP2000350044A JP 2000350044 A JP2000350044 A JP 2000350044A JP 11159896 A JP11159896 A JP 11159896A JP 15989699 A JP15989699 A JP 15989699A JP 2000350044 A JP2000350044 A JP 2000350044A
Authority
JP
Japan
Prior art keywords
data
compressed
document
page
image data
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.)
Withdrawn
Application number
JP11159896A
Other languages
Japanese (ja)
Inventor
Atsushi Yoshino
敦 吉野
Masanari Kubota
雅成 窪田
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP11159896A priority Critical patent/JP2000350044A/en
Publication of JP2000350044A publication Critical patent/JP2000350044A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a document compressor that can decode image data of each page of a document, consisting of a plurality of pages and generate data of a smaller size. SOLUTION: This document compressor is constituted so as to generate compression document data 31, that include normal compression data obtained by coding image data of a 1st page as compression data #1 for a 1st page, on the basis of a document of an Mmax page and include difference compression data showing positions and contents of a part of image data of a P-th page different from image data of a (P-1)-th page as compression data #2 to #Mmax for a P-th (P=2 to Mmax) page.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、複数ページからな
るドキュメントを圧縮した圧縮ドキュメントデータを作
成するためのドキュメント圧縮装置及びドキュメント圧
縮方法と、ドキュメント圧縮装置、方法で作成された圧
縮ドキュメントデータを復元するためのドキュメント復
元装置及びドキュメント圧縮方法と、コンピュータをド
キュメント圧縮装置あるいはドキュメント復元装置とし
て動作させるためのコンピュータ読取可能な記録媒体に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a document compression apparatus and a document compression method for generating compressed document data obtained by compressing a document composed of a plurality of pages, and a method for restoring the compressed document data generated by the document compression apparatus and method. The present invention relates to a document restoring device and a document compressing method for performing the same, and a computer-readable recording medium for causing a computer to operate as a document compressing device or a document restoring device.

【0002】[0002]

【従来の技術】デジタルデータを利用する機器では、ハ
ードディスク装置などの補助記憶装置の記憶領域の有効
活用や情報転送時間の短縮を図るために、デジタルデー
タを圧縮することが行われている。また、コンピュータ
では、各種のアプリケーションプログラムで作成された
ドキュメントを、同一のアプリケーションプログラムで
その内容が読めるようにするため、あるいは、印刷等の
出力操作を行いやすくするために、イメージデータ化し
て保存しておくことも行われている。
2. Description of the Related Art In a device utilizing digital data, digital data is compressed in order to effectively use a storage area of an auxiliary storage device such as a hard disk device and to shorten information transfer time. Also, in a computer, a document created by various application programs is converted into image data and stored so that the contents can be read by the same application program or output operation such as printing can be easily performed. It has also been done.

【0003】[0003]

【発明が解決しようとする課題】ドキュメントをイメー
ジデータ化して保存する際に用いることができる圧縮方
法としてはさまざまなものが知られている。しかしなが
ら、従来の圧縮方法は、1ページ毎に圧縮を行うもので
あったため、複数ページからなるある種のドキュメント
に対して従来の圧縮方法を使用した場合、冗長性の高い
(圧縮率が高くない)圧縮結果が得られてしまってい
た。
There are various known compression methods that can be used when a document is converted into image data and stored. However, since the conventional compression method performs compression for each page, when the conventional compression method is used for a certain document including a plurality of pages, the redundancy is high (the compression ratio is not high). ) The compression result was obtained.

【0004】そこで、本発明の第1の課題は、複数ペー
ジからなるドキュメントに基づき、そのドキュメントの
各ページのイメージデータを復元できる圧縮ドキュメン
トデータであって、従来よりもサイズが小さな圧縮ドキ
ュメントデータを作成することができるドキュメント圧
縮装置及びドキュメント圧縮方法を提供することにあ
る。
Accordingly, a first object of the present invention is to provide compressed document data which can restore the image data of each page of the document based on a document having a plurality of pages, and which has a smaller size than conventional compressed document data. An object of the present invention is to provide a document compression apparatus and a document compression method that can be created.

【0005】また、本発明の第2の課題は、本発明のド
キュメント圧縮装置、方法によって作成された圧縮ドキ
ュメントデータを復元できるドキュメント復元装置、ド
キュメント復元方法を提供することにある。
It is a second object of the present invention to provide a document restoring apparatus and a document restoring method capable of restoring compressed document data created by the document compressing apparatus and method of the present invention.

【0006】また、本発明の第3の課題は、コンピュー
タを、そのようなドキュメント圧縮装置あるいは復元装
置として機能させることができるコンピュータ読取可能
な記録媒体を提供することにある。
A third object of the present invention is to provide a computer-readable recording medium which enables a computer to function as such a document compression device or a decompression device.

【0007】[0007]

【課題を解決するための手段】本発明の第1の態様のド
キュメント圧縮装置は、ドキュメントの第1ページのイ
メージデータを符号化することにより、第1ページに関
する通常圧縮データを作成する通常圧縮データ作成手段
と、それぞれ、ドキュメントの第2ないし第Nページの
イメージデータを生成イメージデータとし、かつ、直前
のページのイメージデータを基準イメージデータとした
N−1個の差分圧縮データであって、前記基準イメージ
データと異なっている前記生成イメージデータの部分の
位置及び内容を示すN−1個の差分圧縮データを作成す
る差分圧縮データ作成手段と、通常圧縮データ作成手段
によって作成された通常圧縮データと、差分圧縮データ
作成手段によって作成されたN−1個の差分圧縮データ
と、各通常圧縮データ及び差分圧縮データがドキュメン
トのいずれのページに関するものであるかを示す情報と
を含む圧縮ドキュメントデータを作成する圧縮ドキュメ
ントデータ作成手段とを備える。
According to a first aspect of the present invention, there is provided a document compression apparatus for encoding compressed image data of a first page of a document to generate compressed normal data of the first page. Creating means, and N-1 pieces of differentially-compressed data each using image data of the second to Nth pages of the document as generated image data and using image data of the immediately preceding page as reference image data, Differential compressed data generating means for generating N-1 differential compressed data indicating the position and content of the portion of the generated image data different from the reference image data; and normal compressed data generated by the normal compressed data generating means. , N-1 difference compressed data created by the difference compressed data creating means, and each normal compressed data And a compressed document data creation means for data and compressed difference data to create a compressed document data including the information indicating whether it relates to one of the pages of the document.

【0008】すなわち、本発明の第1の態様のドキュメ
ント圧縮装置では、Nページのドキュメントに基づき、
第1ページ用の圧縮データとして通常圧縮データを含
み、第P(P=2〜N)ページ用の圧縮データとして、
第Pページのイメージデータの、第P−1のイメージデ
ータと異なる部分の位置及び内容を示した差分圧縮デー
タを含む圧縮ドキュメントデータが作成される。圧縮ド
キュメントデータの元となったドキュメントの各ページ
が共通した部分を多く有するものであった場合、あるペ
ージに関する差分圧縮データのサイズは、そのページに
関する通常圧縮データのサイズよりも小さくなる。従っ
て、各ページが共通した部分を多く有するドキュメン
ト、例えば、表計算ソフトで作成されたドキュメント
や、請求書等の定型のドキュメントに対して、本ドキュ
メント圧縮装置を用いれば、当該ドキュメントを従来方
法で圧縮することによって得られるデータよりも、サイ
ズが小さい圧縮ドキュメントデータを得ることができる
ことになる。
That is, in the document compression apparatus according to the first aspect of the present invention, based on an N page document,
Normal compressed data is included as compressed data for the first page, and compressed data for the Pth page (P = 2 to N) is
Compressed document data including differential compressed data indicating the position and content of a portion of the image data of the Pth page different from the P-1 image data is created. If each page of the document from which the compressed document data is based has many common portions, the size of the differential compressed data for a certain page is smaller than the size of the normal compressed data for that page. Therefore, for a document having many common portions on each page, for example, a document created by spreadsheet software or a fixed document such as an invoice, if the document compression apparatus is used, the document can be converted by a conventional method. As a result, compressed document data smaller in size than data obtained by compression can be obtained.

【0009】なお、本ドキュメント圧縮装置を構成する
圧縮ドキュメントデータ作成手段は、通常圧縮データ作
成手段によって作成された通常圧縮データと、差分圧縮
データ作成手段によって作成されたN−1個の差分圧縮
データと、各通常圧縮データ及び差分圧縮データがドキ
ュメントのいずれのページに関するものであるかを示す
情報とを含む圧縮ドキュメントデータを作成するもので
あれば、どのような形態の圧縮ドキュメントデータを作
成するものであってもよい。より具体的には、圧縮ドキ
ュメントデータ作成手段は、通常圧縮データファイル
と、N−1個の差分圧縮データファイルと、各通常圧縮
データ及び差分圧縮データファイルがドキュメントのい
ずれのページに関するものであるかを示す情報を含むフ
ァイルとからなる圧縮ドキュメントデータを作成するも
のであっても良く、関連するページが認識できるファイ
ル名が付けられた通常圧縮データファイルとN−1個の
差分圧縮データファイルとからなる圧縮ドキュメントデ
ータを作成するものであっても良い。さらに、通常圧縮
データとN−1個の差分圧縮データとをページ番号順に
並べた圧縮ドキュメントデータを作成するものであって
も良い。
[0009] The compressed document data creating means constituting the document compressing apparatus includes normal compressed data created by the normal compressed data creating means and N-1 differential compressed data created by the differential compressed data creating means. What kind of form of compressed document data is created as long as it creates compressed document data including information indicating which page of the document each normal compressed data and differential compressed data relate to. It may be. More specifically, the compressed document data creating means may include a normal compressed data file, N-1 differential compressed data files, and which page of the document each normal compressed data and differential compressed data file is related to. The compressed document data may be created from a file containing information indicating the number of compressed compressed data files. The compressed document data may be created. Furthermore, compressed document data in which normal compressed data and N-1 differential compressed data are arranged in the order of page numbers may be created.

【0010】本発明の第2の態様のドキュメント圧縮装
置は、ドキュメントの第1ページのイメージデータを符
号化することにより、第1ページに関する通常圧縮デー
タを作成する通常圧縮データ作成手段と、それぞれ、ド
キュメントの第2ないし第Nページのイメージデータを
生成イメージデータとし、かつ、第1ページのイメージ
データを基準イメージデータとしたN−1個の差分圧縮
データであって、前記基準イメージデータと異なってい
る前記生成イメージデータの部分の位置及び内容を示す
N−1個の差分圧縮データを作成する差分圧縮データ作
成手段と、通常圧縮データ作成手段によって作成された
通常圧縮データと、差分圧縮データ作成手段によって作
成されたN−1個の差分圧縮データと、それらの通常圧
縮データ及び差分圧縮データがドキュメントのいずれの
ページに関するものであるかを示す情報とを含む圧縮ド
キュメントデータを作成する圧縮ドキュメントデータ作
成手段とを備える。
[0010] A document compression apparatus according to a second aspect of the present invention comprises a normal compressed data generating means for generating normal compressed data relating to a first page by encoding image data of the first page of the document; N-1 pieces of differentially compressed data using the image data of the second to Nth pages of the document as generated image data and the image data of the first page as reference image data, which is different from the reference image data. Differential compressed data generating means for generating N-1 differential compressed data indicating the position and content of the generated image data, normal compressed data generated by the normal compressed data generating means, and differential compressed data generating means N-1 differential compressed data, and their normal compressed data and differential And a compressed document data generating means for generating a compressed document data reduced data includes information indicating whether it relates to one of the pages of the document.

【0011】すなわち、本発明の第2の態様のドキュメ
ント圧縮装置では、Nページのドキュメントに基づき、
第1ページ用の圧縮データとして通常圧縮データを含
み、第P(P=2〜N)ページ用の圧縮データとして、
第Pページのイメージデータの、第1ページのイメージ
データと異なる部分の位置及び内容を示した差分圧縮デ
ータを含む圧縮ドキュメントデータが作成される。圧縮
ドキュメントデータの元となったドキュメントの各ペー
ジが共通した部分を多く有するものであった場合、ある
ページに関する差分圧縮データのサイズは、そのページ
に関する通常圧縮データのサイズよりも小さくなる。従
って、各ページが共通した部分を多く有するドキュメン
ト、例えば、表計算ソフトで作成されたドキュメント
や、請求書等の定型のドキュメントに対して、本ドキュ
メント圧縮装置を用いれば、従来方法で得られるデータ
よりも、サイズが小さい圧縮ドキュメントデータを得る
ことができる。
That is, in the document compression apparatus according to the second aspect of the present invention, based on a document of N pages,
Normal compressed data is included as compressed data for the first page, and compressed data for the Pth page (P = 2 to N) is
Compressed document data including differential compressed data indicating the position and content of a portion of the image data of the Pth page different from the image data of the first page is created. If each page of the document from which the compressed document data is based has many common portions, the size of the differential compressed data for a certain page is smaller than the size of the normal compressed data for that page. Therefore, if the document compression apparatus is used for a document in which each page has many portions in common, for example, a document created by spreadsheet software or a fixed document such as a bill, data obtained by a conventional method can be used. Thus, compressed document data having a smaller size can be obtained.

【0012】本発明の第3の態様のドキュメント圧縮装
置は、ドキュメントの、あるページのイメージデータを
生成イメージデータとし、かつ、それとは異なるページ
のイメージデータである基準イメージデータとした差分
圧縮データであって、前記基準イメージデータと異なっ
ている前記生成イメージデータの部分の位置及び内容を
示す差分圧縮データを、ドキュメントに含まれる全ての
2ページの組み合わせについて作成する差分圧縮データ
作成手段と、差分圧縮データ作成手段で作成されたN×
(N−1)個の差分圧縮データを、同じイメージデータ
が基準イメージデータとして使用されているN−1個の
差分圧縮データからなるN個のグループに分類し、各グ
ループに含まれるN−1個の差分圧縮データのサイズの
合計を算出する合計算出手段と、この合計算出手段によ
って算出された合計が最も小さいグループ内の差分圧縮
データの作成時に基準イメージデータとして使用されて
いるイメージデータを符号化することにより、そのイメ
ージデータが表しているページに関する通常圧縮データ
を作成する通常圧縮データ作成手段と、通常圧縮データ
作成手段によって作成された通常圧縮データと、合計算
出手段によって算出された合計が最も小さいグループに
含まれるN−1個の差分圧縮データと、それらの通常圧
縮データ及び差分圧縮データがドキュメントのいずれの
ページに関するものであるかを示す情報を含む圧縮ドキ
ュメントデータを作成する圧縮ドキュメントデータ作成
手段とを備える。
A document compression apparatus according to a third aspect of the present invention uses differential compressed data in which image data of a certain page of a document is used as generated image data and reference image data is used as image data of a different page. A differential compressed data generating means for generating differential compressed data indicating a position and contents of a part of the generated image data different from the reference image data for all combinations of two pages included in the document; N × created by data creation means
The (N-1) pieces of differentially compressed data are classified into N groups of N-1 pieces of differentially compressed data in which the same image data is used as reference image data. Sum calculating means for calculating the sum of the sizes of the differential compressed data, and encoding the image data used as the reference image data when creating the differential compressed data in the group having the smallest total calculated by the total calculating means. Thus, the normal compression data creation unit that creates the normal compression data for the page represented by the image data, the normal compression data created by the normal compression data creation unit, and the sum calculated by the sum calculation unit N-1 difference compressed data included in the smallest group, their normal compressed data and difference And a compressed document data creation means reduced data to create a compressed document data including information indicating whether it relates to one of the pages of the document.

【0013】すなわち、本発明の第3の態様のドキュメ
ント圧縮装置では、Nページのドキュメントに基づき、
第Xページ用の圧縮データとして通常圧縮データを含
み、第P(P≠X)ページ用の圧縮データとして、第P
ページのイメージデータの、第Xページのイメージデー
タと異なる部分の位置及び内容を示した差分圧縮データ
を含む圧縮ドキュメントデータであって、Xが差分圧縮
データのサイズの合計が最小となるように選択されてい
る圧縮ドキュメントデータが作成される。圧縮ドキュメ
ントデータの元となったドキュメントの各ページが共通
した部分を多く有するものであった場合、あるページに
関する差分圧縮データのサイズは、そのページに関する
通常圧縮データのサイズよりも小さくなる。そして、本
装置では、合計算出手段等により、そのような差分圧縮
データのサイズの合計が最小となるように、差分圧縮デ
ータの生成に共通に用いられるイメージデータが選択さ
れる。従って、本ドキュメント圧縮装置を用いれば、各
ページが共通した部分を多く有するドキュメント、例え
ば、表計算ソフトで作成されたドキュメントや、請求書
等の定型のドキュメントに基づき、本発明の第2の態様
のドキュメント圧縮装置で得られる圧縮ドキュメントデ
ータよりも、サイズが小さい圧縮ドキュメントデータを
得ることができる。
That is, in the document compression apparatus according to the third aspect of the present invention, based on a document of N pages,
Normal compressed data is included as compressed data for the Xth page, and Pth (P @ X)
X is compressed document data including differential compressed data indicating the position and contents of a portion of the image data of the page different from the image data of the Xth page, and X is selected such that the total size of the differential compressed data is minimized. Compressed document data is created. If each page of the document from which the compressed document data is based has many common portions, the size of the differential compressed data for a certain page is smaller than the size of the normal compressed data for that page. Then, in the present apparatus, the image data commonly used for generating the differential compressed data is selected by the total calculating means or the like so that the total size of the differential compressed data is minimized. Therefore, if the document compression apparatus is used, the second aspect of the present invention is based on a document in which each page has many common portions, for example, a document created by spreadsheet software or a standard document such as an invoice. Can obtain compressed document data having a smaller size than the compressed document data obtained by the document compression apparatus.

【0014】本発明の第4の態様のドキュメント圧縮装
置は、ドキュメントの、あるページのイメージデータを
生成イメージデータとし、かつ、それとは異なるページ
のイメージデータである基準イメージデータとした差分
圧縮データであって、前記基準イメージデータと異なっ
ている前記生成イメージデータの部分の位置及び内容を
示す差分圧縮データを、ドキュメントに含まれる全ての
2ページの組み合わせについて作成する差分圧縮データ
作成手段と、差分圧縮データ作成手段で作成されたN×
(N−1)個の差分圧縮データの中から、サイズが最も
小さい差分圧縮データを特定する特定手段と、この特定
手段で特定された差分圧縮データの作成時に基準イメー
ジデータとして用いられているイメージデータを符号化
することにより、そのイメージデータが表しているペー
ジに関する通常圧縮データを作成する通常圧縮データ作
成手段と、通常圧縮データ或いは差分圧縮データが既に
対応付けられているページに関するイメージデータを基
準イメージデータとし、かつ、通常圧縮データ或いは差
分圧縮データが未だ対応付けられていないページに関す
るイメージデータを生成イメージデータとした差分圧縮
データの中から、サイズが最も小さな差分圧縮データを
探索し、探索した差分圧縮データを、その作成に生成イ
メージデータとして用いられているイメージデータが表
しているページに対応付ける処理を、ドキュメントの通
常圧縮データが対応付けられているページを除く全ての
ページに差分圧縮データ作成手段で作成されたいずれか
の差分圧縮データが関連づけられるまで繰り返す対応付
手段と、通常圧縮データ作成手段によって作成された通
常圧縮データと、差分圧縮データ作成手段によって作成
され、対応付手段によって各ページに対応付けられた差
分圧縮データと、それらの通常圧縮データ及び差分圧縮
データがドキュメントのいずれのページに関するもので
あるかを示す情報と、各差分圧縮データがどのページの
イメージデータを基準イメージデータとして用いたもの
であるかを示す情報とを含む圧縮ドキュメントデータを
作成する圧縮ドキュメントデータ作成手段とを備える。
A document compression apparatus according to a fourth aspect of the present invention uses differential compressed data in which image data of a certain page of a document is used as generated image data and reference image data which is image data of a different page from the document. A differential compressed data generating means for generating differential compressed data indicating a position and contents of a portion of the generated image data different from the reference image data for all combinations of two pages included in the document; N × created by data creation means
A specifying means for specifying the smallest differential compressed data from the (N-1) differential compressed data; and an image used as reference image data when creating the differential compressed data specified by the specifying means. A normal compressed data generating means for generating normal compressed data for the page represented by the image data by encoding the data; and a standard compressed data generating means for generating the normal compressed data or differential compressed data. The difference compression data having the smallest size was searched for from the difference compression data which was generated as image data, and image data of a page to which normal compression data or difference compression data was not yet associated was generated. The difference compression data is used as the generated image data for its creation. The process of associating the page represented by the used image data with the differential compressed data created by the differential compressed data creating means is performed on all pages except the page to which the normal compressed data of the document is associated. Associating means that repeats until they are associated, normal compressed data created by the normal compressed data creating means, differential compressed data created by the differential compressed data creating means, and associated with each page by the associating means; Includes information indicating which page of the document the normal compressed data and differential compressed data relate to, and information indicating which page image data of each differential compressed data is used as reference image data Create compressed document data Create compressed document data And means.

【0015】すなわち、本発明の第4の態様のドキュメ
ント圧縮装置では、Nページのドキュメントに基づき、
第Xページ用の圧縮データとして通常圧縮データを含
み、第P(P=1〜X−1、X+1〜N)ページ用の圧
縮データとして、第Pページのイメージデータの、第f
ページのイメージデータと異なる部分の位置及び内容
を示した差分圧縮データを含む圧縮ドキュメントデータ
であって、X、fが、差分圧縮データのサイズの合計
が小さくなるように選択されている圧縮ドキュメントデ
ータが作成される。圧縮ドキュメントデータの元となっ
たドキュメントの各ページが共通した部分を多く有する
ものであった場合、あるページに関する差分圧縮データ
のサイズは、そのページに関する通常圧縮データのサイ
ズよりも小さくなる。そして、本装置では、関連付手段
等により、そのような差分圧縮データのそれぞれのサイ
ズが小さくなるように、各差分圧縮データの生成に用い
られるイメージデータが選択される。従って、各ページ
が共通した部分を多く有するドキュメント、例えば、表
計算ソフトで作成されたドキュメントや、請求書等の定
型のドキュメントに対して、本ドキュメント圧縮装置を
用いれば、本発明の第1〜第3の態様のドキュメント圧
縮装置を用いた場合よりも、サイズが小さい圧縮ドキュ
メントデータが得られることになる。
That is, in the document compression apparatus according to the fourth aspect of the present invention, based on an N page document,
The compressed data for the X-th page includes normal compressed data, and the compressed data for the P-th (P = 1 to X−1, X + 1 to N) pages includes the f-th image data of the P-th page.
A compressed document data including the difference compressed data showing the position and contents of the image data and the different parts of the P page, X, compression f P has been selected such that the total size of the compressed difference data is reduced Document data is created. If each page of the document from which the compressed document data is based has many common portions, the size of the differential compressed data for a certain page is smaller than the size of the normal compressed data for that page. Then, in the present apparatus, the image data to be used for generating each differential compressed data is selected by the associating means or the like such that the size of each of the differential compressed data is reduced. Therefore, if the document compression apparatus is used for a document having many common portions on each page, for example, a document created by spreadsheet software or a fixed document such as an invoice, the first to fourth aspects of the present invention are achieved. As a result, compressed document data smaller in size than when the document compression device of the third aspect is used is obtained.

【0016】本発明の第1〜第4の態様のドキュメント
圧縮装置を実現する際には、通常圧縮データ作成手段に
よって通常圧縮データが作成されたページを除く各ペー
ジのイメージデータを符号化することにより、各ページ
に関するN−1個の通常圧縮データを作成する第2通常
圧縮データ作成手段と、通常圧縮データ作成手段によっ
て通常圧縮データが作成されたページを除く各ページに
対して、そのページに関する差分圧縮データのサイズ
が、第2通常圧縮データ作成手段で作成されたそのペー
ジに関する通常圧縮データのサイズよりも大きいか否か
を判定する判定手段とを付加し、圧縮ドキュメント作成
手段として、判定手段によって差分圧縮データの方がサ
イズが大きいと判定されたページに対しては、差分圧縮
データの代わりに当該ページに関する第2圧縮データ作
成手段で作成された通常圧縮データを含む圧縮ドキュメ
ントデータであって、第2圧縮データ作成手段で作成さ
れた通常圧縮データが用いられたページを示す情報をさ
らに含む圧縮ドキュメントデータを作成する手段を採用
することができる。
In implementing the document compression apparatus according to the first to fourth aspects of the present invention, the image data of each page except for the page where the normal compressed data is created by the normal compressed data creating means is encoded. With respect to each page except for the page for which the normal compressed data is created by the second normal compressed data creating means for creating N-1 pieces of normal compressed data for each page, Determining means for determining whether or not the size of the differential compressed data is larger than the size of the normal compressed data relating to the page created by the second normal compressed data creating means; For pages for which the size of the differential compressed data is determined to be larger by Compressed document data including normal compressed data created by the second compressed data creating means for the page, further including information indicating a page using the normal compressed data created by the second compressed data creating means. Means for creating data can be employed.

【0017】すなわち、差分圧縮データを用いることが
適当でないページに関しては通常圧縮データが用いられ
るようにドキュメント圧縮装置を構成しても良い。この
ような構成を採用すれば、どのようなドキュメントに対
しても、少なくとも従来と同等程度の圧縮率で圧縮が行
えるドキュメント圧縮装置が得られることになる。
That is, the document compression apparatus may be configured so that normally compressed data is used for pages for which it is not appropriate to use differential compressed data. By adopting such a configuration, a document compression apparatus capable of compressing any document at least at a compression ratio equivalent to that of the related art can be obtained.

【0018】また、差分圧縮データ作成手段として、生
成イメージデータと基準イメージデータとを、各イメー
ジデータを構成している所定サイズのデータである単位
データ毎に比較することにより、複数の要素データを含
む差分圧縮データであって、各要素データが、生成イメ
ージデータに含まれる、同じ内容の1つ以上の単位デー
タが連続する領域であり、基準イメージデータの対応す
る部分には当該内容の単位データが存在していない領域
である要置換領域の開始位置を示す開始位置情報と、そ
の要置換領域を構成している単位データの数を示す連続
数情報と、その要置換領域で用いられている単位データ
の内容を示す置換データとからなる差分圧縮データを作
成する手段を採用することもできる。
Further, as a differential compressed data creating means, the generated image data and the reference image data are compared for each unit data which is data of a predetermined size constituting each image data, so that a plurality of element data can be obtained. Differential compressed data, wherein each element data is an area where one or more unit data of the same content included in the generated image data are continuous, and a corresponding portion of the reference image data has a unit data of the content. , The start position information indicating the start position of the replacement required area, which is an area where no replacement exists, the continuous number information indicating the number of unit data constituting the replacement required area, and the It is also possible to employ a means for creating differential compressed data including replacement data indicating the contents of unit data.

【0019】なお、本発明のドキュメント圧縮装置が処
理対象とするドキュメントは、イメージデータが得られ
るものであればどのようなものであってもよく、例え
ば、第1ないし第Nページのイメージデータに変換でき
る情報からなる印刷データであっても良い。
The document to be processed by the document compression apparatus of the present invention may be any document as long as image data can be obtained. The print data may be information that can be converted.

【0020】本発明の第1の態様のドキュメント復元装
置は、ドキュメントの第1ページに関する通常圧縮デー
タと、それぞれ、そのドキュメントの第2ないし第Nペ
ージに関するN−1個の特殊圧縮データとを含む圧縮ド
キュメントデータであり、各特殊圧縮データが、関連す
るページのイメージデータの、前ページのイメージデー
タと異なっている部分の位置及び内容を示している圧縮
ドキュメントデータを復元するための装置であって、イ
メージデータを記憶するための記憶手段と、圧縮ドキュ
メントデータに含まれている第1ページに関する通常圧
縮データを復号することにより、ドキュメントの第1ペ
ージを表すイメージデータを記憶手段内に生成する第1
生成手段と、この第1生成手段によって記憶手段内に生
成されたイメージデータを出力する第1出力手段と、差
分圧縮データに基づき記憶手段内に記憶されたイメージ
データの内容を書き換え、書き換えによって得られたイ
メージデータを出力する処理を、圧縮ドキュメントデー
タに含まれている第2ないし第Nページに関する特殊圧
縮データに対して、順次、実行する第2出力手段とを備
える。
The document restoration apparatus according to the first aspect of the present invention includes normal compressed data relating to the first page of a document and N-1 special compressed data relating to the second to Nth pages of the document, respectively. An apparatus for restoring compressed document data, wherein each piece of special compressed data indicates the position and content of a part of the image data of the related page different from the image data of the previous page. Storage means for storing image data, and decoding means for generating image data representing the first page of the document in the storage means by decoding the normal compressed data relating to the first page contained in the compressed document data. 1
Generating means, first output means for outputting the image data generated in the storage means by the first generation means, and rewriting the contents of the image data stored in the storage means based on the differential compressed data, and obtaining the contents by rewriting. Second output means for sequentially executing the process of outputting the obtained image data on the special compressed data relating to the second to Nth pages included in the compressed document data.

【0021】このドキュメント復元装置によれば、ドキ
ュメントの第1ページに関する通常圧縮データと、それ
ぞれ、そのドキュメントの第2ないし第Nページに関す
るN−1個の特殊圧縮データとを含む圧縮ドキュメント
データであり、各特殊圧縮データが、関連するページの
イメージデータの、前ページのイメージデータと異なっ
ている部分の位置及び内容を示している圧縮ドキュメン
トデータ、例えば、本発明の第1の態様のドキュメント
圧縮装置によって作成される圧縮ドキュメントデータを
復元することができる。
According to the document restoring apparatus, the compressed document data includes the normal compressed data relating to the first page of the document and the N-1 special compressed data relating to the second to N-th pages of the document. , Compressed document data in which each special compressed data indicates the position and content of a part of the image data of the related page different from the image data of the previous page, for example, the document compression apparatus according to the first aspect of the present invention Can be restored.

【0022】なお、第1出力手段、第2出力手段は、イ
メージデータをどのような場所に出力するものであって
も良い。具体的には、記憶手段に出力するものであって
も良く、印刷装置や通信回線上に出力するものであって
も良い。
The first output means and the second output means may output the image data to any place. Specifically, the information may be output to a storage unit, or may be output to a printing device or a communication line.

【0023】本発明の第2の態様のドキュメント復元装
置は、イメージデータを記憶するための記憶手段と、圧
縮ドキュメントデータに含まれている第1ページに関す
る通常圧縮データを復号することにより、ドキュメント
の第1ページを表すイメージデータを記憶手段内に生成
する第1生成手段と、この第1生成手段によって記憶手
段内に生成されたイメージデータを出力する第1出力手
段と、記憶手段内に第1ページに関するイメージデータ
を新たに生成し、生成したイメージデータを特殊圧縮デ
ータに基づき書き換え、書き換えによって得られたイメ
ージデータを出力する処理を、圧縮ドキュメントデータ
に含まれている第2ないし第Nページに関する特殊圧縮
データに対して、順次、実行する第2出力手段とを備え
る。
A document restoring device according to a second aspect of the present invention comprises a storage means for storing image data and a normal compressed data relating to a first page included in the compressed document data, thereby decoding the document. First generating means for generating image data representing the first page in the storage means, first output means for outputting the image data generated in the storage means by the first generation means, and first data in the storage means. Processing for newly generating image data relating to a page, rewriting the generated image data based on the special compressed data, and outputting the image data obtained by the rewriting is performed on the second to Nth pages included in the compressed document data. Second output means for sequentially executing the special compressed data.

【0024】このドキュメント復元装置によれば、ドキ
ュメントの第1ページに関する通常圧縮データと、それ
ぞれ、そのドキュメントの第2ないし第Nページに関す
るN−1個の特殊圧縮データとを含む圧縮ドキュメント
データであり、各特殊圧縮データが、関連するページの
イメージデータの、第1ページのイメージデータと異な
っている部分の位置及び内容を示している圧縮ドキュメ
ントデータ、例えば、本発明の第2の態様のドキュメン
ト圧縮装置によって作成される圧縮ドキュメントデータ
を復元することができる。
According to the document restoring apparatus, the compressed document data includes the normal compressed data on the first page of the document and the N-1 special compressed data on the second through N-th pages of the document. , Compressed document data in which each special compressed data indicates the position and content of a portion of the image data of the associated page different from the image data of the first page, for example, the document compression according to the second aspect of the present invention. The compressed document data created by the device can be decompressed.

【0025】本発明の第3の態様のドキュメント復元装
置は、イメージデータを記憶するための記憶手段と、圧
縮ドキュメントデータに含まれている第Xページに対応
付けられた通常圧縮データを所定の復号手順を用いて伸
張することにより、ドキュメントの第Xページを表すイ
メージデータを記憶手段内に生成する生成手段と、この
生成手段で生成されたイメージデータを出力する第1出
力手段と、記憶手段内に第Xページに関するイメージデ
ータのコピーを生成し、生成したイメージデータのコピ
ーを差分圧縮データに基づき書き換え、書き換えによっ
て得られたイメージデータを出力する処理を、圧縮ドキ
ュメントデータに含まれている、第Xページを除く第1
ないし第Nページに関する差分圧縮データに対して、順
次、実行する第2出力手段とを備える。
According to a third aspect of the present invention, there is provided a document restoring apparatus, comprising: storage means for storing image data; and predetermined decoding of normal compressed data associated with the X-th page included in the compressed document data. Generating means for generating image data representing the X-th page of the document in the storage means by decompressing using the procedure; first output means for outputting the image data generated by the generation means; Generating a copy of the image data related to the X-th page, rewriting the generated copy of the image data based on the differential compressed data, and outputting the image data obtained by the rewriting. The first excluding page X
A second output means for sequentially executing the differentially compressed data on the Nth page.

【0026】このドキュメント復元装置によれば、ドキ
ュメントの第Xページに関する通常圧縮データと、それ
ぞれ、そのドキュメントの第Xページを除く第1ないし
第Nページに関するN−1個の特殊圧縮データとを含む
圧縮ドキュメントデータであり、各特殊圧縮データが、
関連するページのイメージデータの、第Xページのイメ
ージデータと異なっている部分の位置及び内容を示して
いる圧縮ドキュメントデータ、例えば、本発明の第3の
態様のドキュメント圧縮装置によって作成される圧縮ド
キュメントデータを復元することができる。
According to this document restoring apparatus, the document includes normal compressed data on the Xth page of the document and N-1 specially compressed data on the first to Nth pages except the Xth page of the document. Compressed document data, each special compressed data,
Compressed document data indicating the position and content of a portion of the image data of the related page different from the image data of the Xth page, for example, a compressed document created by the document compression apparatus according to the third aspect of the present invention Data can be restored.

【0027】なお、本発明の第3の態様のドキュメント
復元装置を実現する際には、第1出力手段が、第2出力
手段による第X−1ページに関する差分圧縮データに対
する処理が実行された後、第2出力手段による第X+1
ページに関する差分圧縮データに対する処理が実行され
る前に機能するようにしておくことが望ましい。すなわ
ち、ページ順にイメージデータを出力できるようにして
おくことが望ましい。
In implementing the document restoring apparatus according to the third aspect of the present invention, the first output unit performs processing on the differentially compressed data relating to the X-1 page by the second output unit. , The X + 1-th output by the second output means
It is desirable that the function be performed before the processing on the differentially compressed data relating to the page is executed. That is, it is desirable to be able to output image data in page order.

【0028】また、本発明の第1〜第3の態様のドキュ
メント復元装置を実現するに際して、第2出力手段とし
て、処理すべきページに関する特殊圧縮データが通常圧
縮データであった場合には、その通常圧縮データを復号
することにより、当該ページを表すイメージデータを記
憶手段内に生成し、生成したイメージデータを出力する
手段を採用することもできる。このような第2出力手段
を採用した場合には、特殊圧縮データとして、復号によ
ってイメージデータが生成される通常圧縮データを含む
ことがある圧縮ドキュメントデータを復元できるドキュ
メント復元装置が得られることになる。すなわち、上記
第2出力手段が採用された本発明の第1〜第3の態様の
ドキュメント復元装置を用いれば、それぞれ、第2通常
圧縮データ作成手段等が付加された本発明の第1ないし
第3の態様のドキュメント圧縮装置によって作成された
圧縮データを復元できることになる。
In implementing the document restoring device according to the first to third aspects of the present invention, when the special compressed data relating to the page to be processed is the normal compressed data, the second output means It is also possible to employ a means for generating image data representing the page in the storage means by decoding the compressed data and outputting the generated image data. When such a second output unit is employed, a document restoring apparatus capable of restoring compressed document data which may include, as special compressed data, normal compressed data whose image data is generated by decoding is obtained. . That is, by using the document decompression devices according to the first to third aspects of the present invention in which the second output means is employed, the first to third aspects of the present invention to which the second normal compressed data creating means and the like are respectively added. The compressed data created by the document compression apparatus according to the third aspect can be restored.

【0029】本発明の第4の態様のドキュメント復元装
置は、イメージデータを記憶するための記憶手段と、圧
縮ドキュメントデータに含まれている第Xページに関連
する通常圧縮データを復号することにより、ドキュメン
トの第Xページを表すイメージデータを記憶手段内に生
成する第1生成手段と、記憶手段内に記憶されたイメー
ジデータを、圧縮ドキュメントファイルに含まれる特殊
圧縮データに応じて書き換えることにより、その特殊圧
縮データが関連するページを表すイメージデータを生成
する第2生成手段と、記憶手段内に第2生成手段によっ
て書き換えられるイメージデータを用意する用意手段
と、対応付情報に応じて、第2生成手段、あるいは、用
意手段と第2生成手段の双方を機能させることによっ
て、記憶手段内に第Xページを除く第1ないし第Nペー
ジのイメージデータを生成するとともに、記憶手段内に
生成された第1ないし第Nページのイメージデータを出
力する生成・出力制御手段とを備える。
According to a fourth aspect of the present invention, there is provided a document restoring apparatus, comprising: storage means for storing image data; and decoding of normal compressed data related to an X-th page included in compressed document data. A first generation unit for generating image data representing the X-th page of the document in the storage unit; and rewriting the image data stored in the storage unit in accordance with the special compressed data included in the compressed document file. Second generating means for generating image data representing a page to which the special compressed data is related; preparing means for preparing image data to be rewritten by the second generating means in a storage means; Means or both the preparation means and the second generation means, so that the Xth It generates the first to the image data of the N pages except over di-, and a generation-output control means for outputting the image data of the first to N pages generated in the storage means.

【0030】このドキュメント復元装置によれば、ドキ
ュメントの第Xページに関する通常圧縮データと、その
ドキュメントの第Xページを除く第1ないし第Nページ
に関するN−1個の特殊圧縮データと、各特殊圧縮デー
タを他ページに対応付ける対応付情報とを含む圧縮ドキ
ュメントデータであり、各特殊圧縮データが、関連する
ページのイメージデータの、対応付情報で対応づけられ
ている他ページのイメージデータと異なっている部分の
位置及び内容を示している圧縮ドキュメントデータ、例
えば、本発明の第4の態様のドキュメント圧縮装置によ
って作成される圧縮ドキュメントデータを復元すること
ができる。
According to the document restoring apparatus, the normal compressed data relating to the X-th page of the document, the N-1 special compressed data relating to the first to N-th pages excluding the X-th page of the document, and each special compression data Compressed document data including association information for associating data with another page, and each special compressed data is different from image data of another page associated with the association information of the image data of the associated page Compressed document data indicating the position and content of the part, for example, compressed document data created by the document compression apparatus according to the fourth aspect of the present invention, can be restored.

【0031】本発明の第4の態様のドキュメント復元装
置を実現する際には、生成・出力手段として、対応付情
報によって通常圧縮データが用いられていることが示さ
れている特殊圧縮データに対しては、その特殊圧縮デー
タを復号することにより、その特殊圧縮データが関連す
るページを表すイメージデータを記憶手段内に生成する
手段を採用することができる。
In implementing the document restoring apparatus according to the fourth aspect of the present invention, special compressed data for which normal compressed data is indicated by the association information as generation / output means is used. In other words, it is possible to adopt a means for generating image data representing a page to which the special compressed data is related in the storage means by decoding the special compressed data.

【0032】この生成・出力手段を採用したドキュメン
ト復元装置によれば、特殊圧縮データとして、復号によ
ってイメージデータが生成される通常圧縮データを含む
ことがある、通常圧縮データが用いられた特殊圧縮デー
タを識別するための情報と、通常圧縮データが用いられ
ていない特殊圧縮データを他ページに対応づける情報と
からなる対応付情報を含む圧縮ドキュメントデータを復
元することができる。すなわち、上記生成・出力手段が
採用された本発明の第4の態様のドキュメント復元装置
を用いれば、第2通常圧縮データ作成手段等が付加され
た本発明の第4の態様のドキュメント圧縮装置によって
作成された圧縮ドキュメントデータを復元できることに
なる。
According to the document restoring apparatus employing the generating / outputting means, the special compressed data which includes the normal compressed data which may generate the image data by decoding may be included as the special compressed data. , And compressed document data including association information including information for associating special compressed data that does not normally use compressed data with another page. That is, by using the document restoring device of the fourth aspect of the present invention employing the above-mentioned generating / outputting means, the document compressing device of the fourth aspect of the present invention to which the second normal compressed data creating means and the like are added The created compressed document data can be restored.

【0033】本発明の第1の態様のドキュメント圧縮方
法は、第1ないし第Nページからなるドキュメントに基
づき、そのドキュメントの第1ないし第Nページのイメ
ージデータを復元できる圧縮ドキュメントデータを作成
するための方法であって、ドキュメントの第1ページの
イメージデータを符号化することにより、第1ページに
関する通常圧縮データを作成する通常圧縮データ作成ス
テップと、それぞれ、ドキュメントの第2ないし第Nペ
ージのイメージデータを生成イメージデータとし、か
つ、直前のページのイメージデータを基準イメージデー
タとしたN−1個の差分圧縮データであって、前記基準
イメージデータと異なっている前記生成イメージデータ
の部分の位置及び内容を示すN−1個の差分圧縮データ
を作成する差分圧縮データ作成ステップと、通常圧縮デ
ータ作成ステップにおいて作成された通常圧縮データ
と、差分圧縮データ作成ステップにおいて作成されたN
−1個の差分圧縮データと、各通常圧縮データ及び差分
圧縮データがドキュメントのいずれのページに関するも
のであるかを示す情報とを含む圧縮ドキュメントデータ
を作成する圧縮ドキュメントデータ作成ステップとを含
む。
A document compression method according to a first aspect of the present invention is for generating compressed document data capable of restoring image data of the first to Nth pages of a document based on the document including the first to Nth pages. A normal compressed data generating step of generating normal compressed data for the first page by encoding image data of the first page of the document; and an image of the second to Nth pages of the document, respectively. N-1 pieces of differential compressed data using data as generated image data and image data of the immediately preceding page as reference image data, wherein the position of a portion of the generated image data that is different from the reference image data; Differential compression to create N-1 differential compressed data indicating the contents And over data creation step, and usually compressed data created in the normal compression data generating step, was created in the differential compressed data creation step N
A compressed document data generating step of generating compressed document data including one differential compressed data and information indicating which page of the document each of the normal compressed data and the differential compressed data is related to.

【0034】すなわち、本発明の第1の態様のドキュメ
ント圧縮方法では、Nページのドキュメントに基づき、
第1ページ用の圧縮データとして通常圧縮データを含
み、第P(P=2〜N)ページ用の圧縮データとして、
第Pページのイメージデータの、第P−1のイメージデ
ータと異なる部分の位置及び内容を示した差分圧縮デー
タを含む圧縮ドキュメントデータが作成される。圧縮ド
キュメントデータの元となったドキュメントの各ページ
が共通した部分を多く有するものであった場合、あるペ
ージに関する差分圧縮データのサイズは、そのページに
関する通常圧縮データのサイズよりも小さくなる。従っ
て、各ページが共通した部分を多く有するドキュメン
ト、例えば、表計算ソフトで作成されたドキュメント
や、請求書等の定型のドキュメントに対して、本ドキュ
メント圧縮方法を用いれば、従来方法を用いた場合より
も、サイズが小さい圧縮ドキュメントデータが得られる
ことになる。
That is, in the document compression method according to the first aspect of the present invention, based on N pages of a document,
Normal compressed data is included as compressed data for the first page, and compressed data for the Pth page (P = 2 to N) is
Compressed document data including differential compressed data indicating the position and content of a portion of the image data of the Pth page different from the P-1 image data is created. If each page of the document from which the compressed document data is based has many common portions, the size of the differential compressed data for a certain page is smaller than the size of the normal compressed data for that page. Therefore, if this document compression method is used for a document in which each page has many common portions, for example, a document created by spreadsheet software or a fixed document such as an invoice, the conventional method is used. Thus, compressed document data having a smaller size can be obtained.

【0035】本発明の第2の態様のドキュメント圧縮方
法は、ドキュメントの第1ページのイメージデータを符
号化することにより、第1ページに関する通常圧縮デー
タを作成する通常圧縮データ作成ステップと、それぞ
れ、ドキュメントの第2ないし第Nページのイメージデ
ータを生成イメージデータとし、かつ、第1ページのイ
メージデータを基準イメージデータとしたN−1個の差
分圧縮データであって、前記基準イメージデータと異な
っている前記生成イメージデータの部分の位置及び内容
を示すN−1個の差分圧縮データを作成する差分圧縮デ
ータ作成ステップと、通常圧縮データ作成ステップにお
いて作成された通常圧縮データと、差分圧縮データ作成
ステップにおいて作成されたN−1個の差分圧縮データ
と、それらの通常圧縮データ及び差分圧縮データがドキ
ュメントのいずれのページに関するものであるかを示す
情報とを含む圧縮ドキュメントデータを作成する圧縮ド
キュメントデータ作成ステップとを含む。
A document compression method according to a second aspect of the present invention includes a normal compressed data generating step of generating normal compressed data for a first page by encoding image data of a first page of the document. N-1 pieces of differentially compressed data using the image data of the second to Nth pages of the document as generated image data and the image data of the first page as reference image data, which is different from the reference image data. A differential compressed data generating step of generating N-1 differential compressed data indicating a position and contents of a portion of the generated image data, a normal compressed data generated in the normal compressed data generating step, and a differential compressed data generating step N-1 differentially compressed data created in Data and compressed difference data and a compressed document data creation step of creating a compressed document data including the information indicating whether it relates to one of the pages of the document.

【0036】すなわち、本発明の第2の態様のドキュメ
ント圧縮方法では、Nページのドキュメントに基づき、
第1ページ用の圧縮データとして通常圧縮データを含
み、第P(P=2〜N)ページ用の圧縮データとして、
第Pページのイメージデータの、第1ページのイメージ
データと異なる部分の位置及び内容を示した差分圧縮デ
ータを含む圧縮ドキュメントデータが作成される。圧縮
ドキュメントデータの元となったドキュメントの各ペー
ジが共通した部分を多く有するものであった場合、ある
ページに関する差分圧縮データのサイズは、そのページ
に関する通常圧縮データのサイズよりも小さくなる。従
って、各ページが共通した部分を多く有するドキュメン
ト、例えば、表計算ソフトで作成されたドキュメント
や、請求書等の定型のドキュメントに対して、本ドキュ
メント圧縮方法を用いれば、従来方法を用いた場合より
も小さいサイズの圧縮ドキュメントデータを得ることが
できる。
That is, in the document compression method according to the second aspect of the present invention, based on N pages of a document,
Normal compressed data is included as compressed data for the first page, and compressed data for the Pth page (P = 2 to N) is
Compressed document data including differential compressed data indicating the position and content of a portion of the image data of the Pth page different from the image data of the first page is created. If each page of the document from which the compressed document data is based has many common portions, the size of the differential compressed data for a certain page is smaller than the size of the normal compressed data for that page. Therefore, if this document compression method is used for a document in which each page has many common portions, for example, a document created by spreadsheet software or a fixed document such as an invoice, the conventional method is used. Thus, compressed document data of a smaller size can be obtained.

【0037】本発明の第3の態様のドキュメント圧縮方
法は、ドキュメントの、あるページのイメージデータを
生成イメージデータとし、かつ、それとは異なるページ
のイメージデータである基準イメージデータとした差分
圧縮データであって、前記基準イメージデータと異なっ
ている前記生成イメージデータの部分の位置及び内容を
示す差分圧縮データを、ドキュメントに含まれる全ての
2ページの組み合わせについて作成する差分圧縮データ
作成ステップと、差分圧縮データ作成ステップで作成さ
れたN×(N−1)個の差分圧縮データを、同じイメー
ジデータが基準イメージデータとして使用されているN
−1個の差分圧縮データからなるN個のグループに分類
し、各グループに含まれるN−1個の差分圧縮データの
サイズの合計を算出する合計算出ステップと、この合計
算出ステップにおいて算出された合計が最も小さいグル
ープ内の差分圧縮データの作成時に基準イメージデータ
として使用されているイメージデータを符号化すること
により、そのイメージデータが表しているページに関す
る通常圧縮データを作成する通常圧縮データ作成ステッ
プと、通常圧縮データ作成ステップにおいて作成された
通常圧縮データと、合計算出ステップにおいて算出され
た合計が最も小さいグループに含まれるN−1個の差分
圧縮データと、それらの通常圧縮データ及び差分圧縮デ
ータがドキュメントのいずれのページに関するものであ
るかを示す情報を含む圧縮ドキュメントデータを作成す
る圧縮ドキュメントデータ作成ステップとを含む。
A document compression method according to a third aspect of the present invention is a method for compressing differential data using image data of a certain page of a document as generated image data and reference image data which is image data of a different page from the document. A differential compressed data generating step of generating differential compressed data indicating a position and a content of a part of the generated image data different from the reference image data for all combinations of two pages included in the document; The N × (N−1) difference compressed data created in the data creation step is converted into N using the same image data as the reference image data.
A total calculation step of classifying into N groups of -1 differential compressed data and calculating the total size of the N-1 differential compressed data included in each group; and calculating the total in the total calculating step. A normal compressed data creating step of encoding the image data used as the reference image data at the time of creating the differential compressed data in the group having the smallest sum to create the normal compressed data for the page represented by the image data And the normal compressed data created in the normal compressed data creating step, the N-1 difference compressed data included in the group having the smallest sum calculated in the sum calculation step, the normal compressed data and the difference compressed data Is information about which page of the document And a compressed document data creation step to create a non-compressed document data.

【0038】すなわち、本発明の第3の態様のドキュメ
ント圧縮方法では、Nページのドキュメントに基づき、
第Xページ用の圧縮データとして通常圧縮データを含
み、第P(P=1〜X−1、X+1〜N)ページ用の圧
縮データとして、第Pページのイメージデータの、第X
ページのイメージデータと異なる部分の位置及び内容を
示した差分圧縮データを含む圧縮ドキュメントデータで
あって、Xが差分圧縮データのサイズの合計が最小とな
るように選択されている圧縮ドキュメントデータが作成
される。圧縮ドキュメントデータの元となったドキュメ
ントの各ページが共通した部分を多く有するものであっ
た場合、あるページに関する差分圧縮データのサイズ
は、そのページに関する通常圧縮データのサイズよりも
小さくなる。そして、本ドキュメント圧縮方法では、合
計算出ステップ等における処理により、そのような差分
圧縮データのサイズの合計が最小となるように、差分圧
縮データの生成に共通に用いられるイメージデータが選
択される。従って、各ページが共通した部分を多く有す
るドキュメント、例えば、表計算ソフトで作成されたド
キュメントや、請求書等の定型のドキュメントに対し
て、本ドキュメント圧縮方法を用いれば、本発明の第2
の態様のドキュメント圧縮方法を用いた場合よりも小さ
いサイズの圧縮ドキュメントデータを得ることができ
る。
That is, in the document compression method according to the third aspect of the present invention, based on a document of N pages,
The compressed data for the Xth page includes normal compressed data, and the compressed data for the Pth page (P = 1 to X−1, X + 1 to N) includes the Xth page of the image data of the Pth page.
Creates compressed document data including differential compressed data indicating the position and contents of a part different from the image data of the page, wherein X is selected such that the total size of the differential compressed data is minimized. Is done. If each page of the document from which the compressed document data is based has many common portions, the size of the differential compressed data for a certain page is smaller than the size of the normal compressed data for that page. In the document compression method, image data commonly used for generating differential compressed data is selected by processing in a total calculation step or the like such that the total size of such differential compressed data is minimized. Therefore, if this document compression method is used for a document having many common portions on each page, for example, a document created by spreadsheet software or a fixed document such as an invoice, the second aspect of the present invention is achieved.
Thus, compressed document data having a smaller size than the case of using the document compression method according to the aspect can be obtained.

【0039】本発明の第4の態様のドキュメント圧縮方
法は、ドキュメントの、あるページのイメージデータを
生成イメージデータとし、かつ、それとは異なるページ
のイメージデータである基準イメージデータとした差分
圧縮データであって、前記基準イメージデータと異なっ
ている前記生成イメージデータの部分の位置及び内容を
示す差分圧縮データを、ドキュメントに含まれる全ての
2ページの組み合わせについて作成する差分圧縮データ
作成ステップと、差分圧縮データ作成ステップで作成さ
れたN×(N−1)個の差分圧縮データの中から、サイ
ズが最も小さい差分圧縮データを特定する特定ステップ
と、この特定ステップで特定された差分圧縮データの作
成時に基準イメージデータとして用いられているイメー
ジデータを符号化することにより、そのイメージデータ
が表しているページに関する通常圧縮データを作成する
通常圧縮データ作成ステップと、差分圧縮データによっ
て、通常圧縮データ或いは差分圧縮データが既に対応付
けられているいずれかのページに関するイメージデータ
を基準イメージデータとし、かつ、通常圧縮データ或い
は差分圧縮データが未だ対応付けられていないいずれか
のページに関するイメージデータを生成イメージデータ
として作成されている差分圧縮データの中から、サイズ
が最も小さな差分圧縮データを探索し、探索した差分圧
縮データを、その作成に生成イメージデータとして用い
られているイメージデータが表しているページに対応付
ける処理を、ドキュメントの通常圧縮データが対応付け
られているページを除く全てのページに差分圧縮データ
作成ステップで作成されたいずれかの差分圧縮データが
対応付けられるまで繰り返す対応付ステップと、通常圧
縮データ作成ステップにおいて作成された通常圧縮デー
タと、差分圧縮データ作成ステップにおいて作成されて
対応付ステップにおいて各ページに対応づけられた差分
圧縮データと、それらの通常圧縮データ及び差分圧縮デ
ータがドキュメントのいずれのページに関するものであ
るかを示す情報と、各差分圧縮データがどのページのイ
メージデータを基準イメージデータとして用いたもので
あるかを示す情報とを含む圧縮ドキュメントデータを作
成する圧縮ドキュメントデータ作成ステップとを含む。
A document compression method according to a fourth aspect of the present invention is a method for compressing differential data using image data of a certain page of a document as generated image data and reference image data which is image data of a different page from the document. A differential compressed data generating step of generating differential compressed data indicating a position and a content of a part of the generated image data different from the reference image data for all combinations of two pages included in the document; A specifying step of specifying the smallest differential compressed data from the N × (N−1) differential compressed data generated in the data generating step; and a step of generating the differential compressed data specified in the specific step. Encodes image data used as reference image data Thus, the normal compressed data creating step for creating the normal compressed data for the page represented by the image data, and the normal compressed data or the differential compressed data for any page already associated with the differential compressed data. The image data is used as the reference image data, and the image data relating to any page to which the normal compressed data or the differential compressed data is not yet associated is selected from among the differential compressed data created as the generated image data. The process of searching for small differential compressed data and associating the searched differential compressed data with the page represented by the image data used as the generated image data in the creation of the compressed differential data of the document All pages except And an associating step that is repeated until any of the differential compressed data created in the differential compressed data creating step is associated with the normal compressed data created in the normal compressed data creating step, and a differential compressed data created in the differential compressed data creating step. The differential compressed data associated with each page in the associating step, information indicating which page of the document the normal compressed data and the differential compressed data relate to, and the image of which page each differential compressed data corresponds to Generating compressed document data including information indicating whether the data is used as reference image data.

【0040】すなわち、本発明の第4の態様のドキュメ
ント圧縮方法では、Nページのドキュメントに基づき、
第Xページ用の圧縮データとして通常圧縮データを含
み、第P(P=1〜X−1、X+1〜N)ページ用の圧
縮データとして、第Pページのイメージデータの、第f
ページのイメージデータと異なる部分の位置及び内容
を示した差分圧縮データを含む圧縮ドキュメントデータ
であって、X、fが、差分圧縮データのサイズの合計
が小さくなるように選択されている圧縮ドキュメントデ
ータが作成される。圧縮ドキュメントデータの元となっ
たドキュメントの各ページが共通した部分を多く有する
ものであった場合、あるページに関する差分圧縮データ
のサイズは、そのページに関する通常圧縮データのサイ
ズよりも小さくなる。そして、本ドキュメント圧縮方法
では、対応付ステップ等における処理により、そのよう
な差分圧縮データのそれぞれのサイズが小さくなるよう
に、各差分圧縮データの生成に用いられるイメージデー
タが選択される。従って、各ページが共通した部分を多
く有するドキュメント、例えば、表計算ソフトで作成さ
れたドキュメントや、請求書等の定型のドキュメントに
対して、本ドキュメント圧縮方法を用いれば、本発明の
第1〜第3の態様のドキュメント圧縮方法を用いた場合
よりも小さいサイズの圧縮ドキュメントデータが得られ
ることになる。
That is, in the document compression method according to the fourth aspect of the present invention, based on the document of N pages,
The compressed data for the X-th page includes normal compressed data, and the compressed data for the P-th (P = 1 to X−1, X + 1 to N) pages includes the f-th image data of the P-th page.
A compressed document data including the difference compressed data showing the position and contents of the image data and the different parts of the P page, X, compression f P has been selected such that the total size of the compressed difference data is reduced Document data is created. If each page of the document from which the compressed document data is based has many common portions, the size of the differential compressed data for a certain page is smaller than the size of the normal compressed data for that page. Then, in the document compression method, the image data to be used for generating each differential compressed data is selected by the processing in the associating step or the like so that the size of each of the differential compressed data is reduced. Therefore, if the present document compression method is used for a document in which each page has many portions in common, for example, a document created by spreadsheet software or a standard document such as an invoice, the first to third aspects of the present invention are achieved. As a result, compressed document data having a smaller size than when the document compression method of the third aspect is used is obtained.

【0041】本発明の第1ないし第4の態様のドキュメ
ント圧縮方法を、通常圧縮データ作成ステップにおいて
通常圧縮データが作成されたページを除く各ページのイ
メージデータを符号化することにより、各ページに関す
るN−1個の通常圧縮データを作成する第2通常圧縮デ
ータ作成ステップと、通常圧縮データ作成ステップにお
いて通常圧縮データが作成されたページを除く各ページ
に対して、そのページに関する差分圧縮データのサイズ
が、第2通常圧縮データ作成ステップで作成されたその
ページに関する通常圧縮データのサイズよりも大きいか
否かを判定する判定ステップとを付加し、圧縮ドキュメ
ント作成ステップとして、判定ステップにおいて差分圧
縮データの方がサイズが大きいと判定されたページに対
しては、差分圧縮データの代わりに当該ページに関する
第2圧縮データ作成ステップで作成された通常圧縮デー
タを含む圧縮ドキュメントデータであって、第2圧縮デ
ータ作成ステップで作成された通常圧縮データが用いら
れたページを示す情報をさらに含む圧縮ドキュメントデ
ータを作成するステップを採用した形態で実行しても良
い。
The document compression method according to the first to fourth aspects of the present invention encodes image data of each page except for the page in which the normal compressed data was created in the normal compressed data creation step, so that each page is encoded. For each page excluding the page where the normal compressed data is created in the second normal compressed data creating step for creating N-1 pieces of normal compressed data and the size of the differential compressed data related to the page, A determination step of determining whether or not the size of the normal compressed data of the page created in the second normal compressed data creation step is larger than the size of the normal compressed data. Differential compression is applied to pages whose size is determined to be larger Indicates compressed compressed document data including normal compressed data created in the second compressed data creation step for the page, in which the normal compressed data created in the second compressed data creation step is used. It may be executed in a form adopting a step of creating compressed document data further including information.

【0042】これら、第2通常圧縮データ作成ステップ
の付加等を行ったドキュメント圧縮方法によれば、どの
ようなドキュメントに対しても、少なくとも従来と同等
程度の圧縮率で圧縮された圧縮ドキュメントデータが得
られることになる。
According to the document compression method in which the second normal compressed data creation step is added, compressed document data compressed with a compression ratio at least as high as that of the conventional document can be obtained for any document. Will be obtained.

【0043】また、差分圧縮データ作成ステップとし
て、生成イメージデータと基準イメージデータとを、各
イメージデータを構成している所定サイズのデータであ
る単位データ毎に比較することにより、複数の要素デー
タを含む差分圧縮データであって、各要素データが、生
成イメージデータに含まれる、同じ内容の1つ以上の単
位データが連続する領域であり、基準イメージデータの
対応する部分には当該内容の単位データが存在していな
い領域である要置換領域の開始位置を示す開始位置情報
と、その要置換領域を構成している単位データの数を示
す連続数情報と、その要置換領域で用いられている単位
データの内容を示す置換データとからなる差分圧縮デー
タを作成するステップを用いても良い。
In the differential compressed data creating step, the generated image data and the reference image data are compared for each unit data which is data of a predetermined size constituting each image data, so that a plurality of element data can be obtained. Differential compressed data, wherein each element data is an area where one or more unit data of the same content included in the generated image data are continuous, and a corresponding portion of the reference image data has a unit data of the content. , The start position information indicating the start position of the replacement required area, which is an area where no replacement exists, the continuous number information indicating the number of unit data constituting the replacement required area, and the A step of creating differential compressed data including replacement data indicating the contents of the unit data may be used.

【0044】また、本ドキュメント圧縮方法で処理され
るドキュメントは、複数のイメージデータが得られるも
のであればどのようなものであっても良く、例えば、第
1ないし第Nページのイメージデータに変換できる情報
からなる印刷データであっても良い。
The document to be processed by the document compression method may be any document as long as a plurality of image data can be obtained. The print data may include printable information.

【0045】本発明の第1の態様のドキュメント復元方
法は、圧縮ドキュメントデータに含まれている第1ペー
ジに関する通常圧縮データを復号することにより、ドキ
ュメントの第1ページを表すイメージデータを記憶装置
内に生成する第1生成ステップと、この第1生成ステッ
プにおいて記憶装置内に生成されたイメージデータを出
力する第1出力ステップと、差分圧縮データに基づき記
憶装置内に記憶されたイメージデータの内容を書き換
え、書き換えによって得られたイメージデータを出力す
る処理を、圧縮ドキュメントデータに含まれている第2
ないし第Nページに関する特殊圧縮データに対して、順
次、実行する第2出力ステップとを含む。
In the document restoring method according to the first aspect of the present invention, the image data representing the first page of the document is stored in the storage device by decoding the normal compressed data relating to the first page contained in the compressed document data. And a first output step of outputting the image data generated in the storage device in the first generation step, and the contents of the image data stored in the storage device based on the differential compressed data. The process of rewriting and outputting the image data obtained by the rewriting is performed by a second process included in the compressed document data.
To a special output data for the Nth page.

【0046】このドキュメント復元方法によれば、ドキ
ュメントの第1ページに関する通常圧縮データと、それ
ぞれ、そのドキュメントの第2ないし第Nページに関す
るN−1個の特殊圧縮データとを含む圧縮ドキュメント
データであり、各特殊圧縮データが、関連するページの
イメージデータの、前ページのイメージデータと異なっ
ている部分の位置及び内容を示している圧縮ドキュメン
トデータ、例えば、本発明の第1の態様のドキュメント
圧縮方法、装置によって作成された圧縮ドキュメントデ
ータを復元することができる。
According to this document restoring method, the compressed document data includes normal compressed data relating to the first page of the document and N-1 special compressed data relating to the second to Nth pages of the document. , Compressed document data in which each special compressed data indicates the position and content of a part of the image data of the related page different from the image data of the previous page, for example, the document compression method according to the first aspect of the present invention , The compressed document data created by the device can be restored.

【0047】本発明の第2の態様のドキュメント復元方
法は、圧縮ドキュメントデータに含まれている第1ペー
ジに関する通常圧縮データを復号することにより、ドキ
ュメントの第1ページを表すイメージデータを記憶装置
内に生成する第1生成ステップと、この第1生成ステッ
プにおいて記憶装置内に生成されたイメージデータを出
力する第1出力ステップと、記憶装置内に第1ページに
関するイメージデータを新たに生成し、生成したイメー
ジデータを特殊圧縮データに基づき書き換え、書き換え
によって得られたイメージデータを出力する処理を、圧
縮ドキュメントデータに含まれている第2ないし第Nペ
ージに関する特殊圧縮データに対して、順次、実行する
第2出力ステップとを含む。
According to the document restoring method of the second aspect of the present invention, the image data representing the first page of the document is stored in the storage device by decoding the normal compressed data relating to the first page contained in the compressed document data. A first generation step of generating image data, a first output step of outputting the image data generated in the storage device in the first generation step, and newly generating image data of a first page in the storage device. Processing of rewriting the compressed image data based on the special compressed data and outputting the image data obtained by the rewriting is sequentially performed on the specially compressed data related to the second to Nth pages included in the compressed document data. A second output step.

【0048】このドキュメント復元方法によれば、ドキ
ュメントの第1ページに関する通常圧縮データと、それ
ぞれ、そのドキュメントの第2ないし第Nページに関す
るN−1個の特殊圧縮データとを含む圧縮ドキュメント
データであり、各特殊圧縮データが、関連するページの
イメージデータの、第1ページのイメージデータと異な
っている部分の位置及び内容を示している圧縮ドキュメ
ントデータ、例えば、本発明の第2の態様のドキュメン
ト圧縮方法、装置によって作成される圧縮ドキュメント
データを復元することができる。
According to this document restoring method, the compressed document data includes normal compressed data for the first page of the document and N-1 special compressed data for the second to Nth pages of the document. , Compressed document data in which each special compressed data indicates the position and content of a portion of the image data of the associated page different from the image data of the first page, for example, the document compression according to the second aspect of the present invention. The compressed document data created by the method and apparatus can be decompressed.

【0049】本発明の第3の態様のドキュメント復元方
法は、圧縮ドキュメントデータに含まれている第Xペー
ジに対応付けられた通常圧縮データを所定の復号手順を
用いて伸張することにより、ドキュメントの第Xページ
を表すイメージデータを記憶装置内に生成する生成ステ
ップと、この生成ステップで生成されたイメージデータ
を出力する第1出力ステップと、記憶装置内に第Xペー
ジに関するイメージデータのコピーを生成し、生成した
イメージデータのコピーを差分圧縮データに基づき書き
換え、書き換えによって得られたイメージデータを出力
する処理を、圧縮ドキュメントデータに含まれている、
第Xページを除く第1ないし第Nページに関する差分圧
縮データに対して、順次、実行する第2出力ステップと
を含む。
In the document restoring method according to the third aspect of the present invention, the normal compressed data associated with the X-th page included in the compressed document data is decompressed by using a predetermined decoding procedure, so that the document is restored. A generating step of generating image data representing the Xth page in the storage device, a first output step of outputting the image data generated in the generating step, and generating a copy of the image data relating to the Xth page in the storage device The process of rewriting a copy of the generated image data based on the differential compressed data and outputting the image data obtained by the rewriting is included in the compressed document data.
A second output step of sequentially performing differential compression data on the first to N-th pages excluding the X-th page.

【0050】このドキュメント復元方法によれば、ドキ
ュメントの第Xページに関する通常圧縮データと、それ
ぞれ、そのドキュメントの第Xページを除く第1ないし
第Nページに関するN−1個の特殊圧縮データとを含む
圧縮ドキュメントデータであり、各特殊圧縮データが、
関連するページのイメージデータの、第Xページのイメ
ージデータと異なっている部分の位置及び内容を示して
いる圧縮ドキュメントデータ、例えば、本発明の第3の
態様のドキュメント圧縮方法、装置によって作成される
圧縮ドキュメントデータを復元することができる。
According to the document restoring method, the document includes normal compressed data on the Xth page of the document and N-1 specially compressed data on the first to Nth pages except the Xth page of the document. Compressed document data, each special compressed data,
Compressed document data indicating the location and content of a portion of the related page image data that is different from the Xth page image data, for example, created by the document compression method and apparatus according to the third aspect of the present invention. Compressed document data can be restored.

【0051】本発明の第3の態様のドキュメント復元方
法を、第1出力ステップが、第2出力ステップによる第
X−1ページに関する差分圧縮データに対する処理が実
行された後、第2出力ステップによる第X+1ページに
関する差分圧縮データに対する処理が実行される前に機
能する形態で実行すれば、復元結果をページ順に出力で
きることになる。
In the document restoring method according to the third aspect of the present invention, the first output step includes the step of executing the second output step after performing the processing on the differentially compressed data relating to the X-1 page by the second output step. If the process is performed in a form that functions before the process on the differentially compressed data relating to the X + 1 page is performed, the decompression result can be output in page order.

【0052】本発明の第1ないし第3の態様のドキュメ
ント圧縮方法を実行するに際しては、第2出力ステップ
として、処理すべきページに関する特殊圧縮データが通
常圧縮データであった場合には、その通常圧縮データを
復号することにより、当該ページを表すイメージデータ
を記憶装置内に生成し、生成したイメージデータを出力
するステップを採用することもできる。
In executing the document compression method according to the first to third aspects of the present invention, when the specially compressed data relating to the page to be processed is the normally compressed data, the second output step is performed. By decoding the compressed data, image data representing the page may be generated in the storage device, and the generated image data may be output.

【0053】これら、第2出力ステップが採用された第
1ないし第3の態様のドキュメント圧縮方法によれば、
特殊圧縮データとして、復号によってイメージデータが
生成される通常圧縮データを含むことがある圧縮ドキュ
メントデータ、例えば、第2通常圧縮データ作成手段等
が付加された本発明の第1ないし第3の態様のドキュメ
ント圧縮装置によって作成された圧縮ドキュメントデー
タ、第2通常圧縮データ作成ステップ等が付加された本
発明の第1ないし第3の態様のドキュメント圧縮方法に
よって作成された圧縮ドキュメントデータを復元できる
ことになる。
According to the document compression methods of the first to third aspects employing the second output step,
Compressed document data, which may include normal compressed data for which image data is generated by decoding as special compressed data, for example, the first to third aspects of the present invention to which a second normal compressed data creating means and the like are added. The compressed document data created by the document compression method according to the first to third aspects of the present invention to which the compressed document data created by the document compression apparatus, the second normal compressed data creation step, and the like are added can be restored.

【0054】本発明の第4の態様のドキュメント復元方
法は、圧縮ドキュメントデータに含まれている第Xペー
ジに関連する通常圧縮データを復号することにより、ド
キュメントの第Xページを表すイメージデータを記憶装
置内に生成する第1生成ステップと、記憶装置内に記憶
されたイメージデータを、圧縮ドキュメントファイルに
含まれる特殊圧縮データに応じて書き換えることによ
り、その特殊圧縮データが関連するページを表すイメー
ジデータを生成する第2生成ステップと、記憶装置内に
第2生成ステップにおいて書き換えられるイメージデー
タを用意する用意ステップと、対応付情報に応じて、第
2生成ステップ、あるいは、用意ステップと第2生成ス
テップの双方を機能させることによって、記憶装置内に
第Xページを除く第1ないし第Nページのイメージデー
タを生成するとともに、記憶装置内に生成された第1な
いし第Nページのイメージデータを出力する生成・出力
制御ステップとを含む。
In a document restoring method according to a fourth aspect of the present invention, image data representing the X-th page of a document is stored by decoding normal compressed data related to the X-th page contained in the compressed document data. A first generating step of generating in the device, and rewriting the image data stored in the storage device in accordance with the special compressed data included in the compressed document file, so that the image data representing the page to which the special compressed data is related A generation step of generating image data, a preparation step of preparing image data to be rewritten in the storage apparatus in the second generation step, and a second generation step or a preparation step and a second generation step according to the association information. , Except for the X-th page in the storage device. Or together with generating the image data of the N pages, and generating and outputting control step of outputting the image data of the first to N pages generated in the storage device.

【0055】このドキュメント復元方法によれば、ドキ
ュメントの第Xページに関する通常圧縮データと、その
ドキュメントの第Xページを除く第1ないし第Nページ
に関するN−1個の特殊圧縮データと、各特殊圧縮デー
タを他ページに対応付ける対応付情報とを含む圧縮ドキ
ュメントデータであり、各特殊圧縮データが、関連する
ページのイメージデータの、対応付情報で対応づけられ
ている他ページのイメージデータと異なっている部分の
位置及び内容を示している圧縮ドキュメントデータ、例
えば、本発明の第4の態様のドキュメント圧縮方法/装
置によって作成される圧縮ドキュメントデータを復元す
ることができる。
According to this document restoring method, the normal compressed data relating to the X-th page of the document, the N-1 special compressed data relating to the first to N-th pages excluding the X-th page of the document, and each special compressed data Compressed document data including association information for associating data with another page, and each special compressed data is different from image data of another page associated with the association information of the image data of the associated page Compressed document data indicating the location and content of the part, for example, compressed document data created by the document compression method / apparatus of the fourth aspect of the present invention, can be decompressed.

【0056】本発明の第4の態様のドキュメント復元方
法を実行するに際しては、生成・出力ステップとして、
対応付情報によって通常圧縮データが用いられているこ
とが示されている特殊圧縮データに対しては、その特殊
圧縮データを復号することにより、その特殊圧縮データ
が関連するページを表すイメージデータを記憶装置内に
生成するステップを採用することができる。
When the document restoring method according to the fourth aspect of the present invention is executed, the generation and output steps include:
For special compressed data that indicates that normal compressed data is used by the association information, the special compressed data is decoded to store image data representing the page related to the special compressed data. A step of generating in the device may be employed.

【0057】このような生成・出力ステップを採用した
ドキュメント復元方法によれば、特殊圧縮データとし
て、復号によってイメージデータが生成される通常圧縮
データを含むことがある圧縮ドキュメントデータであっ
て、通常圧縮データが用いられた特殊圧縮データを識別
するための情報と、通常圧縮データが用いられていない
特殊圧縮データを他ページに対応づける情報とからなる
対応付情報を含む圧縮ドキュメントデータを復元するこ
とができる。すなわち、上記生成・出力ステップが採用
された本発明の第4の態様のドキュメント復元方法を用
いれば、第2通常圧縮データ作成手段等が付加された本
発明の第4の態様のドキュメント圧縮装置、第2通常圧
縮データ作成ステップ等が付加された本発明の第4の態
様のドキュメント圧縮方法によって作成された圧縮ドキ
ュメントデータを復元できることになる。
According to the document restoring method employing such a generation / output step, compressed document data which may include, as special compressed data, normally compressed data whose image data is generated by decoding, and It is possible to decompress compressed document data including information for identifying special compressed data in which data is used and information for associating special compressed data for which normal compressed data is not used with other pages. it can. That is, by using the document restoring method of the fourth aspect of the present invention in which the above-mentioned generation / output step is adopted, the document compressing apparatus of the fourth aspect of the present invention to which the second normal compressed data creating means and the like are added, The compressed document data created by the document compression method according to the fourth aspect of the present invention to which the second normal compressed data creation step and the like are added can be restored.

【0058】そして、本発明のコンピュータ読取可能な
記録媒体は、コンピュータを上記した本発明のドキュメ
ント圧縮装置あるいはドキュメント復元装置として動作
させるためのプログラムが記録されている。従って、本
発明のコンピュータ読取可能な記録媒体を用いれば、コ
ンピュータで、元となったドキュメントの各ページのイ
メージデータを復元できる、従来よりもサイズが小さな
圧縮ドキュメントデータを作成でき、また、その圧縮ド
キュメントデータを復元できることになる。
The computer readable recording medium of the present invention stores a program for causing a computer to operate as the above-described document compression device or document decompression device of the present invention. Therefore, by using the computer-readable recording medium of the present invention, it is possible to create compressed document data having a smaller size than before, which enables the computer to restore the image data of each page of the original document. Document data can be restored.

【0059】[0059]

【発明の実施の形態】以下、本発明の実施の形態を図面
を参照して具体的に説明する。
Embodiments of the present invention will be specifically described below with reference to the drawings.

【0060】まず、図1を用いて、本発明の第1ないし
第7実施形態に係るドキュメント圧縮/復元装置のハー
ドウェア構成及び動作の概要を説明する。
First, the outline of the hardware configuration and operation of the document compression / decompression device according to the first to seventh embodiments of the present invention will be described with reference to FIG.

【0061】図示したように、各実施形態に係るドキュ
メント圧縮/復元装置は、ディスプレイ11と入力装置
12と印刷装置13と制御装置14とで構成されてい
る。
As shown, the document compression / decompression device according to each embodiment includes a display 11, an input device 12, a printing device 13, and a control device 14.

【0062】制御装置14は、主な構成要素として、制
御部21、RAM(random access memory)22、HDD
(hard disk drive)23、通信制御部24、ディスプレ
イ制御回路25、インタフェース回路26、27、CD
−ROM(compact disc read‐only memory)ドライブ2
8、及び、これらを相互に接続するバス29を備える。
The control device 14 includes a control unit 21, a RAM (random access memory) 22, an HDD
(hard disk drive) 23, communication control unit 24, display control circuit 25, interface circuits 26 and 27, CD
-ROM (compact disc read-only memory) drive 2
8 and a bus 29 for interconnecting them.

【0063】ディスプレイ11は、入力されたRGB信
号に応じた映像を表示する機器であり、制御装置14の
ディスプレイ制御回路25に接続されている。ディスプ
レイ制御回路25は、VRAMを内蔵し、そのVRAM
に記憶されたデータに応じたRGB信号を出力する回路
である。入力装置12は、操作者が本装置に対して各種
の指示を入力するために用いる機器(キーボードとマウ
ス)である。印刷装置13は、用紙上にデータを出力す
るための機器である。入力装置12、印刷装置13は、
制御部21との間のデータ転送のタイミング制御等を行
うインタフェース回路26、27を介してバス29(制
御部21)に接続されている。
The display 11 is a device for displaying an image according to the input RGB signals, and is connected to the display control circuit 25 of the control device 14. The display control circuit 25 has a built-in VRAM,
Is a circuit that outputs an RGB signal corresponding to the data stored in the. The input device 12 is a device (keyboard and mouse) used by an operator to input various instructions to the device. The printing device 13 is a device for outputting data on paper. The input device 12 and the printing device 13
It is connected to a bus 29 (control unit 21) via interface circuits 26 and 27 for performing timing control of data transfer with the control unit 21 and the like.

【0064】CD−ROMドライブ28は、CD−RO
Mの読取装置である。通信制御部24は、いわゆる、モ
デムとネットワークインタフェース回路とからなり、デ
ータ伝送路18、19(各実施形態では、公衆回線とL
AN回線)に接続される。RAM22は、各種のデータ
を一時的に記憶しておくための記憶装置である。HDD
23は、各種のデータをファイル化して保存しておくた
めの記憶装置であり、HDD23には、OS(operating
system)、OS上で動作する各種のアプリケーションプ
ログラムが記憶されている。また、HDD23には、C
D−ROM15からCD−ROMドライブ28を介して
インストールされたドキュメント圧縮/復元プログラム
(詳細は後述)も記憶されている。
The CD-ROM drive 28 has a CD-RO
M reading device. The communication control unit 24 includes a so-called modem and a network interface circuit. The data transmission lines 18 and 19 (in each embodiment, the public line and the L
AN line). The RAM 22 is a storage device for temporarily storing various data. HDD
Reference numeral 23 denotes a storage device for storing various data in a file and storing the data in the HDD.
system) and various application programs running on the OS. The HDD 23 has C
A document compression / decompression program (details will be described later) installed from the D-ROM 15 via the CD-ROM drive 28 is also stored.

【0065】制御部21は、CPU(central processin
g unit)と、ブートストラッププログラム等が記憶され
たROM(read only memory)とを含むユニットであり、
電源が投入された際、制御部21(CPU)は、ROM
内のブートストラッププログラムに従って、HDD23
内にインストールされているOSをRAM22の所定の
記憶領域に読み出す。その後、読み出したOSに従った
制御を開始し、あるプログラムの実行を指示する操作が
入力装置12に対して行われたことを検出した際には、
HDD23内の当該プログラムをRAM22上に読み出
し、その読み出したプログラムに従った制御を開始す
る。
The control unit 21 has a CPU (central processin).
g unit) and a ROM (read only memory) storing a bootstrap program and the like.
When the power is turned on, the control unit 21 (CPU)
HDD 23 according to the bootstrap program in
Is read into a predetermined storage area of the RAM 22. Thereafter, control according to the read OS is started, and when it is detected that an operation for instructing execution of a certain program is performed on the input device 12,
The program in the HDD 23 is read onto the RAM 22, and control according to the read program is started.

【0066】すなわち、各実施形態に係るドキュメント
圧縮/復元装置は、一般的な構成のコンピュータ(コン
ピュータシステム)に、ドキュメント圧縮/復元プログ
ラムをインストールすることによって実現された装置と
なっている。
That is, the document compression / decompression device according to each of the embodiments is a device realized by installing a document compression / decompression program on a computer (computer system) having a general configuration.

【0067】各実施形態に係るドキュメント圧縮/復元
装置にインストールされているドキュメント圧縮/復元
プログラムは、圧縮プログラムと復元プログラムとを含
む。圧縮プログラムは、複数ページのイメージデータを
復元することができる圧縮ドキュメントファイルが作成
される処理である圧縮処理を制御部21に実行させるた
めのプログラムである。復元プログラムは、圧縮ドキュ
メントファイルに基づきイメージデータが復元、出力さ
れる処理である復元処理を制御部21に実行させるため
のプログラムである。
The document compression / decompression program installed in the document compression / decompression device according to each embodiment includes a compression program and a decompression program. The compression program is a program for causing the control unit 21 to execute a compression process for creating a compressed document file capable of restoring a plurality of pages of image data. The decompression program is a program for causing the control unit 21 to execute a decompression process for decompressing and outputting image data based on the compressed document file.

【0068】各実施形態に係るドキュメント圧縮/復元
装置の圧縮処理の対象となるドキュメントには、同一サ
イズの複数のイメージデータからなるドキュメント(以
下、イメージドキュメントと表記する)と、文書作成プ
ログラムや表計算プログラムで作成されたドキュメント
(以下、通常ドキュメントと表記する)とがある。イメ
ージドキュメントに対する圧縮処理時には、当該イメー
ジドキュメントを構成する複数のイメージデータがその
まま用いられて、それらのイメージデータを復元できる
データを含む圧縮ドキュメントファイルが作成される。
また、通常ドキュメントに対する圧縮処理時には、その
ドキュメントの印刷結果を表す複数のイメージデータが
作成される。そして、それらのイメージデータに基づき
圧縮ドキュメントファイルが作成される。なお、各実施
形態に係るドキュメント圧縮/復元装置は、OS上から
圧縮プログラムの実行を指示した際にイメージドキュメ
ントに対する圧縮処理が行え、アプリケーションプログ
ラム上から印刷を指示した際に通常ドキュメントに対す
る圧縮処理が行えるように構成されている。すなわち、
圧縮プログラムは、アプリケーションプログラムとして
も、一種のプリンタドライバとしても機能するものとな
っている。
Documents to be subjected to compression processing by the document compression / decompression device according to each embodiment include a document composed of a plurality of image data of the same size (hereinafter referred to as an image document), a document creation program and a table. There is a document created by a calculation program (hereinafter referred to as a normal document). At the time of compression processing on an image document, a plurality of image data constituting the image document are used as they are, and a compressed document file including data capable of restoring the image data is created.
Also, during compression processing on a normal document, a plurality of image data representing a print result of the document is created. Then, a compressed document file is created based on the image data. Note that the document compression / decompression device according to each embodiment can perform compression processing on an image document when instructing execution of a compression program from the OS, and perform compression processing on a normal document when instructing printing from an application program. It is configured to be able to do it. That is,
The compression program functions as both an application program and a kind of printer driver.

【0069】以下、第1ないし第7実施形態に係るドキ
ュメント圧縮/復元装置の動作の詳細を順に説明する。
Hereinafter, details of the operation of the document compression / decompression device according to the first to seventh embodiments will be sequentially described.

【0070】<第1実施形態>まず、図2を用いて、第
1実施形態に係るドキュメント圧縮/復元装置によって
作成される圧縮ドキュメントファイルの構成を説明す
る。
<First Embodiment> First, the structure of a compressed document file created by the document compression / decompression device according to the first embodiment will be described with reference to FIG.

【0071】図示したように、第1実施形態に係るドキ
ュメント圧縮/復元装置によって作成される圧縮ドキュ
メントファイル31は、圧縮データ数Mmaxと、Mmax個
の圧縮データとを含む。この圧縮ドキュメントファイル
31の作成時(詳細は後述)には、圧縮データ数Mmax
として、処理対象ドキュメントの総ページ数が設定され
る。すなわち、圧縮ドキュメントファイル31は、その
元となったドキュメントの総ページ数と同数の圧縮デー
タを含むファイルとなっている。
As shown, the compressed document file 31 created by the document compression / decompression device according to the first embodiment includes the number Mmax of compressed data and Mmax pieces of compressed data. When the compressed document file 31 is created (the details will be described later), the number of compressed data Mmax
Is set as the total number of pages of the document to be processed. That is, the compressed document file 31 is a file including the same number of compressed data as the total number of pages of the original document.

【0072】圧縮ドキュメントファイル31に含まれる
圧縮データ#1は、処理対象ドキュメントの第1ページ
目のイメージデータを、一般的な手順で符号化(圧縮)
することにより得られたデータ(以下、通常圧縮データ
とも表記する)である。一方、他の各圧縮データ#d
(d=2〜Mmax)は、第dページのイメージデータと
第d−1ページのイメージデータとに基づき作成され
た、要素データ数NmaxとNmax個の要素データとからな
るデータ(以下、差分圧縮データとも表記する)となっ
ている。また、差分圧縮データに含まれる各要素データ
は、位置データと置換データとで構成されている。
The compressed data # 1 included in the compressed document file 31 encodes (compresses) the image data of the first page of the document to be processed by a general procedure.
(Hereinafter also referred to as normal compressed data). On the other hand, each other compressed data #d
(D = 2 to Mmax) is data composed of the element data number Nmax and Nmax element data created on the basis of the image data of the d-th page and the image data of the d-1 page (hereinafter referred to as differential compression). (Also referred to as data). Each element data included in the differential compression data is composed of position data and replacement data.

【0073】以下、本ドキュメント圧縮/復元装置にお
ける圧縮ドキュメントファイル31作成手順を説明する
ことによって、圧縮ドキュメントファイル31を構成し
ている各データの意味を説明する。
Hereinafter, the meaning of each data constituting the compressed document file 31 will be described by describing a procedure for creating the compressed document file 31 in the document compression / decompression apparatus.

【0074】図3に、第1実施形態に係るドキュメント
圧縮装置において、処理対象ドキュメントから圧縮ドキ
ュメントファイル31が作成される際に実行される圧縮
処理の流れ図を、図4に、圧縮処理時に実行される差分
圧縮データ作成処理の流れ図を示す。既に説明したよう
に、本ドキュメント圧縮装置によって処理可能なドキュ
メントには、通常ドキュメント(文書作成プログラムや
表計算プログラムで作成されたドキュメント)とイメー
ジドキュメント(同一サイズの複数のイメージデータか
らなるドキュメント)とがあるが、図示した圧縮処理
は、両ドキュメントに対して共通して実行されるものと
なっている。ただし、イメージドキュメントから圧縮ド
キュメントファイル31が作成される際には、ステップ
S101が実行される前に、イメージドキュメントを構
成する複数のイメージデータファイルのファイル名を操
作者から取得する処理が行われる。
FIG. 3 is a flowchart of a compression process executed when a compressed document file 31 is created from a document to be processed in the document compression apparatus according to the first embodiment. FIG. 3 is a flowchart of differential compressed data creation processing. As described above, the documents that can be processed by the document compression apparatus include a normal document (a document created by a document creation program or a spreadsheet program) and an image document (a document including a plurality of image data of the same size). However, the illustrated compression process is performed commonly for both documents. However, when the compressed document file 31 is created from the image document, a process of acquiring the file names of a plurality of image data files constituting the image document from the operator is performed before step S101 is executed.

【0075】図3に示したように、圧縮処理時、制御部
21は、まず、処理を行っているページの番号を記憶す
るための変数Mに“1”を設定する(ステップS10
1)。そして、処理対象ドキュメントの第1ページ目の
イメージデータを、イメージ#1としてRAM22上に
用意する(ステップS102)。すなわち、制御部21
は、通常ドキュメントが処理対象であった場合には、ア
プリケーションプログラムから渡される印刷データに基
づき、指定されている解像度のイメージデータをRAM
22上に作成し、そのイメージデータを“1”(=M)
と関連づけた形で管理する。イメージドキュメントが処
理対象であった場合には、第1ページ用のイメージデー
タファイルの内容を読み出し、RAM22上に“1”と
関連づけた形で記憶する。
As shown in FIG. 3, during the compression processing, the control unit 21 first sets "1" to a variable M for storing the number of the page being processed (step S10).
1). Then, the image data of the first page of the document to be processed is prepared on the RAM 22 as the image # 1 (step S102). That is, the control unit 21
Normally, when a document is to be processed, image data of a designated resolution is stored in RAM based on print data passed from an application program.
22 and the image data is "1" (= M)
It is managed in a form related to. If the image document is to be processed, the contents of the image data file for the first page are read and stored in the RAM 22 in a form associated with “1”.

【0076】イメージ#1をRAM22上に用意した
後、制御部21は、そのイメージ#1に含まれる単位デ
ータの数をkmaxとして記憶する(ステップS103)。
なお、単位データとは、後述する差分圧縮データ作成処
理時に処理単位とされる所定サイズ(本実施形態では、
1バイト)のデータのことである。
After preparing the image # 1 on the RAM 22, the control section 21 stores the number of unit data included in the image # 1 as kmax (step S103).
It should be noted that the unit data is a predetermined size (in the present embodiment,
(1 byte) data.

【0077】その後、制御部21は、RAM22上のイ
メージ#1を符号化(本実施形態ではランレングス符号
化)することにより、RAM22上に圧縮データ#1を
作成する(ステップS104)。なお、このステップで
作成される圧縮データ#1は、自身のサイズや、復元さ
れるイメージデータの解像度に関する情報を含むもので
ある。
Thereafter, the control unit 21 creates compressed data # 1 on the RAM 22 by encoding (run-length encoding in this embodiment) the image # 1 on the RAM 22 (step S104). The compressed data # 1 created in this step includes information on its own size and the resolution of the restored image data.

【0078】そして、制御部21は、処理すべきページ
が残っているか否かを判断する(ステップS105)。
処理すべきページが残っていた場合(ステップS10
5;YES)、制御部21は、RAM22上のイメージ
#Mを基準イメージとして認識する(ステップS10
6)。すなわち、イメージ#Mを基準イメージとして使
用することを記憶する。その後、Mに“1”を加算(ス
テップS107)し、RAM22上に、処理対象ドキュ
メントの第Mページのイメージデータを、イメージ#M
として用意する(ステップS108)。そして、制御部
21は、圧縮データ#Mを作成する処理である差分圧縮
データ作成処理(ステップS109)を開始する。
Then, the control section 21 determines whether or not there is a page to be processed (step S105).
When there is a page to be processed (step S10
5; YES), the control unit 21 recognizes the image #M on the RAM 22 as a reference image (step S10).
6). That is, the fact that image #M is used as the reference image is stored. Thereafter, "1" is added to M (step S107), and the image data of the Mth page of the document to be processed is stored in the RAM 22 in the image #M.
(Step S108). Then, the control unit 21 starts differential compressed data creation processing (step S109), which is processing for creating compressed data #M.

【0079】図4に示したように、差分圧縮データ作成
処理開始時、制御部21は、処理を行う単位データの単
位データ番号を記憶するための変数kに“1”を設定す
るとともに、圧縮データ#Mに含めた要素データ数をカ
ウントするための変数iに“0”を設定する(ステップ
S201)。なお、単位データ番号とは、イメージデー
タを構成するkmax個の単位データから1つの単位デー
タを識別するための情報であり、本装置では、イメージ
データの先頭の単位データに単位データ番号“1”が与
えられている。
As shown in FIG. 4, at the start of the differential compressed data creation process, the control unit 21 sets “1” to a variable k for storing the unit data number of the unit data to be processed, The variable i for counting the number of element data included in the data #M is set to "0" (step S201). The unit data number is information for identifying one unit data from kmax unit data constituting the image data. In the present apparatus, the unit data number “1” is assigned to the head unit data of the image data. Is given.

【0080】この後、制御部21は、イメージ#Mの単
位データ#kと基準イメージ(すなわち、イメージ#M
−1)の単位データ#kとを比較(ステップS202)
し、イメージ#Mの単位データ#kが基準イメージの単
位データ#kと一致していた場合(ステップS203;
YES)には、kに“1”を加算(ステップS206)
してから、kがkmax以下であるか否かを判断する(ス
テップS207)。
Thereafter, the control unit 21 transmits the unit data #k of the image #M and the reference image (that is, the image #M).
-1) is compared with the unit data #k (step S202)
Then, when the unit data #k of the image #M matches the unit data #k of the reference image (step S203;
YES), "1" is added to k (step S206).
Then, it is determined whether or not k is equal to or smaller than kmax (step S207).

【0081】一方、イメージ#Mの単位データ#kと基
準イメージの単位データ#kとが一致していなかった場
合(ステップS203;NO)、制御部21は、iに
“1”を加算する(ステップS204)。そして、k、
イメージ#Mの単位データ#kを、それぞれ、圧縮デー
タ#Mの要素データ#iの位置データ、置換データとし
て記憶する(ステップS205)。すなわち、要素デー
タを構成している位置データは、圧縮データを作成しよ
うとしているイメージデータの、基準イメージとして使
用されているイメージデータと内容が異なっている単位
データの位置を示すデータとなっており、置換データ
は、圧縮データを作成しようとしているイメージデータ
の当該位置の単位データの内容を示すデータとなってい
る。
On the other hand, if the unit data #k of the image #M does not match the unit data #k of the reference image (step S203; NO), the control unit 21 adds "1" to i (step S203). Step S204). And k,
The unit data #k of the image #M is stored as the position data and the replacement data of the element data #i of the compressed data #M (step S205). In other words, the position data constituting the element data is data indicating the position of the unit data of the image data for which compressed data is to be created, which has a different content from the image data used as the reference image. The replacement data is data indicating the contents of the unit data at that position in the image data for which compressed data is to be created.

【0082】その後、制御部21は、kに“1”を加算
(ステップS206)してから、kがkmax(ステップ
S103で取得しているイメージ#1に含まれる単位デ
ータ数)以下であるか否かを判断する(ステップS20
7)。そして、kがkmax以下であった場合(ステップ
S207;YES)には、ステップS202に戻り、次
の単位データに対する処理を開始する。一方、kがkma
xを超えていた場合(ステップS207;YES)、す
なわち、単位データ#kmaxの比較がステップS202
で行われていた場合には、その時点におけるiの値を圧
縮データ#Mの要素データ数Nmaxとして記憶(ステッ
プS208)し、差分圧縮データ作成処理を終了する。
Thereafter, the control unit 21 adds “1” to k (step S206), and then determines whether k is equal to or smaller than kmax (the number of unit data included in the image # 1 acquired in step S103). Is determined (step S20).
7). If k is equal to or smaller than kmax (step S207; YES), the process returns to step S202 to start the process for the next unit data. On the other hand, k is kma
If it exceeds x (step S207; YES), that is, the comparison of the unit data #kmax is performed in step S202.
If the processing has been performed in step S208, the value of i at that time is stored as the number of element data Nmax of the compressed data #M (step S208), and the differential compressed data creation processing ends.

【0083】差分圧縮データ作成処理(図3:ステップ
S109)の実行後、制御部21は、RAM22上の基
準イメージ(イメージ#M−1)を破棄する(ステップ
S110)。すなわち、イメージ#M−1の記憶に使用
されていた記憶領域を開放し、他のデータの記憶に使用
できるようにする。そして、制御部21は、ステップS
105に戻り、処理すべきページが残っているか否かを
判断する。
After executing the differential compressed data creation process (FIG. 3: step S109), the control unit 21 discards the reference image (image # M-1) on the RAM 22 (step S110). That is, the storage area used for storing the image # M-1 is released so that it can be used for storing other data. Then, the control unit 21 determines in step S
Returning to 105, it is determined whether or not there is a page to be processed.

【0084】処理すべきページが残っていた場合(ステ
ップS105;YES)、制御部21は、次ページに対
してステップS106〜S110の処理を行う。そし
て、処理対象ドキュメントの全てのページに対する処理
を終えたとき(ステップS105;NO)に、それまで
の処理によって得られている圧縮データ数Mmax(その
時点におけるMの値)、圧縮データ#1〜#Mmaxを用
いて、圧縮ドキュメントファイル31をHDD23内に
作成する(ステップS111)。そして、不要となった
RAM上のデータ(イメージ#Mmaxと圧縮データ#1
〜#Mmax)を破棄(図示せず)して、圧縮処理を終了
する。
If there is a page to be processed (step S105; YES), the control unit 21 performs the processing of steps S106 to S110 on the next page. Then, when the processing for all pages of the processing target document is completed (step S105; NO), the number of compressed data Mmax (the value of M at that time) obtained by the processing up to that point, the compressed data # 1 to A compressed document file 31 is created in the HDD 23 using #Mmax (step S111). Then, the unnecessary data on the RAM (image #Mmax and compressed data # 1)
To #Mmax) (not shown), and the compression process ends.

【0085】以下、総ページ数が“3”である通常ドキ
ュメントが処理対象とされた場合を例に、図5を用い
て、第1実施形態に係るドキュメント圧縮/復元装置の
圧縮処理時の動作をさらに具体的に説明する。
The operation of the document compression / decompression apparatus according to the first embodiment at the time of compression processing will be described below with reference to FIG. 5, taking as an example a case where a normal document whose total number of pages is “3” is to be processed. Will be described more specifically.

【0086】第1ページ目の印刷データに対しては、図
5(1)に示したような処理が行われる。すなわち、印
刷データに応じた内容のイメージ#1がRAM22上に
作成され、そのイメージ#1の圧縮により通常圧縮デー
タである圧縮データ#1が作成される。また、イメージ
#1のサイズに基づき、イメージ#1を構成している単
位データ総数kmaxが認識される。
The processing shown in FIG. 5A is performed on the print data of the first page. That is, an image # 1 having contents corresponding to the print data is created on the RAM 22, and the compressed image # 1 creates compressed data # 1 which is normally compressed data. Further, based on the size of the image # 1, the total number kmax of unit data constituting the image # 1 is recognized.

【0087】第2ページ目の印刷データに対しては、図
5(2)に示したような処理が行われる。すなわち、印
刷データに応じたイメージ#2がRAM22上に作成さ
れる。そして、その新たに作成されたイメージ#2と、
既に作成されているイメージ#1との比較により、イメ
ージ#1を基準イメージとしたイメージ#2の差分圧縮
データである圧縮データ#2が作成される。
The processing shown in FIG. 5B is performed on the print data of the second page. That is, an image # 2 corresponding to the print data is created on the RAM 22. And the newly created image # 2,
By comparison with the already created image # 1, compressed data # 2, which is differential compression data of image # 2 using image # 1 as a reference image, is created.

【0088】第3ページ目の印刷データに対しても、同
様の手順の処理が行われる。すなわち、図5(3)に示
したように、前ページのイメージデータ(イメージ#
2)を残した状態で、印刷データに応じたイメージ#3
がRAM22上に作成される。そして、イメージ#3と
イメージ#2との比較により、イメージ#2を基準イメ
ージとしたイメージ#3の差分圧縮データである圧縮デ
ータ#3が作成される。そして、それまでの処理によっ
て得られている圧縮データ数Mmaxと圧縮データ#1〜
#3とを含む圧縮ドキュメントファイル31がHDD2
3内に作成される。
The same procedure is performed on the print data of the third page. That is, as shown in FIG. 5C, the image data of the previous page (image #
Image # 3 according to print data with 2) left
Is created on the RAM 22. Then, by comparing image # 3 with image # 2, compressed data # 3, which is differential compression data of image # 3 using image # 2 as a reference image, is created. Then, the number of compressed data Mmax obtained by the processing up to that time and the compressed data # 1 to
The compressed document file 31 including # 3 is stored in the HDD 2
3 is created.

【0089】次に、図6及び図7を用いて、第1実施形
態に係るドキュメント圧縮/復元装置における圧縮ドキ
ュメントファイル31の復元手順を説明する。なお、図
6は、本ドキュメント圧縮/復元装置において実行され
る復元処理の流れ図であり、図7は、復元処理時に実行
される差分圧縮データ復元処理の流れ図である。
Next, the procedure for restoring the compressed document file 31 in the document compression / decompression device according to the first embodiment will be described with reference to FIGS. FIG. 6 is a flowchart of a decompression process executed by the document compression / decompression device, and FIG. 7 is a flowchart of a differential compression data decompression process executed during the decompression process.

【0090】図6に示したように、復元処理時、制御部
21は、まず、操作者から復元処理条件を取得する(ス
テップS301)。具体的には、このステップにおいて
制御部21は、復元を行う圧縮ドキュメントファイルの
ファイル名、復元ページ範囲指定情報、出力先指定情報
等からなる復元処理条件を取得する。復元ページ範囲指
定情報は、復元(出力)を行うページ範囲を指定する情
報であり、復元開始ページ番号Psと復元終了ページ番
号Pe(≧Ps)とからなる。出力先指定情報は、復元結
果(Ps〜Peページのイメージデータ)の出力先を指定
する情報である。出力先指定情報としては、HDD23
(あるいは他装置の補助記憶装置)内にファイルとして
保存することを指定する情報や、印刷装置13に出力す
ることを指定する情報、FAX送信することを指定する
情報を設定できるようになっている。
As shown in FIG. 6, at the time of restoration processing, the control unit 21 first acquires restoration processing conditions from the operator (step S301). More specifically, in this step, the control unit 21 acquires a restoration processing condition including a file name of the compressed document file to be restored, restoration page range designation information, output destination designation information, and the like. The restoration page range designation information is information for designating a page range for restoration (output), and includes a restoration start page number Ps and a restoration end page number Pe (≧ Ps). The output destination designation information is information for designating the output destination of the restoration result (image data of the Ps to Pe pages). The output destination designation information includes the HDD 23
(Or an auxiliary storage device of another device), information for designating a file to be saved, information for designating output to the printing device 13, and information for designating fax transmission can be set. .

【0091】復元処理条件の取得後、制御部21は、処
理を行う圧縮データの圧縮データ番号を記憶するための
変数Mに“1”を設定する(ステップS302)。既に
説明した圧縮ドキュメントファイル31の作成手順から
明らかなように、圧縮データ番号mの圧縮データは、第
mページのイメージデータを復元するためのデータとな
っているので、この圧縮データ番号は、復元によって得
られるイメージデータのページ番号を表す情報にもなっ
ている。
After obtaining the decompression processing conditions, the control unit 21 sets "1" to a variable M for storing the compressed data number of the compressed data to be processed (step S302). As is clear from the procedure for creating the compressed document file 31 described above, the compressed data with the compressed data number m is data for restoring the image data of the m-th page. It is also information indicating the page number of the image data obtained by the above.

【0092】Mに“1”を設定した後、制御部21は、
復元が指示されている圧縮ドキュメントファイル31に
含まれている圧縮データ数Mmaxを取得する(ステップS
303)。すなわち、復元処理条件として与えられてい
るファイル名を有するファイルから所定サイズのデータ
を読み出すことによって、圧縮データ数Mmaxを取得す
る。なお、図示は省略したが、制御部21は、このステ
ップの直後に、正当な(処理可能な)復元ページ範囲指
定情報が与えられているか否かを判断する(この処理が
行われているのは、ステップS301で復元ページ範囲
指定情報の正当性をチェックしていないためである)。
具体的には、Mmax<Peであるか否か、Ps>Mmaxであ
るか否かを判断し、Mmax<Peであった場合には、Pe
にMmaxを設定してから、ステップS304を実行す
る。また、Ps>Mmaxであった場合には、復元処理を終
了する。
After setting "1" to M, the control unit 21
The number of compressed data Mmax included in the compressed document file 31 for which restoration is instructed is obtained (step S).
303). That is, by reading data of a predetermined size from a file having a file name given as a decompression processing condition, the number of compressed data Mmax is obtained. Although not shown, immediately after this step, the control unit 21 determines whether or not valid (processable) restoration page range designation information is given (this processing is performed). This is because the validity of the restored page range designation information has not been checked in step S301).
Specifically, it is determined whether or not Mmax <Pe, and whether or not Ps> Mmax. If Mmax <Pe, Pe is determined.
Is set to Mmax, and then step S304 is executed. If Ps> Mmax, the restoration process ends.

【0093】ステップS304において、制御部21
は、圧縮ドキュメントファイル31内の圧縮データ#1
を伸張することにより、RAM22上にイメージ#1を
生成する。このステップの処理時、制御部21は、圧縮
データ#1の先頭部分に設定されている、圧縮データ#
1のサイズ、圧縮データ#1が表しているイメージデー
タの解像度等からなる情報を利用する。
In step S304, control unit 21
Is the compressed data # 1 in the compressed document file 31
To generate an image # 1 on the RAM 22. At the time of processing in this step, the control unit 21 sets the compressed data # 1 set at the head of the compressed data # 1.
1 is used, and information including the resolution of the image data represented by the compressed data # 1 is used.

【0094】その後、制御部21は、MがPs以上であ
るか否かを判断する(ステップS305)。MがPs未
満であった場合(ステップS305;NO)、制御部2
1は、ステップS308に進む。一方、MがPs以上で
あった場合(ステップS305;YES)、制御部21
は、RAM22上のイメージ#Mを、出力先指定情報に
よって指定されている出力先に出力する(ステップS3
06)。すなわち、HDD23への出力が指示されてい
る場合には、イメージ#Mを基に、HDD23内に第M
ページに関するイメージデータファイルを作成する。ま
た、印刷が指示されていた場合には、印刷装置13にイ
メージ#Mを印刷させるために、インタフェース回路2
7にイメージ#Mを供給する。FAX送信が指示されて
いた場合には、イメージ#Mを通信制御部24に供給す
る。なお、FAX送信が指示されていた場合には、第1
ページ目のイメージデータの出力を行う前に、送信先と
回線を接続するための処理が行われる。
Thereafter, the control section 21 determines whether or not M is equal to or greater than Ps (step S305). If M is less than Ps (step S305; NO), the control unit 2
In step S308, the process proceeds to step S308. On the other hand, if M is equal to or greater than Ps (step S305; YES), the control unit 21
Outputs the image #M on the RAM 22 to the output destination specified by the output destination specifying information (step S3).
06). That is, when the output to the HDD 23 is instructed, the M-th data is stored in the HDD 23 based on the image #M.
Create an image data file for the page. If printing has been instructed, the interface circuit 2 causes the printing device 13 to print the image #M.
7 is supplied with image #M. If FAX transmission has been instructed, image #M is supplied to communication control unit 24. If FAX transmission has been instructed, the first
Before outputting the image data of the page, processing for connecting the transmission destination and the line is performed.

【0095】イメージ#Mの出力(ステップS306)
後、制御部21は、M<Peが成立しているか否かを判
断する(ステップS307)。そして、M<Peが成立
していた場合(ステップS307;NO)には、ステッ
プS308に進む。
Output of Image #M (Step S306)
Thereafter, the control unit 21 determines whether M <Pe holds (step S307). If M <Pe holds (step S307; NO), the process proceeds to step S308.

【0096】ステップS308において、制御部21
は、イメージ#Mを基準イメージとして認識する。そし
て、Mに“1”を加算(ステップS309)し、基準イ
メージと圧縮データ#Mとに基づきイメージ#Mを生成
する処理である差分圧縮データ復元処理(ステップS3
10)を実行する。
In step S308, the control unit 21
Recognizes image #M as a reference image. Then, "1" is added to M (step S309), and a differential compressed data restoration process (step S3) for generating an image #M based on the reference image and the compressed data #M.
Execute 10).

【0097】図7に示したように、差分圧縮データ復元
処理時、制御部21は、まず、圧縮データ#Mの要素デ
ータ数Nmaxを取得する(ステップS401)。なお、こ
の要素データ数Nmaxの取得は、処理したデータの次位
置のデータを圧縮ドキュメントファイル31から読み出
すことにより行われる。例えば、M=2のときに実行さ
れる差分圧縮データ復元処理時には、圧縮ドキュメント
ファイル31内の、圧縮データ#1(ステップS304
で処理されている)の次位置に存在する所定サイズのデ
ータが、要素データ数Nmaxとして読み出される。
As shown in FIG. 7, at the time of differential compressed data decompression processing, the control unit 21 first obtains the number Nmax of element data of the compressed data #M (step S401). The acquisition of the element data number Nmax is performed by reading the data at the next position of the processed data from the compressed document file 31. For example, at the time of differential compressed data restoration processing executed when M = 2, compressed data # 1 in the compressed document file 31 (step S304)
The data of a predetermined size existing at the next position of (processed in (1)) is read out as the element data number Nmax.

【0098】要素データ数Nmaxの取得後、制御部21
は、要素データ番号を記憶するための変数iに“1”を
設定(ステップS402)し、iの値がNmax以下である
か否かを判断する(ステップS403)。iの値がNmax
以下であった場合(ステップS403;YES)、制御
部21は、圧縮ドキュメントファイル31から、圧縮デ
ータ#Mの要素データ#i(位置データと置換データ)
を取得する(ステップS404)。すなわち、圧縮ドキ
ュメントファイル31内の、既に処理したデータの次位
置に存在する所定サイズのデータを要素データ#iとし
て取得する。
After obtaining the number Nmax of element data, the control unit 21
Sets "1" to a variable i for storing an element data number (step S402), and determines whether or not the value of i is equal to or smaller than Nmax (step S403). The value of i is Nmax
If it is below (step S403; YES), the control unit 21 sends the element data #i of the compressed data #M (the position data and the replacement data) from the compressed document file 31.
Is acquired (step S404). That is, data of a predetermined size existing at the next position of already processed data in the compressed document file 31 is acquired as element data #i.

【0099】その後、制御部21は、RAM22上に記
憶されている基準イメージ(イメージ#M−1)の、取
得した位置データが示す位置の単位データを、取得した
置換データに変更する(ステップS405)。すなわ
ち、置換データが、基準イメージの、位置データを単位
データ番号とする単位データとなるように基準イメージ
の内容を書き換える。その後、iに“1”を加算(ステ
ップS406)してから、ステップS403に戻り、変
更したiの値とNmaxとを比較する。そして、i≦Nmax
が成立していた場合(ステップS403;YES)に
は、ステップS404〜S406の処理を再度実行し、
i≦Nmaxが成立していなかった場合(ステップS40
3;NO)、すなわち、ステップS404、S405に
おいて、要素データ#Nmaxに対する処理を行ったとき
に、差分圧縮データ復元処理を終了する。
Thereafter, the control section 21 changes the unit data of the position indicated by the acquired position data of the reference image (image # M-1) stored in the RAM 22 to the acquired replacement data (step S405). ). That is, the content of the reference image is rewritten so that the replacement data becomes unit data having the position data as the unit data number of the reference image. Thereafter, "1" is added to i (step S406), and the process returns to step S403 to compare the changed value of i with Nmax. And i ≦ Nmax
Is satisfied (step S403; YES), the processing of steps S404 to S406 is executed again,
When i ≦ Nmax is not satisfied (step S40)
3; NO), that is, when the processing on the element data #Nmax is performed in steps S404 and S405, the differential compressed data restoration processing ends.

【0100】差分圧縮データ復元処理(図6:ステップ
S310)後、制御部21は、ステップS305からの
処理を再び実行する。制御部21は、このような処理を
繰り返し、M<Peが成立しなくなったとき(ステップ
S307;NO)、すなわち、ステップS310におい
て第Pe(=M)ページに関するイメージデータが作成
され、ステップS306においてその出力が行われたと
きに、出力が終わったイメージ#Mを破棄(ステップS
311)して、復元処理を終了する。
After the differential compressed data decompression processing (FIG. 6, step S310), the control unit 21 executes the processing from step S305 again. The control unit 21 repeats such processing, and when M <Pe is not satisfied (step S307; NO), that is, in step S310, image data relating to the Pe (= M) page is created, and in step S306, When the output is performed, the output image #M is discarded (step S).
311) Then, the restoration processing ends.

【0101】以下、3ページからなるドキュメントを基
に作成された圧縮ドキュメントファイル31の復元を、
復元ページ範囲を全ページ(Ps=1、Pe=3)として
指定した場合と、第3ページのみの復元を指定した場合
とを例に、本ドキュメント圧縮装置で実行される復元処
理の内容をさらに具体的に説明する。なお、いずれの場
合においても、HDD23が出力先として指定されてい
るものとする。
Hereinafter, restoration of a compressed document file 31 created based on a three-page document will be described.
The contents of the restoring process executed by the document compression apparatus will be further described by taking as an example a case where the restoration page range is specified as all pages (Ps = 1, Pe = 3) and a case where the restoration of only the third page is specified. This will be specifically described. In any case, it is assumed that the HDD 23 is specified as the output destination.

【0102】前者の場合、図8に模式的に示したような
手順の処理が行われ、第1〜第3ページのイメージデー
タが出力される。
In the former case, the processing of the procedure as schematically shown in FIG. 8 is performed, and the image data of the first to third pages is output.

【0103】すなわち、図8(1)に示したように、ま
ず、圧縮ドキュメントファイル31の圧縮データ数Mma
x(この場合、3)が認識される。また、通常圧縮デー
タである圧縮データ#1が伸張され、RAM22上にイ
メージ#1が生成される。そして、M(=1)≧Ps
(=1)が成立するので、ステップS306において、
そのイメージ#1が、指定されている出力先であるHD
D23に出力される。
That is, as shown in FIG. 8A, first, the number of compressed data Mma of the compressed document file 31 is
x (in this case, 3) is recognized. Also, compressed data # 1 which is normal compressed data is decompressed, and image # 1 is generated on RAM 22. Then, M (= 1) ≧ Ps
Since (= 1) holds, in step S306,
That image # 1 is the HD that is the designated output destination
Output to D23.

【0104】この後、M<Peが成立するので、イメー
ジ#Mが基準イメージとして認識された後、Mが“2”
に変更される(ステップS308、S309)。そし
て、圧縮データ#2に対する差分圧縮データ復元処理が
行われるので、図8(2)に示したように、イメージ#
1がイメージ#2に書き換えられる。また、M(=2)
≧Psが成立しているので、そのイメージ#2のイメー
ジデータファイルがHDD23内に作成される。
Thereafter, since M <Pe holds, after image #M is recognized as the reference image, M becomes “2”.
(Steps S308 and S309). Then, since the differential compressed data decompression process is performed on the compressed data # 2, as shown in FIG.
1 is rewritten to image # 2. Also, M (= 2)
Since ≧ Ps holds, an image data file of the image # 2 is created in the HDD 23.

【0105】イメージ#2の出力後に行われるステップ
S307でも、M(=2)<Pe(=3)が成立するの
で、イメージ#2が基準イメージとして認識される。そ
して、Mが“3”に変更された後、差分圧縮データ復元
処理が実行されるので、図8(3)に示したように、イ
メージ#2の書き換えによりイメージ#3が生成され
る。また、M>Psであるので、そのイメージ#3のイ
メージデータファイルがHDD23内に作成され、M
(=3)<Pe(=3)が成立しなくなっているので、
復元処理が終了される。
Also in step S307 performed after the output of image # 2, since M (= 2) <Pe (= 3) holds, image # 2 is recognized as the reference image. Then, after M is changed to “3”, the differential compressed data decompression process is executed, so that the image # 2 is rewritten to generate the image # 3 as shown in FIG. Since M> Ps, an image data file of the image # 3 is created in the HDD 23, and
Since (= 3) <Pe (= 3) is no longer satisfied,
The restoration processing ends.

【0106】一方、第3ページのみの出力が指示されて
いた場合(Ps=Pe=3)、図9に模式的に示したよう
な手順の処理が行われ、第3ページのイメージデータの
みが出力される。
On the other hand, when the output of only the third page has been instructed (Ps = Pe = 3), the process of the procedure schematically shown in FIG. 9 is performed, and only the image data of the third page is output. Is output.

【0107】すなわち、図9(1)に示したように、ま
ず、圧縮ドキュメントファイル31の圧縮データ数Mma
x(この場合、3)が認識される。また、ステップS3
04において、通常圧縮データである圧縮データ#1が
伸張され、RAM22上にイメージ#1が生成される。
そして、M(=1)≧Ps(=3)が成立していないの
で、イメージ#1が出力されることなく、ステップS3
08からの処理が実行される。
That is, as shown in FIG. 9A, first, the number of compressed data Mma of the compressed document file 31 is
x (in this case, 3) is recognized. Step S3
At 04, the compressed data # 1, which is normally compressed data, is decompressed, and an image # 1 is generated on the RAM 22.
Then, since M (= 1) ≧ Ps (= 3) is not established, the image # 1 is not output, and step S3 is performed.
The process from 08 is executed.

【0108】ステップS308からの処理では、図9
(2)に示したような処理が行われる。すなわち、イメ
ージ#1が基準イメージとして認識された後、Mが
“2”に変更される。そして、基準データ(イメージ#
1)が圧縮データ#2に応じて書き換えられ、イメージ
#2が生成される。このイメージ#2の生成後に実行さ
れるステップS305においても、M(=2)≧Psが
成立していないので、イメージ#2が出力されることな
く、ステップS308からの処理が実行される。
In the processing from step S308, FIG.
The processing as shown in (2) is performed. That is, after image # 1 is recognized as the reference image, M is changed to “2”. Then, the reference data (image #
1) is rewritten according to the compressed data # 2, and an image # 2 is generated. Also in step S305 executed after generation of the image # 2, since M (= 2) ≧ Ps is not established, the processing from step S308 is executed without outputting the image # 2.

【0109】この場合におけるステップS308からの
処理では、イメージ#2が基準イメージとして認識され
た後、Mが“3”に変更され、差分圧縮データ復元処理
が実行される。その結果、図9(3)に示したように、
基準データ(イメージ#2)を基にイメージ#3が生成
される。また、M(=3)≧Ps(=3)が成立してる
ので、イメージ#3の出力が行われる。そして、M<P
eが成立していないので、復元処理が終了される。
In the processing from step S308 in this case, after image # 2 is recognized as the reference image, M is changed to "3" and the differential compressed data restoration processing is executed. As a result, as shown in FIG.
Image # 3 is generated based on the reference data (image # 2). Further, since M (= 3) ≧ Ps (= 3) is satisfied, the image # 3 is output. And M <P
Since e does not hold, the restoration process ends.

【0110】すなわち、本ドキュメント圧縮/復元装置
によって作成される圧縮ドキュメントファイル31内の
各差分圧縮データは、前ページのイメージデータを基準
イメージとしたものとなっているため、圧縮データ#P
を復元するためには、圧縮データ#P−1の復元結果が
必要とされる。そして、単独で復元できる圧縮データ
は、圧縮データ#1だけであるので、上記したように、
圧縮データ#1から圧縮データ#3までが順次復元さ
れ、圧縮データ#3の復元結果が出力される。
That is, since each difference compressed data in the compressed document file 31 created by the document compression / decompression apparatus is based on the image data of the previous page as the reference image, the compressed data #P
In order to decompress the compressed data # P-1, the result of decompression of the compressed data # P-1 is required. Since the compressed data that can be independently restored is only the compressed data # 1, as described above,
The compressed data # 1 to # 3 are sequentially decompressed, and the decompression result of the compressed data # 3 is output.

【0111】以上、説明したように、第1実施形態に係
るドキュメント圧縮/復元装置では、1つの通常圧縮デ
ータとN−1個の差分圧縮データとを含む圧縮ドキュメ
ントファイル31が作成される。処理対象とされたドキ
ュメントの各ページが共通した部分を多く有するもので
あった場合、あるページに関する差分圧縮データのサイ
ズは、そのページに関する通常圧縮データのサイズより
も小さくなる。従って、各ページが共通した部分を多く
有するドキュメント、例えば、表計算ソフトで作成され
たドキュメントや、請求書等の定型のドキュメントに対
して、本ドキュメント圧縮/復元装置を用いれば、従来
よりも高い圧縮率で圧縮されたデータ(圧縮ドキュメン
トファイル)が得られることになる。
As described above, in the document compression / decompression device according to the first embodiment, a compressed document file 31 including one piece of normal compressed data and N-1 pieces of differentially compressed data is created. If the pages of the document to be processed have many common portions, the size of the differential compressed data for a certain page is smaller than the size of the normal compressed data for the page. Therefore, if the document compression / decompression device is used for a document having many common portions on each page, for example, a document created by spreadsheet software or a fixed document such as an invoice, the document compression / decompression device is higher than before. Data (compressed document file) compressed at the compression rate is obtained.

【0112】<第2実施形態>図10に、第2実施形態
に係るドキュメント圧縮/復元装置によって作成される
圧縮ドキュメントファイル32の構成を示す。図示した
ように、圧縮ドキュメントファイル32は、圧縮データ
数Mmax及び先頭位置データ#2〜#Mmaxとからなる管
理データと、Mmax個の圧縮データとを含む。
<Second Embodiment> FIG. 10 shows the structure of a compressed document file 32 created by a document compression / decompression device according to a second embodiment. As illustrated, the compressed document file 32 includes management data including the number Mmax of compressed data and head position data # 2 to #Mmax, and Mmax pieces of compressed data.

【0113】先頭位置データ#2〜#Mmaxは、それぞ
れ、圧縮データ#2〜#Mmaxの先頭位置を、圧縮ドキ
ュメントファイル32の先頭からの相対アドレスで表し
たデータである。なお、圧縮データ#2〜#Mmaxに関
する先頭位置データが存在している理由、圧縮データ#
1に関する先頭位置データが存在していない理由につい
ては後述する。圧縮データ#1は、圧縮ドキュメントフ
ァイル31内の圧縮データ#1と同じく、処理対象ドキ
ュメントの第1ページのイメージデータの符号化により
得られた通常圧縮データである。また、圧縮データ#d
(d=2〜Mmax)は、圧縮ドキュメントファイル31
内の圧縮データ#dと同じく、2個のイメージデータの
差分を表した、要素データ数NmaxとNmax個の要素デー
タとからなる差分圧縮データである。ただし、圧縮ドキ
ュメントファイル32内の圧縮データ#dは、第dペー
ジのイメージデータの第1ページのイメージデータから
の差分を表したデータとなっている。
The head position data # 2 to #Mmax are data representing the head positions of the compressed data # 2 to #Mmax, respectively, as a relative address from the head of the compressed document file 32. Note that the reason why the head position data for the compressed data # 2 to #Mmax exists,
The reason why the head position data for No. 1 does not exist will be described later. The compressed data # 1 is normal compressed data obtained by encoding the image data of the first page of the processing target document, like the compressed data # 1 in the compressed document file 31. Also, compressed data #d
(D = 2 to Mmax) is the compressed document file 31
Similarly to the compressed data #d, the differential compressed data is composed of the element data number Nmax and the Nmax element data, which represents the difference between the two pieces of image data. However, the compressed data #d in the compressed document file 32 is data representing the difference between the image data of the d-th page and the image data of the first page.

【0114】以下、第2実施形態に係るドキュメント圧
縮/復元装置における圧縮ドキュメントファイル32の
作成手順を説明する。
The procedure for creating a compressed document file 32 in the document compression / decompression apparatus according to the second embodiment will be described below.

【0115】図11に、第2実施形態に係るドキュメン
ト圧縮/復元装置において実行される圧縮処理の流れ図
を示す。この圧縮処理は、図4に対応するものである。
すなわち、図11に示した圧縮処理は、通常/イメージ
ドキュメントに対して共通して実行される。ただし、イ
メージドキュメントから圧縮ドキュメントファイル32
が作成される際には、ステップS501が実行される前
に、イメージドキュメントを構成する複数のイメージデ
ータファイルのファイル名を操作者から取得する処理が
行われる。
FIG. 11 is a flowchart of a compression process executed in the document compression / decompression device according to the second embodiment. This compression processing corresponds to FIG.
That is, the compression processing shown in FIG. 11 is commonly executed for normal / image documents. However, the compressed document file 32
Is generated, before step S501 is executed, a process of acquiring the file names of a plurality of image data files constituting the image document from the operator is performed.

【0116】図示したように、圧縮処理時、制御部21
は、まず、処理を行っている圧縮データ番号を記憶する
ための変数Mに“1”を設定する(ステップS50
1)。次いで、処理対象ドキュメントの第1ページのイ
メージデータを、イメージ#1並びに基準イメージとし
てRAM22上に用意する(ステップS502)。すな
わち、基準イメージ及びイメージ#1として使用する1
つのイメージデータをRAM22上に用意する。
As shown in the figure, the control unit 21
Sets "1" to a variable M for storing the number of the compressed data being processed (step S50).
1). Next, the image data of the first page of the document to be processed is prepared on the RAM 22 as the image # 1 and the reference image (step S502). That is, 1 used as the reference image and image # 1
One image data is prepared on the RAM 22.

【0117】次いで、制御部21は、イメージ#1(=
基準イメージ)に含まれる単位データの数をkmaxとし
て記憶する(ステップS503)。その後、制御部21
は、ステップS502で作成したイメージ#1を圧縮
(本実施形態ではランレングス符号化)することによ
り、RAM22上に圧縮データ#1を作成する(ステッ
プS504)。そして、処理すべきページが残っている
か否かを判断する(ステップS505)。
Next, the control section 21 sets the image # 1 (=
The number of unit data included in the reference image) is stored as kmax (step S503). After that, the control unit 21
Creates compressed data # 1 on the RAM 22 by compressing (run-length encoding in this embodiment) the image # 1 created in step S502 (step S504). Then, it is determined whether there is a page to be processed (step S505).

【0118】処理すべきページが残っていた場合(ステ
ップS505;YES)、制御部21は、Mに“1”を
加算(ステップS506)し、RAM22上に、処理対
象ドキュメントの第Mページのイメージデータを、イメ
ージ#Mとして用意する(ステップS607)。そし
て、差分圧縮データ作成処理(ステップS508)を実
行する。このステップS508で実行される差分圧縮デ
ータ作成処理は、図4を用いて説明した処理と同じもの
である。すなわち、ステップS508では、イメージ#
Mと基準イメージの内容が、単位データごとに比較さ
れ、内容の異なっている部分を示す情報からなる圧縮デ
ータ#Mが作成される。
When there is a page to be processed (step S505; YES), the control unit 21 adds “1” to M (step S506), and stores the image of the Mth page of the document to be processed in the RAM 22. The data is prepared as an image #M (step S607). Then, a differential compressed data creation process (step S508) is executed. The differential compressed data creation processing executed in step S508 is the same as the processing described with reference to FIG. That is, in step S508, the image #
M and the contents of the reference image are compared for each unit data, and compressed data #M including information indicating a portion where the contents are different is created.

【0119】差分圧縮データ作成処理(ステップS50
8)の終了後、制御部21は、RAM22上のイメージ
#Mを破棄する(ステップS509)。すなわち、ステ
ップS507で作成したイメージ#Mの記憶領域を開放
し、他のデータの記憶に使用できるようにする。そし
て、制御部21は、ステップS505に戻り、処理すべ
きページが残っているか否かを判断する。
Processing for creating differential compressed data (step S50)
After the end of 8), the control unit 21 discards the image #M on the RAM 22 (step S509). That is, the storage area of the image #M created in step S507 is released so that it can be used for storing other data. Then, the control unit 21 returns to step S505, and determines whether or not there is any page to be processed.

【0120】制御部21は、このような処理を、処理す
べき各ページに対して繰り返す。そして、処理対象ドキ
ュメントを構成する全てのページに対する処理が完了し
たとき(ステップS505;NO)に、一連の処理によ
り得られた圧縮データ#1〜#Mのサイズ、管理データ
のサイズ(M値の関数)に基づき、圧縮データ#2〜#
Mの先頭位置データを作成する(ステップS510)。
その後、圧縮データ数Mmax(その時点におけるMの
値)、先頭位置データ#2〜#Mmax、圧縮データ#1
〜#Mmaxを含む圧縮ドキュメントファイル32をHD
D23内に作成(ステップS511)し、不要となった
データをRAM22上から破棄(図示せず)して、圧縮
処理を終了する。
The control section 21 repeats such processing for each page to be processed. Then, when the processing for all pages constituting the processing target document is completed (step S505; NO), the sizes of the compressed data # 1 to #M obtained by the series of processing and the size of the management data (M value Function), the compressed data # 2 to #
The head position data of M is created (step S510).
Thereafter, the number of compressed data Mmax (the value of M at that time), the head position data # 2 to #Mmax, the compressed data # 1
Compressed document file 32 containing ~ Mmax
The data is created in D23 (step S511), and unnecessary data is discarded from the RAM 22 (not shown), and the compression process ends.

【0121】以下、総ページ数が“3”である通常ドキ
ュメントが処理対象とされた場合を例に、図12を用い
て、第2実施形態に係るドキュメント圧縮/復元装置に
おける圧縮ドキュメントファイル32の作成手順をさら
に具体的に説明する。
Hereinafter, taking as an example a case where a normal document whose total number of pages is "3" is to be processed, the compressed document file 32 of the document compression / decompression device according to the second embodiment will be described with reference to FIG. The creation procedure will be described more specifically.

【0122】第1ページ目の印刷データに対しては、図
12(1)に示したように、その印刷データに基づきイ
メージ#1がRAM22上に作成され、そのイメージ#
1の符号化により通常圧縮データである圧縮データ#1
が作成される。また、イメージ#1のサイズに基づき、
イメージ#1を構成している単位データ数kmaxが認識
される。
For the print data of the first page, as shown in FIG. 12A, an image # 1 is created in the RAM 22 based on the print data, and the image # 1 is created.
1 is compressed data # 1 which is normally compressed data
Is created. Also, based on the size of Image # 1,
The unit data number kmax constituting the image # 1 is recognized.

【0123】第2ページ目の印刷データに対しては、図
12(2)に示したように、イメージ#1を残した状態
で、その印刷データに応じたイメージデータであるイメ
ージ#2がRAM22上に作成される。そして、イメー
ジ#2とイメージ#1との比較により、差分圧縮データ
である圧縮データ#2が作成される。
For the print data of the second page, as shown in FIG. 12B, while the image # 1 is left, the image data # 2 corresponding to the print data is stored in the RAM 22. Created above. Then, by comparing the image # 2 with the image # 1, compressed data # 2, which is differential compressed data, is created.

【0124】第3ページ目の印刷データに対しても、図
13(3)に示したように、イメージ#1を残した状態
で、その印刷データに応じたイメージデータであるイメ
ージ#3がRAM22上に作成され、イメージ#3とイ
メージ#1との比較により圧縮データ#3が作成され
る。そして、それまでの処理によって得られている情報
に基づき作成された管理データ(圧縮データ数Mmaxと
先頭位置データ#2〜#Mmax)と圧縮データ#1〜#
3とを含む圧縮ドキュメントファイル32がHDD23
内に作成される。
For the print data of the third page, as shown in FIG. 13C, while the image # 1 remains, the image data # 3 corresponding to the print data is stored in the RAM 22. The compressed data # 3 is created by comparing the image # 3 with the image # 1. Then, management data (the number of compressed data Mmax and head position data # 2 to #Mmax) and compressed data # 1 to #M created based on the information obtained by the processing up to that time
3 is stored in the HDD 23
Created within.

【0125】次に、本ドキュメント圧縮/復元装置にお
ける圧縮ドキュメントファイル32の復元手順を説明す
る。
Next, the procedure for restoring the compressed document file 32 in the document compression / decompression device will be described.

【0126】図13に、本ドキュメント圧縮/復元装置
において、圧縮ドキュメントファイル32の復元時に実
行される復元処理の流れ図を示し、図14に、復元処理
時に実行される差分圧縮データ復元処理の流れ図を示
す。
FIG. 13 shows a flow chart of the decompression process executed when the compressed document file 32 is decompressed in the document compression / decompression device. FIG. 14 shows a flow chart of the differential compression data decompression process executed at the time of decompression process. Show.

【0127】図13に示したように、復元処理時、制御
部21は、まず、操作者から復元処理条件を取得する
(ステップS601)。このステップは、ステップS3
01と同じものである。すなわち、制御部21は、ステ
ップS601において、復元を行う圧縮ドキュメントフ
ァイルのファイル名、復元ページ範囲指定情報、出力先
指定情報等からなる復元処理条件を取得する。
As shown in FIG. 13, at the time of restoration processing, the control unit 21 first acquires restoration processing conditions from the operator (step S601). This step includes step S3
It is the same as 01. That is, in step S601, the control unit 21 acquires a restoration processing condition including the file name of the compressed document file to be restored, restoration page range designation information, output destination designation information, and the like.

【0128】その後、制御部21は、復元が指示された
圧縮ドキュメントファイル32に含まれている管理デー
タ(圧縮データ数Mmaxと先頭位置データ#2〜#Mma
x)を取得する(ステップS602)。すなわち、圧縮ド
キュメントファイル32の先頭に存在する所定サイズの
データを圧縮データMmaxとして取得した後、そのデー
タに続く、Mmax−1個の所定サイズのデータを、先頭
位置データ#2〜#Mmaxとして取得する。また、図示
は省略してあるが、制御部21は、このステップの直後
に、Mmax<Peであるか否か、Ps>Mmaxであるか否か
を判断する。そして、Mmax<Peであった場合には、P
eにMmaxを設定し、ステップS603を開始する。ま
た、Ps>Mmaxであった場合には、復元処理を終了す
る。
Thereafter, the control unit 21 determines whether the management data (the number of compressed data Mmax and the start position data # 2 to #Mma) contained in the compressed document file 32 instructed to be decompressed are
x) is obtained (step S602). That is, after obtaining data of a predetermined size existing at the head of the compressed document file 32 as compressed data Mmax, Mmax-1 pieces of data of a predetermined size following the data are obtained as head position data # 2 to #Mmax. I do. Although not shown, immediately after this step, the control unit 21 determines whether or not Mmax <Pe and whether or not Ps> Mmax. If Mmax <Pe, P
e is set to Mmax, and step S603 is started. If Ps> Mmax, the restoration process ends.

【0129】ステップS603において、制御部21
は、圧縮ドキュメントファイル32内の圧縮データ#1
を伸張することにより、RAM22上にイメージ#1を
生成する。すなわち、管理データ直後に存在する、自身
のサイズに関するデータを含む圧縮データ#1を読み出
して伸張する。このように、圧縮データ#1が管理デー
タと共に読み込まれるデータとなっているため、圧縮ド
キュメントファイル32内に圧縮データ#1の先頭位置
データが設定されていないのである。
At step S603, the control unit 21
Is the compressed data # 1 in the compressed document file 32
To generate an image # 1 on the RAM 22. That is, the compressed data # 1 including data related to its own size, which exists immediately after the management data, is read and decompressed. As described above, since the compressed data # 1 is data that is read together with the management data, the head position data of the compressed data # 1 is not set in the compressed document file 32.

【0130】その後、制御部21は、処理を行うべき圧
縮データ番号を記憶するための変数MにPsを設定する
(ステップS604)。そして、制御部21は、Mが
“1”であるか否かを判断する(ステップS605)。
Thereafter, the control unit 21 sets Ps to a variable M for storing a compressed data number to be processed.
(Step S604). Then, the control unit 21 determines whether or not M is “1” (Step S605).

【0131】Mが“1”でなかった場合(ステップS6
05;NO)、すなわち、Ps>1であった場合、制御
部21は、基準イメージとして使用するイメージ#1の
コピーをRAM22上に生成する(ステップS60
6)。なお、M=Peである場合、制御部21は、この
ステップS606において、イメージ#1のコピーを生
成することなく、イメージ#1自体を基準イメージとし
て認識する。
When M is not "1" (step S6)
05; NO), that is, if Ps> 1, the control unit 21 generates a copy of the image # 1 to be used as the reference image on the RAM 22 (step S60).
6). If M = Pe, the control unit 21 recognizes the image # 1 itself as a reference image without generating a copy of the image # 1 in step S606.

【0132】ステップS606の実行後、制御部21
は、差分圧縮データ復元処理(ステップS607)を実
行する。図14に示したように、差分圧縮データ復元処
理開始時、制御部21は、先頭位置データ#Mによって
圧縮データ#Mの先頭を認識し、圧縮データ#Mの要素
データ数Nmaxを取得する(ステップS701)。次い
で、制御部21は、変数iに“1”を設定(ステップS
702)し、iの値がNmax以下であるか否かを判断す
る(ステップS703)。iの値がNmax以下であった場
合(ステップS703;YES)、制御部21は、圧縮
ドキュメントファイル32から、圧縮データ#Mの要素
データ#i(位置データと置換データ)を取得する(ス
テップS704)。すなわち、圧縮ドキュメントファイ
ル32内の、既に処理したデータの次位置に存在する所
定サイズのデータを要素データ#iとして取得する。
After execution of step S606, the control unit 21
Executes the differential compression data restoration process (step S607). As shown in FIG. 14, at the start of the differential compressed data decompression process, the control unit 21 recognizes the head of the compressed data #M based on the head position data #M and obtains the number Nmax of element data of the compressed data #M ( Step S701). Next, the control unit 21 sets “1” to the variable i (Step S
702), and it is determined whether the value of i is equal to or smaller than Nmax (step S703). If the value of i is equal to or smaller than Nmax (step S703; YES), the control unit 21 acquires the element data #i (the position data and the replacement data) of the compressed data #M from the compressed document file 32 (step S704). ). That is, data of a predetermined size existing at the next position of the already processed data in the compressed document file 32 is obtained as element data #i.

【0133】その後、制御部21は、RAM22上に記
憶されている基準イメージ(イメージ#1のコピー)
の、取得した位置データが示す位置の単位データを、取
得した置換データに変更する(ステップS705)。そ
して、iに“1”を加算(ステップS706)してか
ら、ステップS703に戻り、最後の要素データに対す
る処理が完了したか否かを、変更したiの値とNmaxと
を比較することによって判定する。
Thereafter, the control unit 21 transmits the reference image (copy of image # 1) stored in the RAM 22.
The unit data at the position indicated by the acquired position data is changed to the acquired replacement data (step S705). Then, "1" is added to i (step S706), and the process returns to step S703 to determine whether or not the processing for the last element data has been completed by comparing the changed value of i with Nmax. I do.

【0134】制御部21は、Nmax個の要素データに応
じた書き換えが全て終了した際(ステップS703;N
O)、すなわち、上記のような処理を繰り返すことによ
って、基準イメージのイメージ#Mへの書き換えが完了
した際に、差分圧縮データ復元処理を終了する。
The control unit 21 determines that all rewrites according to the Nmax element data have been completed (step S703; N
O), that is, when the rewriting of the reference image to the image #M is completed by repeating the above processing, the differential compressed data decompression processing ends.

【0135】図13に戻って復元処理の説明を続ける。
差分圧縮データ復元処理(ステップS607)の実行に
よりイメージ#Mを生成した後、制御部21は、RAM
22上のイメージ#Mを、出力先指定情報で指定されて
いる出力先に出力する(ステップS608)。その後、
Mが“1”でない場合には、イメージ#Mを破棄する
(ステップS609)。すなわち、第1ページ以外のペ
ージのイメージデータを出力した際には、そのイメージ
データの記憶領域を開放する。
Returning to FIG. 13, the description of the restoration processing will be continued.
After generating the image #M by executing the differential compressed data decompression processing (step S607), the control unit 21
The image #M on the file 22 is output to the output destination specified by the output destination specifying information (step S608). afterwards,
If M is not "1", the image #M is discarded (step S609). That is, when image data of a page other than the first page is output, the storage area of the image data is released.

【0136】その後、制御部21は、Mに“1”を加算
(ステップS610)し、M>Peが成立しているか否
かを判断する(ステップS611)。そして、M>Pe
が成立していなかった場合(ステップS611;NO)
には、ステップS606に戻り、次の圧縮データを復元
するための処理を開始する。また、ステップS604で
Psの値が設定されたMの値が“1”であった場合(ス
テップS605)、制御部21は、ステップS606、
S607を実行することなく、ステップS608からの
処理を実行する。
Thereafter, the control section 21 adds "1" to M (step S610), and determines whether M> Pe is satisfied (step S611). And M> Pe
Is not established (Step S611; NO)
Then, the process returns to step S606 to start processing for restoring the next compressed data. If the value of M for which the value of Ps is set in step S604 is “1” (step S605), the control unit 21 proceeds to step S606.
The processing from step S608 is executed without executing S607.

【0137】制御部21は、イメージ#Peの復元、出
力が完了した際、すなわち、出力したイメージデータに
関する圧縮データ番号Mに“1”を加算した値がPeを
超えた際(ステップS611;YES)に、RAM22
上に残っているイメージ#1を破棄(ステップS61
2)し、復元処理を終了する。
The control unit 21 completes the restoration and output of the image #Pe, that is, when the value obtained by adding “1” to the compressed data number M related to the output image data exceeds Pe (step S611; YES). ), RAM 22
Discard the image # 1 remaining on the top (Step S61)
2) Then, the restoration processing ends.

【0138】以下、3ページからなるドキュメントを基
に作成された圧縮ドキュメントファイル32の復元を、
復元ページ範囲を全ページ(Ps=1、Pe=3)として
指定した場合と、第3ページのみの復元を指定した場合
とを例に、復元処理の内容をさらに具体的に説明する。
なお、いずれの場合においても出力先としてはHDD2
3が指定されているものとする。
Hereinafter, restoration of a compressed document file 32 created based on a three-page document will be described.
The contents of the restoration process will be described more specifically by taking as an example a case where the restoration page range is specified as all pages (Ps = 1, Pe = 3) and a case where restoration of only the third page is designated.
In any case, the output destination is HDD2
It is assumed that 3 is specified.

【0139】前者の場合、図15に模式的に示したよう
な手順の処理が行われ、第1〜第3ページのイメージデ
ータが出力される。
In the former case, the processing of the procedure as schematically shown in FIG. 15 is performed, and the image data of the first to third pages is output.

【0140】まず、図15(1)に示したように、圧縮
ドキュメントファイル32の管理データ(圧縮データ数
Mmaxと先頭位置データ#2〜#Mmax)が取得される。
そして、圧縮ドキュメントファイル32内の通常圧縮デ
ータである圧縮データ#1が伸張され、RAM22上に
イメージ#1が生成される。その後、MにPs(=1)
が設定されるため、ステップS605において“YE
S”側への分岐が行われる。その結果、イメージ#1に
関するイメージデータファイルが、指定されている出力
先であるHDD23内に作成される。
First, as shown in FIG. 15A, management data (the number of compressed data Mmax and the start position data # 2 to #Mmax) of the compressed document file 32 are obtained.
Then, the compressed data # 1 which is the normal compressed data in the compressed document file 32 is expanded, and the image # 1 is generated on the RAM 22. Then, Ps (= 1) in M
Is set, “YE” is set in step S605.
A branch is made to the S "side. As a result, an image data file for the image # 1 is created in the HDD 23 which is the designated output destination.

【0141】その後、図15(2)に示したような処理
が行われる。すなわち、“1”が加算されたM(=2)
に対して、M>Peが成立しないため、イメージ#1の
コピーである基準イメージがRAM22上に生成され
る。そして、その基準イメージ(イメージ#1のコピ
ー)が圧縮データ#2に応じて書き換えられ、イメージ
#2が生成される。また、そのイメージ#2の出力(こ
の場合、イメージ#2に関するイメージデータファイル
の作成)が行われる。
Thereafter, the processing as shown in FIG. 15 (2) is performed. That is, M (= 2) to which "1" is added
On the other hand, since M> Pe does not hold, a reference image which is a copy of the image # 1 is generated on the RAM 22. Then, the reference image (copy of image # 1) is rewritten according to compressed data # 2, and image # 2 is generated. Further, output of the image # 2 (in this case, creation of an image data file for the image # 2) is performed.

【0142】その後、イメージ#2が破棄され、Mの値
が“3”に変更される。そして、M>Peが成立せず、
M=Peが成立するため、図15(3)に示したよう
に、イメージ#1自体が基準イメージとして認識され、
その基準イメージと圧縮データ#3とを用いた差分圧縮
データ復元処理によりイメージ#3が生成される。そし
て、そのイメージ#3の出力が行われる。
Thereafter, image # 2 is discarded, and the value of M is changed to "3". And M> Pe does not hold,
Since M = Pe holds, the image # 1 itself is recognized as the reference image, as shown in FIG.
Image # 3 is generated by differential compressed data decompression processing using the reference image and compressed data # 3. Then, the output of the image # 3 is performed.

【0143】この後、イメージ#3が破棄され、Mの値
が“4”に変更される。その結果、M(=4)<Pe
(=3)が成立しなくなるので、イメージ#1が破棄さ
れた後、復元処理が終了される。
Thereafter, image # 3 is discarded, and the value of M is changed to "4". As a result, M (= 4) <Pe
Since (= 3) does not hold, after the image # 1 is discarded, the restoration processing is terminated.

【0144】一方、第3ページのみの出力が指示されて
いた場合(Ps=Pe=3)、まず、図16(1)に示し
たような処理が行われる。すなわち、ステップS602
において、圧縮ドキュメントファイル32の管理データ
(圧縮データ数Mmax及び先頭位置データ#2〜#Mma
x)が取得される。また、ステップS603において、
圧縮データ#1が伸張され、RAM22上にイメージ#
1が生成される。
On the other hand, when the output of only the third page is instructed (Ps = Pe = 3), first, the processing as shown in FIG. 16A is performed. That is, step S602
, The management data of the compressed document file 32 (the number of compressed data Mmax and the head position data # 2 to #Mma
x) is obtained. Also, in step S603,
The compressed data # 1 is decompressed and the image #
1 is generated.

【0145】そして、MにPs(=3)が設定されるた
め、ステップS606からの処理が実行される。その結
果、図16(2)に示したように、イメージ#1を基準
イメージとした圧縮データ#3に対する差分圧縮データ
復元処理が実行され、基準イメージ(イメージ#1)が
イメージ#3に変換される。そして、そのイメージ#3
が出力される。
Then, since Ps (= 3) is set for M, the processing from step S606 is executed. As a result, as shown in FIG. 16 (2), differential compressed data decompression processing is performed on compressed data # 3 using image # 1 as a reference image, and the reference image (image # 1) is converted into image # 3. You. And that image # 3
Is output.

【0146】すなわち、本ドキュメント圧縮/復元装置
によって作成される圧縮ドキュメントファイル32内の
各差分圧縮データは、第1ページのイメージデータを基
準イメージとしたものとなっている。従って、圧縮デー
タ#1と圧縮データ#Pとが読み出せれば、第Pページ
のイメージデータを復元することができる。先頭位置デ
ータ#2〜#Mmaxがなくとも、第1実施形態のよう
に、各圧縮データが順に読み出されるようにしておけ
ば、圧縮データ#1と圧縮データ#Pとが得られること
になる。しかしながら、そのような手順で処理が行われ
るようにした場合、不要な圧縮データの読み出しのため
に時間が消費されることになるので、本実施形態では、
圧縮ドキュメントファイル32内に、圧縮データ#2〜
#Mmaxに関する先頭位置データが設定されるようにし
てあるのである。
That is, each differential compressed data in the compressed document file 32 created by the present document compression / decompression apparatus uses the image data of the first page as a reference image. Therefore, if the compressed data # 1 and the compressed data #P can be read, the image data of the P-th page can be restored. Even if there is no start position data # 2 to #Mmax, if each compressed data is read out sequentially as in the first embodiment, compressed data # 1 and compressed data #P can be obtained. However, when the processing is performed in such a procedure, time is consumed for reading unnecessary compressed data.
In the compressed document file 32, compressed data # 2
The top position data for #Mmax is set.

【0147】以上、説明したように、第2実施形態に係
るドキュメント圧縮/復元装置でも、Nページのドキュ
メントに対して、1つの通常圧縮データとN−1個の差
分圧縮データとを含む圧縮ドキュメントファイルが作成
される。従って、各ページが共通した部分を多く有する
ドキュメント、例えば、表計算ソフトで作成されたドキ
ュメントや、請求書等の定型のドキュメントに対して、
本ドキュメント圧縮/復元装置を用いれば、第1実施形
態に係るドキュメント圧縮/復元装置と同様に、従来よ
りも高い圧縮率でそのドキュメントを保存できることに
なる。
As described above, even in the document compression / decompression device according to the second embodiment, a compressed document including one piece of normal compressed data and N−1 pieces of differentially compressed data for an N page document A file is created. Therefore, for a document having many portions in which each page has a common part, for example, a document created by spreadsheet software or a standard document such as an invoice,
If this document compression / decompression device is used, the document can be stored at a higher compression ratio than in the past, similarly to the document compression / decompression device according to the first embodiment.

【0148】また、本ドキュメント圧縮/復元装置で
は、各差分圧縮データを作成する際の基準イメージとし
て第1ページのイメージデータが用いられている。この
ため、本ドキュメント圧縮/復元装置は、圧縮ドキュメ
ントファイル32の、中途ページからの復元が、第1実
施形態に係るドキュメント圧縮/復元装置よりも高速に
行える装置となっている。
Further, in the document compression / decompression apparatus, the image data of the first page is used as a reference image when creating each difference compressed data. For this reason, the document compression / decompression device is a device capable of decompressing the compressed document file 32 from an intermediate page at a higher speed than the document compression / decompression device according to the first embodiment.

【0149】<第3実施形態>図17に、第3実施形態
に係るドキュメント圧縮/復元装置によって作成される
圧縮ドキュメントファイル33の構成を示す。図示した
ように、圧縮ドキュメントファイル33は、圧縮データ
数Mmax、ページ番号#1〜#Mmax及び先頭位置データ
#2〜#Mmaxからなる管理データと、Mmax個の圧縮デ
ータとで構成される。
<Third Embodiment> FIG. 17 shows the structure of a compressed document file 33 created by the document compression / decompression device according to the third embodiment. As shown in the figure, the compressed document file 33 is composed of management data including the number Mmax of compressed data, page numbers # 1 to #Mmax, and top position data # 2 to #Mmax, and Mmax pieces of compressed data.

【0150】ページ番号#1〜#Mmaxは、それぞれ、
圧縮データ#1〜#Mmaxが何ページ目のイメージデー
タに関する圧縮データであるかを示す情報である。先頭
位置データ#2〜#Mmaxは、それぞれ、圧縮データ#
2〜#Mmaxの先頭位置を、圧縮ドキュメントファイル
33の先頭からの相対アドレスで表したデータである。
The page numbers # 1 to #Mmax are respectively
This is information indicating which page of the compressed data # 1 to #Mmax is the compressed data related to the image data. The head position data # 2 to #Mmax are respectively compressed data #
2 to #Mmax are data representing relative addresses from the beginning of the compressed document file 33.

【0151】圧縮データ#1は、圧縮ドキュメントファ
イル31、32内の圧縮データ#1と同様に、イメージ
データの符号化により得られた通常圧縮データである。
ただし、圧縮ドキュメントファイル33内の圧縮データ
#1は、ページ番号#1で示されるページのイメージデ
ータの符号化により得られたデータとなっている。
The compressed data # 1 is normal compressed data obtained by encoding image data, like the compressed data # 1 in the compressed document files 31 and 32.
However, the compressed data # 1 in the compressed document file 33 is data obtained by encoding the image data of the page indicated by the page number # 1.

【0152】圧縮データ#d(d=2〜Mmax)は、圧
縮ドキュメントファイル32内の圧縮データ#2〜#M
maxと同じく、圧縮データ#1の復元により得られるイ
メージデータが基準イメージとして用いられて作成され
た差分圧縮データである。ただし、上記したように圧縮
データ#1の復元により得られるイメージデータがペー
ジ番号#1で示されるページのイメージデータとなって
いるため、各圧縮データ#dは、基準イメージが、ペー
ジ番号#1で示されるページ(第1ページとは限らな
い)のイメージデータであって、復元によりページ番号
#dが示しているページのイメージデータが得られるデ
ータとなっている。換言すれば、圧縮ドキュメントファ
イル32内の圧縮データ#dが、基準イメージが第1ペ
ージのイメージデータであり、dが、復元によって得ら
れるイメージデータのページ番号を表しているデータで
あったのに対し、本実施形態のドキュメント圧縮/復元
装置が作成する圧縮ドキュメントファイル33内の圧縮
データ#dは、基準イメージが第1ページのイメージデ
ータであるとは限られず、また、dが、復元によって得
られるイメージデータのページ番号を表しているとも限
られないデータとなっている。
The compressed data #d (d = 2 to Mmax) is the compressed data # 2 to #M in the compressed document file 32.
Like max, differential image data created by using image data obtained by restoring compressed data # 1 as a reference image. However, since the image data obtained by decompressing the compressed data # 1 is the image data of the page indicated by the page number # 1 as described above, each compressed data #d has the reference image corresponding to the page number # 1. Are the image data of the page (not limited to the first page), and the image data of the page indicated by the page number #d is obtained by the restoration. In other words, the compressed data #d in the compressed document file 32 is data in which the reference image is the image data of the first page, and d is the data representing the page number of the image data obtained by the decompression. On the other hand, in the compressed data #d in the compressed document file 33 created by the document compression / decompression device of the present embodiment, the reference image is not limited to the image data of the first page, and d is obtained by the decompression. The data does not necessarily indicate the page number of the image data to be obtained.

【0153】以下、図18ないし図20を用いて、第3
実施形態に係るドキュメント圧縮/復元装置における圧
縮ドキュメントファイル33の作成手順を説明する。な
お、図18は、第3実施形態に係るドキュメント圧縮/
復元装置において圧縮ドキュメントファイル33の作成
時に実行される圧縮処理の流れ図であり、図19、20
は、それぞれ、圧縮処理時に実行される差分圧縮データ
圧縮処理、圧縮データ選択処理の流れ図である。また、
図18に示した圧縮処理は、図4に対応するものであ
り、通常/イメージドキュメントに対して共通して実行
される。そして、イメージドキュメントから圧縮ドキュ
メントファイル32が作成される際には、ステップS8
01が実行される前に、イメージドキュメントを構成す
る複数のイメージデータファイルのファイル名を操作者
から取得する処理が行われる。
Hereinafter, referring to FIG. 18 to FIG.
A procedure for creating the compressed document file 33 in the document compression / decompression device according to the embodiment will be described. FIG. 18 shows the document compression / data compression according to the third embodiment.
FIG. 20 is a flowchart of a compression process executed when a compressed document file 33 is created in the decompression device.
9 is a flowchart of a differential compressed data compression process and a compressed data selection process executed at the time of the compression process, respectively. Also,
The compression processing shown in FIG. 18 corresponds to FIG. 4, and is executed commonly for normal / image documents. Then, when the compressed document file 32 is created from the image document, step S8
Before the execution of 01, a process of acquiring the file names of a plurality of image data files constituting the image document from the operator is performed.

【0154】図18に示したように、圧縮処理開始時、
制御部21は、処理対象ドキュメントの第1〜第Mmax
ページのイメージデータをイメージ#1〜#Mmaxとし
て作成する(ステップS801)。また、このステップ
において、制御部21は、それらのイメージデータの要
素データ数kmaxを認識する。その後、制御部21は、
差分圧縮データ作成処理のオペランドである変数X、Y
に、それぞれ、“1”、“2”を設定(ステップS80
2)し、差分圧縮データ作成処理(ステップS803)
を開始する。
As shown in FIG. 18, at the start of the compression process,
The control unit 21 controls the first to M-th documents to be processed.
The image data of the page is created as images # 1 to #Mmax (step S801). In this step, the control unit 21 recognizes the number kmax of element data of the image data. After that, the control unit 21
Variables X and Y, which are operands of differential compressed data creation processing
Are set to "1" and "2", respectively (step S80).
2) Then, the differential compressed data creation processing (step S803)
To start.

【0155】図19に示してあるように、差分圧縮デー
タ作成処理時、制御部21は、まず、単位データ番号を
記憶するための変数kに“1”を、要素データ数をカウ
ントするための変数iに“0”を設定する(ステップS
901)。次いで、イメージ#Xの単位データ#kとイ
メージ#Yの単位データ#kとを比較する(ステップS
902)。
As shown in FIG. 19, at the time of differential compressed data creation processing, the control unit 21 first sets “1” as a variable k for storing a unit data number and sets a variable k for counting the number of element data. The variable i is set to “0” (step S
901). Next, the unit data #k of the image #X is compared with the unit data #k of the image #Y (step S).
902).

【0156】イメージ#Xの単位データ#kとイメージ
#Yの単位データ#kとが一致していなかった場合(ス
テップS903;NO)、制御部21は、iに“1”を
加算する(ステップS904)。そして、k及びイメー
ジ#Xの単位データ#kを、圧縮データ#Y_X(イメ
ージ#Yを基準イメージとした、イメージ#Xが復元さ
れる圧縮データ)の要素データ#iの位置データ及び置
換データとして記憶する(ステップS905)。また、
k及びイメージ#Yの単位データ#kを、圧縮データ#
X_Yの要素データ#iの位置データ及び置換データと
して記憶する(ステップS906)。そして、kに
“1”を加算する(ステップS907)。
If the unit data #k of the image #X does not match the unit data #k of the image #Y (step S903; NO), the control unit 21 adds "1" to i (step S903). S904). Then, the unit data #k of k and the image #X are used as the position data and the replacement data of the element data #i of the compressed data #Y_X (compressed data in which the image #X is restored using the image #Y as a reference image). It is stored (step S905). Also,
k and the unit data #k of the image #Y are converted into compressed data #
The position data and the replacement data of the element data #i of X_Y are stored (step S906). Then, “1” is added to k (step S907).

【0157】一方、イメージ#Xの単位データ#kとイ
メージ#Yの単位データ#kとが一致していた場合(ス
テップS903;YES)、制御部21は、ステップS
904〜S906を実行することなく、ステップS90
7を実行する。
On the other hand, if the unit data #k of the image #X matches the unit data #k of the image #Y (step S903; YES), the control unit 21 proceeds to step S903.
Steps S90 and S904 are not performed
Execute 7.

【0158】ステップS907においてkの値を変更し
た後、制御部21は、そのkの値が要素データ数kmax
以下であるか否かを判断する(ステップS908)。そ
して、kの値がkmax以下であった場合(ステップS9
08;YES)には、ステップS902に戻り、次の単
位データに対する処理を行う。
After changing the value of k in step S907, the control unit 21 sets the value of k to the number kmax of element data.
It is determined whether it is the following (step S908). If the value of k is equal to or smaller than kmax (step S9)
08; YES), the process returns to step S902, and the process is performed on the next unit data.

【0159】制御部21は、このような処理を各単位デ
ータに対して繰り返し、kの値がkmax以下でなくなっ
たとき(ステップS908;NO)には、その時点にお
けるiの値を、圧縮データ#X_Y、圧縮データ#Y_X
の要素データ数Nmaxとして記憶する(ステップS90
9)。そして、差分圧縮データ作成処理を終了する。
The control section 21 repeats such processing for each unit data. When the value of k is no longer than kmax (step S908; NO), the control section 21 replaces the value of i at that time with the compressed data. #X_Y, compressed data #Y_X
(Step S90).
9). Then, the differential compressed data creation processing ends.

【0160】図18に示してあるように、差分圧縮デー
タ作成処理(ステップS803)の実行後、制御部21
は、Yに“1”を加算する(ステップS804)。そし
て、YがMmaxを超えているか否かを判断(ステップS
805)し、YがMmaxを超えていなかった場合(ステ
ップS805;NO)には、ステップS803に戻り、
その更新したY値に対する差分圧縮データ作成処理を実
行する。
As shown in FIG. 18, after execution of the differential compressed data creation processing (step S803), the control unit 21
Adds "1" to Y (step S804). Then, it is determined whether or not Y exceeds Mmax (step S).
805) If Y has not exceeded Mmax (step S805; NO), the process returns to step S803,
The compressed difference data creation process is executed for the updated Y value.

【0161】このような処理を繰り返した結果として、
YがMmaxを超えた場合(ステップS805;YE
S)、すなわち、イメージ#Xを基準イメージとした、
イメージ#X+1〜#Mmaxに関する差分圧縮データの
作成が完了した場合、制御部21は、Xに“1”を加算
する(ステップS806)。次いで、YにX+1を設定
(ステップS807)し、X<Mmaxが成立するか否か
を判断する(ステップS808)。
As a result of repeating such processing,
When Y exceeds Mmax (Step S805; YE)
S), that is, using image #X as a reference image,
When the creation of the differential compressed data for the images # X + 1 to #Mmax is completed, the control unit 21 adds “1” to X (step S806). Next, Y is set to X + 1 (step S807), and it is determined whether or not X <Mmax is satisfied (step S808).

【0162】そして、X<Mmaxが成立していた場合
(ステップS808;YES)、制御部21は、ステッ
プS803からの処理を再度実行する。一方、X<Mma
xが成立していなかった場合(ステップS808;N
O)、すなわち、“1”から“Mmax−1”までの各X
に対してステップS803〜S805の処理を行った際
には、圧縮データ選択処理(ステップS809)を開始
する。
If X <Mmax is satisfied (step S808; YES), the control unit 21 executes the processing from step S803 again. On the other hand, X <Mma
If x is not satisfied (step S808; N
O), that is, each X from "1" to "Mmax-1"
When the processing of steps S803 to S805 has been performed on compressed data, the compressed data selection processing (step S809) is started.

【0163】図20に示したように、圧縮データ選択処
理開始時、制御部21は、それまでの処理で得られてい
るMmax×(Mmax−1)個の圧縮データを基に、Mmax個
のイメージ#1〜Mmaxのそれぞれに対して、そのイメ
ージを基準イメージとして用いて作成されたMmax−1
個の圧縮データのサイズの合計を算出する(ステップS
1001)。次いで、制御部21は、基準イメージとし
て使用したときに圧縮データのサイズの合計が最小とな
るイメージ#Zを特定する(ステップS1002)。そ
の後、イメージ#Zを符号化することにより、イメージ
#Zの圧縮データを作成する(ステップS1003)。
そして、イメージ#Zの圧縮データ、圧縮データ#Z_
j(j=1〜Z−1、Z+1〜Mmax)をそれぞれ圧縮
データ#1〜#Mmaxとするための管理データを作成す
る(ステップS1004)。次いで、作成した管理デー
タを有し、イメージ#Zの圧縮データ、データ圧縮デー
タ#Z_j(j=1〜Z−1、Z+1〜Mmax)をそれぞ
れ圧縮データ#1〜#Mmaxとして含む圧縮ドキュメン
トファイルを作成(ステップS1005)し、圧縮デー
タ選択処理並びに圧縮処理を終了する。
As shown in FIG. 20, at the start of the compressed data selection processing, the control unit 21 determines that Mmax × (Mmax−1) compressed data obtained in the processing up to that point will be used. For each of images # 1 to Mmax, Mmax-1 created using the image as a reference image
Calculate the total size of the compressed data (step S
1001). Next, the control unit 21 specifies the image #Z that minimizes the total size of the compressed data when used as the reference image (step S1002). After that, compressed data of the image #Z is created by encoding the image #Z (step S1003).
Then, the compressed data of the image #Z and the compressed data #Z_
Management data for creating j (j = 1 to Z-1, Z + 1 to Mmax) as compressed data # 1 to #Mmax, respectively, is created (step S1004). Next, a compressed document file having the created management data and including compressed data of image #Z and data compressed data #Z_j (j = 1 to Z-1, Z + 1 to Mmax) as compressed data # 1 to #Mmax, respectively. After the creation (step S1005), the compressed data selection processing and the compression processing are completed.

【0164】以下、総ページ数が“5”であるドキュメ
ントが処理対象とされた場合を例に、第3実施形態に係
るドキュメント圧縮/復元装置における圧縮ドキュメン
トファイル33の作成手順をさらに具体的に説明する。
Hereinafter, the procedure for creating the compressed document file 33 in the document compression / decompression device according to the third embodiment will be described more specifically, taking as an example a case where a document having a total number of pages of “5” is to be processed. explain.

【0165】この場合、Mmax=5であるので、圧縮デ
ータ選択処理が開始されるときには、20(=5×4)
個の圧縮データが作成されている。ステップS1001
では、それらの圧縮データが、基準イメージとして使用
されているイメージデータによって5個のグループに分
けられ、各グループに属する4個の圧縮データのサイズ
の合計が算出される。すなわち、このステップS100
1までの処理で、例えば、図21に示したような情報が
収集される。なお、図21において、最も左側の列に示
してある数値(1、2等)が、基準イメージとして使用
されたイメージデータのページ番号(以下、基準ページ
番号と表記する)であり、最上行に示してある数値が、
基準イメージと比較されたイメージデータのページ番号
(以下、生成ページ番号と表記する)である。そして、
基準ページ番号がXであり、生成ページ番号がYである
場所に記載してある数値が、圧縮データ#X_Yのサイ
ズ(任意単位)である。
In this case, since Mmax = 5, when the compressed data selection process is started, 20 (= 5 × 4)
Pieces of compressed data have been created. Step S1001
Then, the compressed data is divided into five groups according to the image data used as the reference image, and the total size of the four compressed data belonging to each group is calculated. That is, this step S100
In the processing up to 1, for example, information as shown in FIG. 21 is collected. In FIG. 21, the numerical values (1, 2, etc.) shown in the leftmost column are the page numbers (hereinafter, referred to as reference page numbers) of the image data used as the reference images, and The numbers shown are
The page number of the image data compared with the reference image (hereinafter, referred to as a generated page number). And
The numerical value described at the place where the reference page number is X and the generated page number is Y is the size (arbitrary unit) of the compressed data #X_Y.

【0166】ステップS1001までの処理で、図21
に示したような情報が収集された場合、ステップS10
02では、合計が“11”となっているイメージ#3が
特定される。続くステップS1004では、ページ番号
#1〜#Mmaxが、それぞれ、3(=Z)、1、2、
4、5であることが認識されるとともに、各圧縮データ
のサイズに基づき先頭位置データ#2〜#Mmaxが決定
される(管理データが作成される)。そして、ステップ
S1005では、図22に示したように、圧縮データ数
Mmaxが“5”であり、ページ番号#1〜#5(図で
は、P〜P)が、それぞれ、3、1、2、4、5で
あり、各圧縮データのサイズより定められた先頭位置デ
ータ#2〜#5(図では、D〜D)を有する管理デ
ータを持ち、第3ページの通常圧縮データ、圧縮データ
#3_1、#3_2、#3_4、#3_5を、それぞれ、圧
縮データ#1〜#5として有する圧縮ドキュメントファ
イル33が作成される。
In the processing up to step S1001, FIG.
If the information as shown in (1) is collected, step S10
In 02, image # 3 having a total of "11" is specified. In the following step S1004, the page numbers # 1 to #Mmax are 3 (= Z), 1, 2,
4 and 5, and the head position data # 2 to #Mmax are determined based on the size of each compressed data (management data is created). Then, in step S1005, as shown in FIG. 22, the number of compressed data Mmax is “5”, and the page numbers # 1 to # 5 (P 1 to P 5 in the figure) are 3, 1,. is 2,4,5, (in the figure, D 2 to D 5) the head position data # 2 to # 5 defined than the size of the compressed data has a management data having a normal compressed data of the third page, A compressed document file 33 including compressed data # 3_1, # 3_2, # 3_4, and # 3_5 as compressed data # 1 to # 5, respectively, is created.

【0167】次に、本実施形態に係るドキュメント圧縮
/復元装置における圧縮ドキュメントファイル33の復
元時の動作を説明する。
Next, the operation of the document compression / decompression device according to the present embodiment when decompressing the compressed document file 33 will be described.

【0168】図23に、処理対象ドキュメント33の復
元時に実行される復元処理の流れ図を示す。図示したよ
うに、復元処理時、制御部21は、まず、操作者から復
元処理条件を取得する(ステップS1101)。このス
テップは、ステップS301、S601と同じものであ
る。すなわち、制御部21は、ステップS1101にお
いて、復元を行う圧縮ドキュメントファイルのファイル
名、復元ページ範囲指定情報、出力先指定情報等からな
る復元処理条件を取得する。
FIG. 23 shows a flowchart of the restoration process executed when the document 33 to be processed is restored. As illustrated, at the time of restoration processing, the control unit 21 first acquires restoration processing conditions from the operator (step S1101). This step is the same as steps S301 and S601. That is, in step S1101, the control unit 21 acquires a restoration processing condition including the file name of the compressed document file to be restored, restoration page range designation information, output destination designation information, and the like.

【0169】その後、制御部21は、復元が指示された
圧縮ドキュメントファイル33に含まれている管理デー
タ(圧縮データ数Mmaxと、ページ番号#1〜#Mmax、
先頭位置データ#2〜#Mmax)を取得する(ステップS
1102)。すなわち、圧縮ドキュメントファイル33
の先頭に存在する所定サイズのデータを圧縮データMma
xとして取得した後、そのデータに続く、Mmax個の所定
サイズのデータを、ページ番号#1〜#Mmaxとして取
得する。さらに、ページ番号#Mmaxに続く、Mmax−1
個の所定サイズのデータを、先頭位置データ#2〜#M
maxとして取得する。
Thereafter, the control unit 21 determines whether the management data (the number of compressed data Mmax, the page numbers # 1 to #Mmax,
First position data # 2 to #Mmax are acquired (step S)
1102). That is, the compressed document file 33
Of the predetermined size existing at the beginning of the compressed data Mma
After obtaining as x, Mmax pieces of data of a predetermined size following the data are obtained as page numbers # 1 to #Mmax. Further, following the page number #Mmax, Mmax-1
Data of the predetermined size are transferred to the head position data # 2 to #M.
Get as max.

【0170】なお、図示は省略してあるが、制御部21
は、ステップS1102の直後に、Mmax<Peであるか
否か、Ps>Mmaxであるか否かを判断する。そして、M
max<Peであった場合には、PeにMmaxを設定し、ステ
ップS1103を開始する。また、Ps>Mmaxであった
場合には、復元処理を終了する。すなわち、Ps≦Pe≦
Mmaxという条件下で、以下に説明する各ステップの処
理は行われる。
Although not shown, the control unit 21
Determines immediately after step S1102 whether or not Mmax <Pe and whether or not Ps> Mmax. And M
If max <Pe, Mmax is set to Pe, and step S1103 is started. If Ps> Mmax, the restoration process ends. That is, Ps ≦ Pe ≦
The process of each step described below is performed under the condition of Mmax.

【0171】制御部21は、ステップS1103におい
て、圧縮ドキュメントファイル33内の圧縮データ#1
を伸張することにより、RAM22上にイメージ#1を
生成する。その後、制御部21は、変数PにPsを設定
(ステップS1104)し、変数Mに、第Pページ圧縮
データ番号(ページ番号がPである圧縮データの圧縮デ
ータ番号)を設定する(ステップS1105)。すなわ
ち、ページ番号#m=Pであるmを求め、求めたmをM
に設定する。そして、制御部21は、PがPe以下であ
る否かを判断する(ステップS1106)。
In step S1103, the control unit 21 determines whether the compressed data # 1 in the compressed document file 33
To generate an image # 1 on the RAM 22. Thereafter, the control unit 21 sets Ps to the variable P (step S1104), and sets the P-th page compressed data number (compressed data number of the compressed data whose page number is P) to the variable M (step S1105). . That is, m with page number # m = P is found, and the found m is M
Set to. Then, the control unit 21 determines whether P is equal to or less than Pe (step S1106).

【0172】PがPe以下であった場合(ステップS1
106;YES)、制御部21は、PがP(ページ番
号#1)と一致しているか否かを判断する(ステップS
1107)。すなわち、ステップS1103で作成され
ているイメージ#1が、今回、復元すべきページに関す
るものであるか否かを判断する。PがPと一致してい
なかった場合(ステップS1107;NO)、制御部2
1は、基準イメージとして使用するイメージ#1のコピ
ーをRAM22上に生成する(ステップS1109)。
なお、P=Peが成立する場合、制御部21は、このス
テップS1109において、イメージ#1のコピーを生
成することなく、RAM22上のイメージ#1を基準イ
メージとして認識する。
When P is less than Pe (step S1)
106; YES), the control unit 21 determines whether or not P matches P 1 (page number # 1) (step S).
1107). That is, it is determined whether or not the image # 1 created in step S1103 relates to a page to be restored this time. If P does not match with the P 1 (step S1107; NO), the control unit 2
1 generates a copy of the image # 1 to be used as a reference image on the RAM 22 (step S1109).
If P = Pe holds, the control unit 21 recognizes the image # 1 on the RAM 22 as a reference image without generating a copy of the image # 1 in step S1109.

【0173】そして、差分圧縮データ復元処理(ステッ
プS1110)を実行する。このステップS1110で
実行される差分圧縮データ復元処理は、図14を用いて
説明したものと同じものであるので説明は省略する。
Then, a differential compressed data decompression process (step S1110) is executed. The difference compressed data decompression process executed in step S1110 is the same as that described with reference to FIG.

【0174】差分圧縮データ復元処理の実行によりイメ
ージ#M、すなわち、第Pページのイメージデータを生
成した後、制御部21は、RAM22上のイメージ#M
を、出力先指定情報で指定されている出力先に出力する
(ステップS1111)。そして、イメージ#Mを破棄
(ステップS1112)した後、Pに“1”を加算する
(ステップS1113)。その後、ステップS1105
に戻り、値を変更したPに対して上記した処理を行う。
After generating the image #M, that is, the image data of the P-th page by executing the differential compressed data restoring process, the control unit 21 sets the image #M on the RAM 22 to the image #M.
Is output to the output destination specified by the output destination specification information (step S1111). Then, after discarding the image #M (step S1112), “1” is added to P (step S1113). After that, step S1105
And the above processing is performed on the P whose value has been changed.

【0175】ステップS1104、S1113で値が設
定、変更されたPがPと一致していた場合(ステップ
S1107;YES)、制御部21は、RAM上のイメ
ージ#1を指定された出力先に出力する(ステップS1
108)。その後、ステップS1113に進み、Pの値
を変更した後、ステップS1105からの処理を実行す
る。
[0175] Step S1104, the value in S1113 is set, if the modified P is coincident with P 1 (step S1107; YES), the control unit 21, the output destination specified image # 1 on the RAM Output (Step S1
108). Thereafter, the process proceeds to step S1113, and after the value of P is changed, the processing from step S1105 is executed.

【0176】そして、制御部21は、このような処理を
繰り返していった結果として、P≦Peが成立しなくな
ったとき(ステップS1106;NO)に、不要となっ
たイメージデータを破棄する処理(図示せず)を行って
から、復元処理を終了する。
When P ≦ Pe is not satisfied as a result of repeating such processing (step S1106; NO), the control section 21 discards unnecessary image data (step S1106). (Not shown), and then terminate the restoration process.

【0177】以上、説明したように、第3実施形態に係
るドキュメント圧縮/復元装置では、Nページからなる
ドキュメントに対して、第2実施形態に係るドキュメン
ト圧縮/復元装置と同様に、それぞれ、圧縮データ#1
の復元によって得られるイメージ#1を基準イメージと
して作成されたN−1個の差分圧縮データを含む圧縮ド
キュメントファイル33が作成される。ただし、圧縮デ
ータ#1の基となるイメージデータが、第1ページのイ
メージデータに固定されてはおらず、N−1個の差分圧
縮データのサイズの合計が最小となるように選択されて
いる。
As described above, in the document compression / decompression device according to the third embodiment, the document compression / decompression device according to the third embodiment compresses a document including N pages in the same manner as the document compression / decompression device according to the second embodiment. Data # 1
A compressed document file 33 including N-1 pieces of differentially compressed data created using the image # 1 obtained by the decompression as a reference image is created. However, the image data serving as the basis of the compressed data # 1 is not fixed to the image data of the first page, and is selected so that the total size of the N-1 difference compressed data is minimized.

【0178】従って、各ページが共通した部分を多く有
するドキュメント、例えば、表計算ソフトで作成された
ドキュメントや、請求書等の定型のドキュメントに対し
て、本ドキュメント圧縮/復元装置を用いれば、第2実
施形態に係るドキュメント圧縮/復元装置を用いた場合
よりも小さいサイズの圧縮ドキュメントデータが得られ
ることになる。
Therefore, if the present document compression / decompression apparatus is used for a document in which each page has many portions in common, for example, a document created by spreadsheet software or a standard document such as an invoice, As a result, compressed document data of a smaller size can be obtained than when the document compression / decompression device according to the second embodiment is used.

【0179】また、本ドキュメント圧縮/復元装置で
は、各差分圧縮データを作成する際の基準イメージとし
て特定ページのイメージデータが用いられている。この
ため、本ドキュメント圧縮/復元装置は、第2実施形態
のドキュメント圧縮/復元装置と同様に、圧縮ドキュメ
ントファイル33の中途ページからの復元(出力)が、
第1実施形態に係るドキュメント圧縮/復元装置よりも
高速に行える装置となっている。
In the document compression / decompression device, image data of a specific page is used as a reference image when creating each difference compressed data. For this reason, the document compression / decompression device can perform decompression (output) from a middle page of the compressed document file 33 as in the document compression / decompression device of the second embodiment.
This is an apparatus that can perform faster than the document compression / decompression apparatus according to the first embodiment.

【0180】<第4実施形態>図24に、第4実施形態
に係るドキュメント圧縮/復元装置によって作成される
圧縮ドキュメントファイル34の構成を示す。図示した
ように、圧縮ドキュメントファイル34は、圧縮データ
数Mmax、ページ番号#1〜#Mmax、基準ページ番号#
2〜#Mmax及び先頭位置データ#2〜#Mmaxからなる
管理データと、Mmax個の圧縮データとで構成される。
<Fourth Embodiment> FIG. 24 shows the structure of a compressed document file 34 created by a document compression / decompression device according to a fourth embodiment. As shown in the figure, the compressed document file 34 has a compressed data number Mmax, page numbers # 1 to #Mmax, and a reference page number #.
It is composed of management data including 2 to #Mmax and head position data # 2 to #Mmax, and Mmax pieces of compressed data.

【0181】ページ番号#1〜#Mmaxは、それぞれ、
圧縮データ#1〜#Mmaxが何ページ目のイメージデー
タに関する圧縮データであるかを示す情報である。基準
ページ番号#2〜#Mmaxは、それぞれ、圧縮データ#
2〜#Mmaxが何ページ目のイメージデータを基準イメ
ージとして作成された圧縮データであるかを示す情報で
ある。また、先頭位置データ#2〜#Mmaxは、圧縮ド
キュメントファイル32、33内の先頭位置データと同
様に、それぞれ、圧縮データ#2〜#Mmaxの先頭位置
を、圧縮ドキュメントファイル34の先頭からの相対ア
ドレスで表したデータである。
The page numbers # 1 to #Mmax are respectively
This is information indicating which page of the compressed data # 1 to #Mmax is the compressed data related to the image data. The reference page numbers # 2 to #Mmax are the compressed data #
2 to #Mmax are information indicating which page of image data is compressed data created using the reference image as the reference image. In addition, the head position data # 2 to #Mmax respectively indicate the head positions of the compressed data # 2 to #Mmax relative to the head of the compressed document file 34, similarly to the head position data in the compressed document files 32 and 33. This is data represented by an address.

【0182】圧縮データ#1は、圧縮ドキュメントファ
イル31〜33内の圧縮データ#1と同様に、イメージ
データの符号化により得られた通常圧縮データである。
また、圧縮データ#d(d=2〜Mmax)は、圧縮ドキ
ュメントファイル31〜33内の圧縮データ#dと同じ
構成を有する、2イメージデータに基づき作成される差
分圧縮データとなっている。ただし、ページ番号、基準
ページ番号を含む管理データを備えることから明らかな
ように、圧縮ドキュメントファイル34内の圧縮データ
#1は、ページ番号#1が示すページのイメージデータ
の符号化により得られたデータとなっている。また、圧
縮データ#d(d=2〜Mmax)は、基準ページ番号#
dが示すページのイメージデータを基準イメージとして
作成された、ページ番号#dが示すページのイメージデ
ータを復元できるデータとなっている。
The compressed data # 1 is normal compressed data obtained by encoding image data, like the compressed data # 1 in the compressed document files 31-33.
The compressed data #d (d = 2 to Mmax) is differential compressed data created based on two image data having the same configuration as the compressed data #d in the compressed document files 31 to 33. However, as is apparent from having management data including a page number and a reference page number, the compressed data # 1 in the compressed document file 34 was obtained by encoding the image data of the page indicated by the page number # 1. Data. The compressed data #d (d = 2 to Mmax) is the reference page number #
The image data of the page indicated by page number #d, which is created using the image data of the page indicated by d as the reference image, can be restored.

【0183】以下、第4実施形態に係るドキュメント圧
縮/復元装置における圧縮ドキュメントファイル34の
作成手順を具体的に説明する。
Hereinafter, a procedure for creating the compressed document file 34 in the document compression / decompression device according to the fourth embodiment will be specifically described.

【0184】本実施形態に係るドキュメント圧縮/復元
装置において実行される圧縮処理は、第3実施形態に係
るドキュメント圧縮/復元装置において実行される圧縮
処理(図18〜20)と、圧縮データ選択処理の内容の
みが異なったものとなっている。このため、以下では、
圧縮データ選択処理を中心に、本ドキュメント圧縮/復
元装置における圧縮ドキュメントファイル34の作成手
順を説明することにする。
The compression processing executed by the document compression / decompression device according to the present embodiment includes a compression process (FIGS. 18 to 20) executed by the document compression / decompression device according to the third embodiment and a compressed data selection process. Only the content of the is different. For this reason,
The procedure for creating the compressed document file 34 in the document compression / decompression apparatus will be described focusing on the compressed data selection processing.

【0185】図25に、第4実施形態に係るドキュメン
ト圧縮/復元装置において実行される圧縮データ選択処
理の流れ図を示す。なお、図示した流れ図は、Mmax≧
3が成立するときに行われる処理のみを示したものとな
っている(Mmax=2の場合、ステップS1205の直
後にステップS1212が実行される)。
FIG. 25 shows a flowchart of the compressed data selection processing executed in the document compression / decompression device according to the fourth embodiment. It should be noted that the flow chart shown is Mmax ≧
3 shows only the processing performed when the condition 3 is satisfied (in the case of Mmax = 2, step S1212 is executed immediately after step S1205).

【0186】図示したように、圧縮データ選択処理開始
時、制御部21は、それまでの処理によって得られてい
るMmax×(Mmax−1)個の圧縮データ(差分圧縮デー
タ)の中から、サイズが最も小さい圧縮データを特定
し、その基準ページ番号aと生成ページ番号bとを取得
する(ステップS1201)。なお、圧縮データ#x_
yのサイズは、圧縮データ#y_xのサイズと等しいの
で、Mmax×(Mmax−1)個の圧縮データの中には、サ
イズが最も小さい圧縮データが2n(nは自然数)個存
在する。このステップS1201では、それら2n個の
圧縮データの中の、基準ページ番号<生成ページ番号が
成立しているものが、a、bを取得するための圧縮デー
タとして特定される。また、そのような圧縮データが複
数個あった場合には、最も小さい基準ページ番号を有す
るものが、a、bを取得するための圧縮データとして特
定される。
As shown in the figure, at the start of the compressed data selection processing, the control unit 21 determines the size of the Mmax × (Mmax−1) pieces of compressed data (differential compressed data) obtained by the previous processing. Is specified and the reference page number a and the generated page number b are obtained (step S1201). Note that the compressed data #x_
Since the size of y is equal to the size of the compressed data #y_x, there are 2n (n is a natural number) compressed data having the smallest size among the Mmax × (Mmax-1) compressed data. In step S1201, among the 2n pieces of compressed data, those for which the reference page number <the generated page number is satisfied are specified as compressed data for obtaining a and b. When there are a plurality of such compressed data, the one having the smallest reference page number is specified as the compressed data for acquiring a and b.

【0187】a、bの取得後、制御部21は、ページ番
号aのイメージデータ(イメージ#a)を圧縮すること
により、管理データの直後に配置する圧縮データである
圧縮データ#1を生成する(ステップS1202)。ま
た、aを、ページ番号#1として記憶する(ステップS
1203)。さらに、圧縮データ#a_bを、圧縮デー
タ#2として用いることを記憶(ステップS1204)
し、a、bを、それぞれ、基準ページ番号#2、ページ
番号#2として記憶する(ステップS1205)。
After obtaining a and b, the control section 21 compresses the image data of the page number a (image #a) to generate compressed data # 1 which is compressed data to be arranged immediately after the management data. (Step S1202). Also, a is stored as page number # 1 (step S1).
1203). Further, the fact that the compressed data #a_b is used as the compressed data # 2 is stored (step S1204).
Then, a and b are stored as reference page number # 2 and page number # 2, respectively (step S1205).

【0188】その後、制御部21は、処理すべき圧縮デ
ータ番号を記憶するための変数mに“3”を設定する
(ステップS1206)。そして、基準ページ番号がペ
ージ番号#1〜#m−1のいずれかであり、生成ページ
番号がページ番号#1〜#m−1のいずれでもない圧縮
データの中から、サイズが最小の圧縮データを特定する
(ステップS1207)。なお、最小サイズの圧縮デー
タが複数個存在した場合、制御部21は、以下の手順で
1つの圧縮データを特定する。複数個の最小サイズの圧
縮データの中に、基準ページ番号がページ番号#1(圧
縮データ#1の生成ページ番号)となっているものがあ
った場合には、その圧縮データを最小サイズの圧縮デー
タとして特定する。基準ページ番号がページ番号#1と
なっているものがない場合には、生成ページ番号が最も
小さい圧縮データ(複数個、存在する場合にはそれらの
いずれか)を最小サイズの圧縮データとして特定する。
このステップの処理内容については、後ほど、他の図を
参照してより具体的に説明する。
Thereafter, the control section 21 sets "3" to a variable m for storing the compressed data number to be processed (step S1206). Then, among the compressed data whose reference page number is any of page numbers # 1 to # m-1 and whose generated page number is not any of page numbers # 1 to # m-1, compressed data having the smallest size Is specified (step S1207). When there are a plurality of pieces of compressed data having the minimum size, the control unit 21 specifies one piece of compressed data in the following procedure. When the reference page number is page number # 1 (the generation page number of the compressed data # 1) among the plurality of minimum-sized compressed data, the compressed data is compressed to the minimum size. Specify as data. If none of the reference page numbers is page number # 1, the compressed data with the smallest generated page number (a plurality of pieces, if any, any of them) is specified as the compressed data of the minimum size. .
The processing content of this step will be more specifically described later with reference to other drawings.

【0189】そして、特定した圧縮データを、圧縮デー
タ#mとして使用することを記憶する(ステップS12
08)。また、特定した圧縮データの基準ページ番号、
生成ページ番号を、それぞれ、基準ページ番号#m、ペ
ージ番号#mとして記憶する(ステップS1209)。
Then, the fact that the specified compressed data is used as compressed data #m is stored (step S12).
08). Also, the reference page number of the specified compressed data,
The generated page numbers are stored as a reference page number #m and a page number #m, respectively (step S1209).

【0190】その後、m<Mmaxが成立しているか否か
を判断(ステップS1210)し、成立していた場合
(ステップS1210;YES)には、mに“1”を加
算する(ステップS1211)。そして、変更したmに
対して、ステップS1207〜S1209の処理を実行
する。
Thereafter, it is determined whether or not m <Mmax is satisfied (step S1210), and if it is satisfied (step S1210; YES), “1” is added to m (step S1211). Then, the processing of steps S1207 to S1209 is executed for the changed m.

【0191】制御部21は、このような処理を繰り返し
ていき、m<Mmaxが成立しなくなったとき(ステップ
S1210;NO)に、それまでの処理で得た各種の情
報を用いて、圧縮ドキュメントファイル34を作成する
(ステップS1212)。そして、圧縮データ選択処理
並びに復元処理を終了する。
The control section 21 repeats such processing. When m <Mmax is not satisfied (step S1210; NO), the control section 21 uses various information obtained in the processing up to that point to generate a compressed document. The file 34 is created (step S1212). Then, the compressed data selection process and the decompression process are completed.

【0192】以下、総ページ数が“5”であるドキュメ
ントが処理対象とされた場合を例に、第4実施形態に係
るドキュメント圧縮/復元装置における圧縮ドキュメン
トファイル34の作成手順をさらに具体的に説明する。
Hereinafter, the procedure of creating the compressed document file 34 in the document compression / decompression device according to the fourth embodiment will be described more specifically, taking as an example a case where a document whose total number of pages is “5” is to be processed. explain.

【0193】この場合、Mmax=5であるので、圧縮デ
ータ選択処理の開始時には、20(=5×4)個の圧縮
データが存在している。ここでは、それらの圧縮データ
のサイズが、図26に示したものであったとする。な
お、図26において、最も左側の列に示してある数値
(1、2等)が、基準ページ番号(基準イメージとして
使用されたイメージデータのページ番号)であり、最上
行に示してある数値が、生成ページ番号(復元によって
得られるイメージデータのページ番号)である。そし
て、基準ページ番号がXであり、生成ページ番号がYで
ある場所に記載してある数値が、圧縮データ#X_Yの
サイズ(任意単位)である。
In this case, since Mmax = 5, there are 20 (= 5 × 4) pieces of compressed data at the start of the compressed data selection process. Here, it is assumed that the size of the compressed data is as shown in FIG. In FIG. 26, the numerical values (1, 2, etc.) shown in the leftmost column are reference page numbers (page numbers of image data used as reference images), and the numerical values shown in the top row are , Generated page number (page number of image data obtained by restoration). The numerical value described at the place where the reference page number is X and the generated page number is Y is the size (arbitrary unit) of the compressed data #X_Y.

【0194】この場合、圧縮データ#3_4と圧縮デー
タ#4_3が最小サイズの圧縮データである。また、基
準ページ番号の方が生成ページ番号よりも小さいのは、
圧縮データ#3_4である。このため、ステップS12
01においては、a=3、b=4とされる。そして、ス
テップS1202、S1203では、イメージ#3の圧
縮により圧縮データ#1が作成され、ページ番号#1が
“3”であることが記憶される。また、ステップS12
04では、圧縮データ#3_4を圧縮データ#2とする
ことが記憶される。また、ステップS1205では、基
準ページ番号#2、ページ番号#2が、それぞれ、
“3”、“4”であること(圧縮データ#2が、第3ペ
ージのイメージデータを基準イメージとした、第4ペー
ジのイメージデータが復元されるデータであること)が
記憶される。
In this case, the compressed data # 3_4 and the compressed data # 4_3 are the compressed data of the minimum size. Also, the reason that the reference page number is smaller than the generated page number is
This is compressed data # 3_4. Therefore, step S12
In 01, a = 3 and b = 4. In steps S1202 and S1203, the compressed data # 1 is created by compressing the image # 3, and the fact that the page number # 1 is "3" is stored. Step S12
In 04, compressed data # 3_4 is stored as compressed data # 2. In step S1205, the reference page number # 2 and the page number # 2 are respectively
"3" and "4" (compressed data # 2 is data for restoring the image data of the fourth page using the image data of the third page as a reference image) is stored.

【0195】m=3の状態で実行されるステップS12
07では、基準ページ番号がページ番号#1〜#2(=
m−1)のいずれかであり、生成ページ番号がページ番
号#1〜#2のいずれでもない圧縮データの中から、サ
イズが最小の圧縮データが特定される。すなわち、この
場合、図27に模式的に示してあるように、網掛けを付
してない圧縮データの中から最小サイズの圧縮データが
探索され、その結果として、圧縮データ#3_2が特定
される。なお、図示したケースでは、最小サイズの圧縮
データが1つしか存在していないが、例えば、圧縮デー
タ#3_2と圧縮データ#3_5のサイズが共に最小サイ
ズ“2”であった場合、基準ページ番号がページ番号#
1(すなわち、“3”)となっている圧縮データ#3_
2が、最小サイズの圧縮データとして特定する。また、
圧縮データ#4_2と圧縮データ#4_5のサイズが共に
最小サイズであった場合、いずれも、基準ページ番号が
ページ番号#1(すなわち、“3”)とはなっていない
ので、生成ページ番号がより小さい圧縮データ#4_2
を、最小サイズの圧縮データとして特定する。
Step S12 executed when m = 3
07, the reference page numbers are page numbers # 1 to # 2 (=
m-1), and the compressed data having the smallest size is specified from the compressed data whose generated page number is not any of the page numbers # 1 and # 2. That is, in this case, as schematically shown in FIG. 27, compressed data of the minimum size is searched from among the unshaded compressed data, and as a result, compressed data # 3_2 is specified. . In the illustrated case, there is only one piece of compressed data of the minimum size. For example, if both the sizes of the compressed data # 3_2 and the compressed data # 3_5 are the minimum size “2”, the reference page number Is the page number #
1 (that is, "3") compressed data # 3_
2 specifies the compressed data of the minimum size. Also,
When both the sizes of the compressed data # 4_2 and the compressed data # 4_5 are the minimum size, since the reference page number is not the page number # 1 (that is, “3”), the generated page number is smaller. Small compressed data # 4_2
Is specified as the minimum-size compressed data.

【0196】そして、ステップS1208では、圧縮デ
ータ#3_2を圧縮データ#3として用いることが記憶
される。また、ステップS1209では、基準ページ番
号#3、ページ番号#3が、それぞれ、“3”、“2”
であることが記憶される。
Then, in step S1208, it is stored that the compressed data # 3_2 is used as the compressed data # 3. In step S1209, the reference page number # 3 and the page number # 3 are "3" and "2", respectively.
Is stored.

【0197】m=4の状態で実行されるステップS12
07では、基準ページ番号がページ番号#1〜#3のい
ずれかであり、生成ページ番号がページ番号#1〜#3
のいずれでもない圧縮データの中から、サイズが最小の
圧縮データが特定される。すなわち、この場合、図28
に模式的に示してあるように、網掛けを付してない圧縮
データの中から最小サイズの圧縮データが探索され、そ
の結果として、圧縮データ#2_1が特定される。そし
て、ステップS1208では、圧縮データ#2_1を圧
縮データ#4として用いることが記憶される。また、ス
テップS1209では、基準ページ番号#4、ページ番
号#4が、それぞれ、“2”、“1”であることが記憶
される。
Step S12 executed when m = 4
07, the reference page number is one of page numbers # 1 to # 3, and the generated page number is page numbers # 1 to # 3.
The compressed data having the smallest size is specified from among the compressed data other than the above. That is, in this case, FIG.
As shown schematically, compressed data of the minimum size is searched from among the compressed data not shaded, and as a result, compressed data # 2_1 is specified. Then, in step S1208, it is stored that the compressed data # 2_1 is used as the compressed data # 4. In step S1209, it is stored that the reference page number # 4 and the page number # 4 are "2" and "1", respectively.

【0198】m=5の状態で実行されるステップS12
07では、基準ページ番号がページ番号#1〜#4のい
ずれかであり、生成ページ番号がページ番号#1〜#4
のいずれでもない圧縮データの中から、サイズが最小の
圧縮データが特定される。すなわち、図29に模式的に
示してあるように、網掛けを付してない圧縮データの中
から最小サイズの圧縮データが探索される。この場合、
圧縮データ#1_5と圧縮データ#3_5とが最小サイズ
の圧縮データとなっているが、圧縮データ#3_5が、
圧縮データ#1の復元結果を直接用いて復元できるデー
タとなっているので、最小サイズの圧縮データとして圧
縮データ#3_5が特定される。
Step S12 executed when m = 5
07, the reference page number is one of page numbers # 1 to # 4, and the generated page number is page numbers # 1 to # 4.
The compressed data having the smallest size is specified from among the compressed data other than the above. That is, as schematically shown in FIG. 29, compressed data of the minimum size is searched from among the compressed data not shaded. in this case,
Although the compressed data # 1_5 and the compressed data # 3_5 are the minimum-sized compressed data, the compressed data # 3_5 is
Since the data can be restored by directly using the result of restoration of the compressed data # 1, the compressed data # 3_5 is specified as the compressed data of the minimum size.

【0199】そして、ステップS1208では、圧縮デ
ータ#3_5を圧縮データ#5として用いることが記憶
される。また、ステップS1209では、基準ページ番
号#5、ページ番号#5が、それぞれ、“3”、“5”
であることが記憶される。
In step S1208, it is stored that the compressed data # 3_5 is used as the compressed data # 5. In step S1209, the reference page number # 5 and the page number # 5 are "3" and "5", respectively.
Is stored.

【0200】その後に行われるステップS1210で
は、m<Mmaxが成立しないので、“NO”側への分岐
が行われる。そして、ステップS1212においては、
それまでに得ている情報基づき、図30に模式的に示し
たような内容の圧縮ドキュメントファイル34が作成さ
れる。
In step S1210 performed thereafter, since m <Mmax is not established, a branch to the “NO” side is performed. Then, in step S1212,
Based on the information obtained so far, a compressed document file 34 having the contents schematically shown in FIG. 30 is created.

【0201】次に、本実施形態に係るドキュメント圧縮
/復元装置における圧縮ドキュメントファイル34の復
元時の動作を説明する。
Next, the operation of the document compression / decompression device according to the present embodiment when decompressing the compressed document file 34 will be described.

【0202】図31に、処理対象ドキュメント34の復
元時に実行される復元処理の流れ図を示し、図32に、
復元処理時に実行される基準イメージ作成処理の流れ図
を示す。図31に示したように、復元処理時、制御部2
1は、まず、操作者から復元処理条件を取得する(ステ
ップS1301)。このステップは、ステップS30
1、S601等と同じものである。すなわち、制御部2
1は、ステップS1101において、復元を行う圧縮ド
キュメントファイルのファイル名、復元ページ範囲指定
情報、出力先指定情報等からなる復元処理条件を取得す
る。
FIG. 31 shows a flowchart of the restoration processing executed when the processing target document 34 is restored.
9 shows a flowchart of a reference image creation process executed during the restoration process. As shown in FIG. 31, during the restoration process, the control unit 2
In step S1301, first, a restoration process condition is obtained from the operator. This step corresponds to step S30
1, the same as S601 and the like. That is, the control unit 2
In step S1101, 1 obtains restoration processing conditions including the file name of the compressed document file to be restored, restoration page range designation information, output destination designation information, and the like.

【0203】その後、制御部21は、復元が指示された
圧縮ドキュメントファイル34に含まれている管理デー
タ(圧縮データ数Mmaxと、ページ番号#1〜#Mmax、
基準ページ番号#2〜#Mmax、先頭位置データ#2〜
#Mmax)を取得する(ステップS1302)。また、制
御部21は、このステップS1302の直後に、Mmax
<Peであるか否か、Ps>Mmaxであるか否かを判断す
る。そして、Mmax<Peであった場合には、PeにMmax
を設定してから、ステップS1303を開始する。ま
た、Ps>Mmaxであった場合には、復元処理を終了す
る。
Thereafter, the control unit 21 determines whether the management data (the number of compressed data Mmax, the page numbers # 1 to #Mmax,
Reference page numbers # 2 to #Mmax, start position data # 2
#Mmax) (step S1302). Further, immediately after step S1302, the control unit 21 sets Mmax
It is determined whether or not <Pe, and whether or not Ps> Mmax. If Mmax <Pe, Pe is set to Mmax.
Is set, and step S1303 is started. If Ps> Mmax, the restoration process ends.

【0204】ステップS1303において、制御部21
は、圧縮ドキュメントファイル34内の圧縮データ#1
を伸張することにより、RAM22上にイメージ#1を
生成する。その後、制御部21は、変数PにPsを設定
(ステップS1304)し、変数Mに、第Pページ圧縮
データ番号(ページ番号がPである圧縮データの圧縮デ
ータ番号)を設定する(ステップS1305)。すなわ
ち、ページ番号#m=Pであるmを求め、求めたmをM
に設定する。その後、制御部21は、イメージ#Mが復
元済みである(イメージ#MがRAM22上に存在す
る)か否かを判断する(ステップS1306)。
In step S1303, control unit 21
Is the compressed data # 1 in the compressed document file 34
To generate an image # 1 on the RAM 22. Thereafter, the control unit 21 sets Ps as a variable P (step S1304), and sets a P-th page compressed data number (compressed data number of the compressed data whose page number is P) as a variable M (step S1305). . That is, m with page number # m = P is found, and the found m is M
Set to. Thereafter, the control unit 21 determines whether or not the image #M has been restored (the image #M exists in the RAM 22) (step S1306).

【0205】イメージ#Mが復元済みであった場合(ス
テップS1306;YES)、制御部21は、ステップ
S1311に進み、第Pページのイメージデータである
RAM上のイメージ#Mを、出力先指定情報で指定され
ている出力先に出力する。一方、イメージ#Mが復元済
みでなかった場合(ステップS1306;YES)、制
御部21は、イメージ#Mを復元するために必要とされ
る基準イメージをRAM22上に用意するための処理で
ある基準イメージ作成処理(ステップS1308)を開
始する。
If image #M has been restored (step S1306; YES), control proceeds to step S1311, where control unit 21 stores image #M on the RAM, which is the image data of page P, in the output destination designation information. Output to the output destination specified by. On the other hand, if the image #M has not been restored (step S1306; YES), the control unit 21 sets a reference image required for restoring the image #M on the RAM 22 as a reference image. The image creation processing (step S1308) is started.

【0206】図32に示したように、基準イメージ作成
処理時、制御部21は、まず、変数jに“0”を、配列
変数m(j)に第Rページ圧縮データ番号(ページ番
号が基準ページ番号#Mと一致している圧縮データ番
号)を設定する(ステップS1401)。次いで、イメ
ージ#m(j)が復元済みであるか否かを判断する(ス
テップS1402)。
[0206] As shown in FIG. 32, when the reference image creation process, the control unit 21, first, the "0" to the variable j, the R M page compression data number in the array variable m (j) (page number A compressed data number matching the reference page number #M is set (step S1401). Next, it is determined whether or not the image #m (j) has been restored (step S1402).

【0207】イメージ#m(j)が復元済みでなかった
場合(ステップS1402;NO)、制御部21は、j
に“1”を加算する(ステップS1403)。そして、
rを基準ページ番号#m(j−1)としたときの、第r
ページ圧縮データ番号を配列変数m(j)に設定する
(ステップS1404)。その後、ステップS1402
に戻り、新たなj値に対して上記した処理を実行する。
When the image #m (j) has not been restored (step S1402; NO), the control unit 21
Is added to (step S1403). And
r is the reference page number #m (j-1), and
The page compression data number is set in the array variable m (j) (step S1404). After that, step S1402
And the above processing is executed for the new j value.

【0208】また、イメージ#m(j)が復元済みであ
った場合(ステップS1402;YES)、制御部21
は、ステップS1411に進み、j=0であるか否かを
判断する。すなわち、ステップS1404が実行されず
にステップS1402〜S1404の処理が完了したか
否か(イメージ#m(0)が復元ずみであるか否か)を
判定する。
If image #m (j) has been restored (step S1402; YES), control unit 21
Proceeds to step S1411 to determine whether j = 0. That is, it is determined whether or not the processing of steps S1402 to S1404 has been completed without executing step S1404 (whether or not image #m (0) has been restored).

【0209】j=0でなかった場合(ステップS141
1;NO)、制御部21は、イメージ#m(j)のコピ
ーを基準イメージとして生成(ステップS1412)
し、差分圧縮データ復元処理(ステップS1413)を
実行する。このステップで行われる差分圧縮データ復元
処理は、Mの代わりにm(j−1)が使用される点を除
けば、図14を用いて説明した差分圧縮データ復元処理
と同じものである。すなわち、ステップS1413で
は、圧縮データ#m(j−1)に応じて、基準イメージ
の一部が書き換えられることにより、イメージ#m(j
−1)が生成される。
If j = 0 is not satisfied (step S141)
1; NO), the control unit 21 generates a copy of the image #m (j) as a reference image (step S1412).
Then, the compressed differential data restoration process (step S1413) is executed. The differential compressed data restoration processing performed in this step is the same as the differential compressed data restoration processing described with reference to FIG. 14 except that m (j−1) is used instead of M. That is, in step S1413, a part of the reference image is rewritten in accordance with the compressed data #m (j-1), so that the image #m (j
-1) is generated.

【0210】この後、制御部21は、jの値を“1”減
らす処理(ステップS1414)を行った後、値を変更
したjに対して、ステップS1411からの処理を再び
実行する。そして、j=0が成立したとき(ステップS
1411;YES)に、基準イメージ作成処理を終了す
る。
Thereafter, the control unit 21 performs the process of reducing the value of j by "1" (step S1414), and then executes the processes from step S1411 again on j whose value has been changed. Then, when j = 0 holds (step S
1411; YES), the reference image creation processing ends.

【0211】図31に戻って、復元処理の説明を続け
る。基準イメージ作成処理(ステップS1308)の実
行後、制御部21は、基準イメージ作成処理で作成され
た(あるいは既に存在していた)イメージ#m(0)の
コピーを基準イメージとして生成する(ステップS13
09)。そして、差分圧縮データ作成処理(ステップS
1310)を実行する。このステップで行われる差分圧
縮データ作成処理は、図14を用いて説明したものと全
く同じものである。すなわち、ステップS1310で
は、基準イメージが、圧縮データ#Mに基づき書き換え
られ、第Pページのイメージデータであるイメージ#M
が作成される。
Returning to FIG. 31, description of the restoration processing will be continued. After execution of the reference image creation processing (step S1308), the control unit 21 generates a copy of the image #m (0) created (or already existing) created by the reference image creation processing as a reference image (step S13).
09). Then, the differential compressed data creation processing (step S
1310). The differential compressed data creation processing performed in this step is exactly the same as that described with reference to FIG. That is, in step S1310, the reference image is rewritten based on the compressed data #M, and the image #M which is the image data of the P-th page is rewritten.
Is created.

【0212】その後、制御部21は、RAM22上のイ
メージ#Mを、指定されている出力先に出力する(ステ
ップS1311)。次いで、Pに“1”を加算(ステッ
プS1311)し、PがPeを超えていなかった場合
(ステップS1312;NO)には、ステップS130
5に戻り、値を変更したPに対して上述した処理を再度
実行する。そして、P=Pe+1となったとき(ステッ
プS1312;YES)に、不要となったイメージデー
タを破棄する処理(図示せず)を行って、復元処理を終
了する。
Thereafter, the control section 21 outputs the image #M on the RAM 22 to the designated output destination (step S1311). Next, “1” is added to P (step S1311). If P does not exceed Pe (step S1312; NO), step S130 is performed.
Returning to 5, the above-mentioned processing is executed again for P whose value has been changed. Then, when P = Pe + 1 (step S1312; YES), a process (not shown) of discarding unnecessary image data is performed, and the restoration process is terminated.

【0213】以下、図30に示した圧縮ドキュメントフ
ァイル34の全ページの復元が指示された場合を例に、
第4実施形態に係るドキュメント圧縮/復元装置におい
て実行される復元処理をさらに具体的に説明する。
Hereinafter, a case where restoration of all pages of the compressed document file 34 shown in FIG. 30 is instructed will be described as an example.
The decompression process executed by the document compression / decompression device according to the fourth embodiment will be described more specifically.

【0214】この場合には、ステップS1302におい
て、RAM22上に、第3ページのイメージデータであ
るイメージ#1が生成される。その後、ステップS13
04、S1305において、PにPs値である“1”が
設定され、Mにページ番号が“1”である圧縮データ番
号である“4”が設定される。そして、ステップS16
06の判断が行われ、イメージ#4が復元されていない
ため、基準イメージ作成処理が開始される。
In this case, in step S1302, image # 1, which is image data of the third page, is generated on RAM 22. Then, step S13
04, in S1305, P is set to Ps value “1”, and M is set to compressed data number “4” whose page number is “1”. Then, step S16
Since the determination of 06 is made and the image # 4 has not been restored, the reference image creation processing is started.

【0215】基準イメージ作成処理のステップS140
1では、jに“0”が、m(0)に、イメージ#4の復
元時に基準イメージとして使用されるイメージデータが
復元される圧縮データの圧縮データ番号である“2”が
設定される。そして、ステップS1402が実行され、
イメージ#2が復元されていないため、“NO”側への
分岐が行われる。その結果、jが“1”に変更され、m
(1)に、イメージ#2の復元時に基準イメージとして
使用されるイメージデータ(イメージ#1)の圧縮デー
タ番号である“1”が設定される。その後、再度、ステ
ップS1402が実行され、イメージ#1が復元されて
いるため、“YES”側への分岐が行われる。
Step S140 of reference image creation processing
In 1, the j is set to “0” and the m (0) is set to “2” which is the compressed data number of the compressed data used to restore the image data used as the reference image when the image # 4 is restored. Then, step S1402 is executed,
Since the image # 2 has not been restored, a branch is made to the “NO” side. As a result, j is changed to “1” and m
In (1), “1” which is a compressed data number of image data (image # 1) used as a reference image when decompressing image # 2 is set. Thereafter, step S1402 is executed again, and since the image # 1 has been restored, the branch to the “YES” side is performed.

【0216】すなわち、図33(A)に模式的に示した
ように、RAM22内にイメージ#1のみが存在し、m
(0)=2、m(1)=1、j=1である状態で、ステ
ップS1411が実行される。図33(A)に示したケ
ースでは、j=1であるので、ステップS1411にお
いて“NO”側への分岐が行われる。
That is, as schematically shown in FIG. 33A, only the image # 1 exists in the RAM 22,
Step S1411 is executed in a state where (0) = 2, m (1) = 1, and j = 1. In the case shown in FIG. 33A, since j = 1, branching to the “NO” side is performed in step S1411.

【0217】従って、ステップS1412の実行によ
り、図33(B)に示したように、イメージ#1(=m
(1))のコピー(基準イメージ)が存在する状態が形
成される。そして、ステップS1413において、圧縮
データ#2(=m(0))に対する差分圧縮データ復元
処理が行われるため、図33(C)に示したように、R
AM22上にイメージ#1と、第4ページのイメージデ
ータであるイメージ#2とが存在する状態が形成され
る。この後、jの値が“1”減ぜられるので、j=0と
なる。従って、基準イメージ作成処理が終了され、ステ
ップS1309〜S1311が実行される。
Therefore, by executing step S1412, as shown in FIG. 33B, image # 1 (= m
A state where the copy (reference image) of (1)) exists is formed. Then, in step S1413, since the differential compressed data decompression process is performed on the compressed data # 2 (= m (0)), as shown in FIG.
A state is formed in which the image # 1 and the image # 2 which is the image data of the fourth page exist on the AM 22. Thereafter, the value of j is reduced by "1", so that j = 0. Therefore, the reference image creation processing ends, and steps S1309 to S1311 are executed.

【0218】ステップS1309では、図33(D)に
示したように、イメージ#2(=m(0))のコピーが
基準イメージとして作成される。続くステップS131
0において、そのコピーが圧縮データ#4(=M)に基
づき書き換えられる結果、図33(E)に示したよう
に、RAM22上にイメージ#1と、イメージ#2と、
第1ページのイメージデータであるイメージ#4とが存
在する状態が形成される。そして、そのイメージ#4
(第1ページのイメージデータ)が、指定されている出
力先に出力される。
In step S1309, as shown in FIG. 33D, a copy of image # 2 (= m (0)) is created as a reference image. Subsequent step S131
0, the copy is rewritten based on the compressed data # 4 (= M). As a result, as shown in FIG. 33 (E), the image # 1, the image # 2,
A state is established in which image # 4, which is the image data of the first page, exists. And that image # 4
(Image data of the first page) is output to the specified output destination.

【0219】その後、Pが“2”に変更され、第2ペー
ジのイメージデータを出力するために、ステップS13
05からの処理が再び実行されることになる。
Thereafter, P is changed to "2", and step S13 is executed to output the image data of the second page.
The processing from 05 is executed again.

【0220】この場合、ステップS1305では、M
に、第2ページ圧縮データ番号である“3”が設定され
る。イメージ#3はRAM22上に存在しない(図33
(E)参照)ので、基準イメージ作成処理が開始され、
m(0)に、第Rページ圧縮データ番号である“1”
が設定される。そして、ステップS1402が実行され
るが、イメージ#1(=m(0))がRAM22上に存
在しているので、ステップS1403、S1404が行
われることなくステップS1411からの処理が開始さ
れる。すなわち、図34(A)に模式的に示したよう
に、RAM22内にイメージ#1、#2、#4が存在
し、m(0)=1、j=0である状態で、ステップS1
411が実行される。
In this case, in step S1305, M
Is set to the second page compression data number “3”. Image # 3 does not exist on RAM 22 (FIG. 33)
(E)), the reference image creation process is started,
In m (0), “1” which is the RM-th page compressed data number
Is set. Then, step S1402 is executed, but since image # 1 (= m (0)) exists on the RAM 22, the processing from step S1411 is started without performing steps S1403 and S1404. That is, as schematically shown in FIG. 34A, in a state where the images # 1, # 2, and # 4 exist in the RAM 22 and m (0) = 1 and j = 0, step S1 is executed.
411 is executed.

【0221】j=0であるので、ステップS1411で
は“YES”側への分岐が行われる。すなわち、ステッ
プS1309からの処理が開始される。その結果、図3
4(B)に示したように、イメージ#1(=m(0))
のコピーが基準イメージとして作成される。そして、そ
のコピーが、圧縮データ#3(=M)に基づき書き換え
られるので、図34(C)に示したように、RAM22
上に、イメージ#1、2、4と、第2ページのイメージ
データであるイメージ#3とが存在する状態が形成され
る。そして、そのイメージ#3(第2ページのイメージ
データ)が、指定されている出力先に出力され、P値が
“3”に変更される。
Since j = 0, a branch is made to the "YES" side in step S1411. That is, the processing from step S1309 is started. As a result, FIG.
As shown in FIG. 4 (B), image # 1 (= m (0))
Is made as a reference image. Then, since the copy is rewritten based on the compressed data # 3 (= M), as shown in FIG.
Above, a state is formed in which images # 1, 2, 4 and image # 3, which is image data of the second page, exist. Then, the image # 3 (image data of the second page) is output to the specified output destination, and the P value is changed to “3”.

【0222】P=3とされた後の処理時には、ステップ
S1305において、Mに第3ページ圧縮データ番号で
ある“1”が設定される。そして、イメージ#1が復元
済みであるので、そのイメージ#1の出力(ステップS
1311)が行われる。その後に行われるP=4に対す
る処理時にも、第4ページのイメージデータであるイメ
ージ#2が既にRAM22上に存在しているので、ステ
ップS1308〜S1310が実行されることなく、ス
テップS1311からの処理が実行される。
At the time of the process after P = 3, in step S1305, the third page compressed data number “1” is set in M. Then, since the image # 1 has been restored, the output of the image # 1 (step S
1311) is performed. In the subsequent process for P = 4, since the image # 2, which is the image data of the fourth page, already exists in the RAM 22, steps S1308 to S1310 are not executed, and the process from step S1311 is not executed. Is executed.

【0223】そして、P=5に対する処理時には、ステ
ップS1305において、Mに“5”が設定される。イ
メージ#5は復元済みではないので、基準イメージ作成
処理が行われ、ステップS1401において、j=0、
m(0)=1とされる。イメージ#1(=m(0))が
復元済みであるので、図35(A)に模式的に示したよ
うに、RAM22内にイメージ#1〜#4が存在し、m
(0)=1、j=0である状態で、ステップS1411
が実行される。
At the time of processing for P = 5, “5” is set to M in step S1305. Since image # 5 has not been restored, a reference image creation process is performed, and in step S1401, j = 0,
m (0) = 1. Since the image # 1 (= m (0)) has been restored, the images # 1 to # 4 exist in the RAM 22 as schematically shown in FIG.
In the state where (0) = 1 and j = 0, step S1411
Is executed.

【0224】j=0であるので、ステップS1411で
は“YES”側への分岐が行われる。すなわち、ステッ
プS1412〜S1414が実行されることなく、基準
イメージ作成処理が終了され、ステップS1309〜S
1311が実行される。ステップS1309では、図3
5(B)に示したように、イメージ#1(=m(0))
のコピーが基準イメージとして作成される。そして、ス
テップS1310では、そのコピーの圧縮データ#5
(=M)に基づく書き換えにより、イメージ#5が生成
される。その結果、図35(C)に示したように、RA
M22上に、イメージ#1〜#4、第5ページのイメー
ジデータであるイメージ#5が存在する状態が形成され
る。そして、そのイメージ#5が、指定されている出力
先に出力される。その後、Pが“6”となるので、復元
処理が終了される。
Since j = 0, a branch is made to the "YES" side in step S1411. That is, the reference image creation processing is terminated without executing steps S1412 to S1414, and steps S1309 to S1309.
1311 is executed. In step S1309, FIG.
As shown in FIG. 5 (B), image # 1 (= m (0))
Is made as a reference image. Then, in step S1310, the compressed data # 5 of the copy
Image # 5 is generated by rewriting based on (= M). As a result, as shown in FIG.
A state in which images # 1 to # 4 and image # 5 which is the image data of the fifth page exists on M22. Then, the image # 5 is output to the specified output destination. Thereafter, P becomes “6”, and the restoration processing is terminated.

【0225】以上、説明したように、第4実施形態に係
るドキュメント圧縮/復元装置では、Nページのドキュ
メントに対して、1つの通常圧縮データとN−1個の差
分圧縮データとを含む圧縮ドキュメントファイル34で
あって、基準イメージとして使用されているイメージデ
ータが、サイズが最小となるように差分圧縮データ毎に
決定されている圧縮ドキュメントファイル34が作成さ
れる。
As described above, in the document compressing / decompressing apparatus according to the fourth embodiment, a compressed document including one piece of normal compressed data and N-1 pieces of differentially compressed data for an N page document A compressed document file, which is a file and is determined for each differential compressed data so that the size of image data used as a reference image is minimized, is created.

【0226】従って、各ページが共通した部分を多く有
するドキュメント、例えば、表計算ソフトで作成された
ドキュメントや、請求書等の定型のドキュメントに対し
て、本ドキュメント圧縮/復元装置を用いれば、第1〜
第3実施形態に係るドキュメント圧縮/復元装置を用い
た場合よりも小さいサイズの圧縮ドキュメントファイル
34が得られることになる。
Therefore, if the present document compression / decompression apparatus is used for a document in which each page has many portions in common, for example, a document created by spreadsheet software or a standard document such as an invoice, 1 to
As a result, a compressed document file 34 having a smaller size than when the document compression / decompression device according to the third embodiment is used is obtained.

【0227】<第5実施形態>図36に、第5実施形態
に係るドキュメント圧縮/復元装置によって作成される
圧縮ドキュメントファイル35の構成を示す。図示した
ように、圧縮ドキュメントファイル35は、圧縮データ
数Mmax、種別フラグ#2〜#Mmax、先頭位置データ#
1〜#Mmaxからなる管理データと、Mmax個の圧縮デー
タとで構成される。
<Fifth Embodiment> FIG. 36 shows the structure of a compressed document file 35 created by a document compression / decompression device according to a fifth embodiment. As shown in the figure, the compressed document file 35 has a number Mmax of compressed data, type flags # 2 to #Mmax,
It is composed of management data consisting of 1 to #Mmax and Mmax pieces of compressed data.

【0228】種別フラグ#d(d=2〜Mmax)は、圧
縮データ#dが通常圧縮データであるか差分圧縮データ
であるかを示すデータである。すなわち、圧縮ドキュメ
ントファイル35は、圧縮データ#2〜#Mmaxの中
に、通常圧縮データが含まれることがあるファイルとな
っている。なお、各種別フラグは1ビットのデータとな
っており、種別フラグ#2〜#Mmaxは、圧縮データ数
Mmaxの記憶領域に続く、Mmax値に応じたバイト数の記
憶領域(“INT((Mmax−2)/8)+1”バイトの記憶領
域)に設定されている。先頭位置データ#1〜#Mmax
は、それぞれ、圧縮データ#1〜#Mmaxの先頭位置
を、圧縮ドキュメントファイル35の先頭からの相対ア
ドレスで表したデータである。なお、圧縮ドキュメント
ファイル32〜34と異なり、圧縮ドキュメントファイ
ル35に先頭位置データ#1が含まれている理由につい
ては後述する。
The type flag #d (d = 2 to Mmax) is data indicating whether the compressed data #d is normal compressed data or differential compressed data. That is, the compressed document file 35 is a file in which compressed data # 2 to #Mmax may include normal compressed data. The type-specific flag is 1-bit data, and the type flags # 2 to #Mmax are stored in a storage area of a byte number corresponding to the Mmax value (“INT ((Mmax -2) / 8) +1 "byte storage area). Start position data # 1 to #Mmax
Are data representing the start positions of the compressed data # 1 to #Mmax as relative addresses from the start of the compressed document file 35, respectively. Note that, unlike the compressed document files 32 to 34, the reason why the head position data # 1 is included in the compressed document file 35 will be described later.

【0229】以下、図37及び図38を用いて、第5実
施形態に係るドキュメント圧縮/復元装置における圧縮
ドキュメントファイル35の作成手順を説明する。な
お、図37は、本ドキュメント圧縮/復元装置において
実行される圧縮処理の流れ図であり、図38は、圧縮処
理時に実行される差分圧縮データ作成処理の流れ図であ
る。
The procedure for creating a compressed document file 35 in the document compression / decompression device according to the fifth embodiment will be described below with reference to FIGS. 37 and 38. FIG. 37 is a flowchart of a compression process executed in the document compression / decompression apparatus, and FIG. 38 is a flowchart of a differential compressed data creation process executed at the time of the compression process.

【0230】図37に示したように、圧縮処理時、制御
部21は、まず、処理を行っているページのページ番号
を記憶するための変数Mに“1”を設定する(ステップ
S1501)。そして、処理対象ドキュメントの第1ペ
ージ目のイメージデータを、イメージ#1としてRAM
22上に用意する(ステップS1502)。すなわち、
アプリケーションプログラムから呼び出された場合に
は、このステップにおいて、アプリケーションプログラ
ムから渡される印刷データに応じたイメージデータが
“1”(=M)と関連づけた形でRAM22上に作成さ
れる。複数のイメージデータからなるドキュメントの圧
縮を行っている際には、第1ページ用のイメージデータ
ファイルの内容が読み出され、RAM22上に“1”
(=M)と関連づけた形で記憶される。
As shown in FIG. 37, at the time of compression processing, the control section 21 first sets "1" to a variable M for storing the page number of the page being processed (step S1501). Then, the image data of the first page of the document to be processed is stored in the RAM as image # 1.
22 (step S1502). That is,
When called from the application program, in this step, image data corresponding to the print data passed from the application program is created on the RAM 22 in a form associated with “1” (= M). When a document composed of a plurality of image data is being compressed, the contents of the image data file for the first page are read out, and “1” is stored in the RAM 22.
(= M).

【0231】イメージ#1をRAM22上に用意した
後、制御部21は、そのイメージ#1に含まれる単位デ
ータの数をkmaxとして記憶する(ステップS150
3)。その後、制御部21は、RAM22上のイメージ
#1をランレングス符号化することにより、RAM22
上に圧縮データ#1を作成する(ステップS150
4)。そして、処理すべきページが残っているか否かを
判断する(ステップS1505)。
After preparing the image # 1 on the RAM 22, the control unit 21 stores the number of unit data included in the image # 1 as kmax (step S150).
3). Thereafter, the control unit 21 performs run-length encoding on the image # 1 on the RAM
Compressed data # 1 is created above (step S150)
4). Then, it is determined whether there is a page to be processed (step S1505).

【0232】処理すべきページが残っていた場合(ステ
ップS1505;YES)、制御部21は、圧縮データ
作成処理(ステップS1506)を実行する。
If there are pages to be processed (step S1505; YES), the control unit 21 executes a compressed data creation process (step S1506).

【0233】図38に示したように、圧縮データ作成処
理時、制御部21は、RAM22上に存在しているイメ
ージ#Mを基準イメージとして使用することを認識する
(ステップS1601)。次いで、Mに“1”を加算
(ステップS1602)し、種別フラグ#Mに“1”を
設定する(ステップS1603)。
As shown in FIG. 38, at the time of the compressed data creation processing, the control section 21 recognizes that the image #M existing on the RAM 22 is used as a reference image (step S1601). Next, “1” is added to M (step S1602), and “1” is set to the type flag #M (step S1603).

【0234】そして、処理対象ドキュメントの第Mペー
ジのイメージデータを、イメージ#MとしてRAM22
上に用意(ステップS1604)し、差分圧縮データ作
成処理(ステップS1604)を実行する。このステッ
プで実行される差分圧縮データ作成処理は、図14を用
いて説明したものと全く同じものであるので、説明は省
略する。
Then, the image data of the Mth page of the document to be processed is stored in the RAM 22 as an image #M.
It is prepared above (step S1604), and executes differential compressed data creation processing (step S1604). The difference compressed data creation processing executed in this step is exactly the same as that described with reference to FIG. 14, and a description thereof will be omitted.

【0235】差分圧縮データ作成処理の実行により、圧
縮データ#Mを作成した後、制御部21は、基準イメー
ジとして利用したイメージ#M−1を破棄する(ステッ
プS1606)。そして、イメージ#Mの通常圧縮デー
タを作成(ステップS1607)し、作成した通常圧縮
データのサイズSRLEと、差分圧縮データ作成処理で
作成された圧縮データ#MのサイズSとを比較する
(ステップS1608)。
After creating the compressed data #M by executing the difference compressed data creation processing, the control unit 21 discards the image # M-1 used as the reference image (step S1606). Then, normal compressed data of the image #M is created (step S1607), and the size S RLE of the created normal compressed data is compared with the size SD of the compressed data #M created in the differential compressed data creating process (step S1607). Step S1608).

【0236】SRLE<Sであった場合(ステップS
1608;NO)、制御部21は、作成したイメージ#
Mの通常圧縮データを破棄(ステップS1609)し、
圧縮データ作成処理を終了する。一方、通常圧縮データ
のサイズの方が小さかった場合(ステップS1608;
YES)、制御部21は、差分圧縮データ作成処理にお
いて作成した圧縮データ#Mを破棄し、ステップS16
07で作成した通常圧縮データを圧縮データ#Mとする
(ステップS1610)。そして、種別フラグ#Mの値
を“0”に変更(ステップS1611)し、圧縮データ
作成処理を終了する。
If S RLE < SD (step S
1608; NO), the control unit 21
The normal compressed data of M is discarded (step S1609),
The compressed data creation processing ends. On the other hand, when the size of the normal compressed data is smaller (step S1608;
YES), the control unit 21 discards the compressed data #M created in the differential compressed data creation process, and proceeds to step S16.
The normal compressed data created in step 07 is set as compressed data #M (step S1610). Then, the value of the type flag #M is changed to “0” (step S1611), and the compressed data creation processing ends.

【0237】図37に示してあるように、制御部21
は、この圧縮データ作成処理(ステップS1506)を
処理すべき各ページに対して実行し、処理すべきページ
がなくなったとき(ステップS1505;NO)には、
それまでに得られている情報に基づき圧縮ドキュメント
ファイル36を作成(ステップS1513)し、圧縮処
理を終了する。
[0237] As shown in FIG.
Executes this compressed data creation process (step S1506) for each page to be processed, and when there are no more pages to be processed (step S1505; NO),
The compressed document file 36 is created based on the information obtained so far (step S1513), and the compression process ends.

【0238】次に、本実施形態に係るドキュメント圧縮
/復元装置における圧縮ドキュメントファイル36の復
元手順を説明する。
Next, a procedure for restoring the compressed document file 36 in the document compression / decompression device according to the present embodiment will be described.

【0239】図39、40に、本ドキュメント圧縮/復
元装置において実効される復元処理の流れ図を示す。図
39に示したように、復元処理時、制御部21は、ま
ず、操作者から復元処理条件を取得する(ステップS1
701)。このステップで取得される復元処理条件は、
既に説明した各実施形態における復元処理条件と同じも
のである。
FIGS. 39 and 40 show flow charts of the decompression processing executed in the document compression / decompression apparatus. As shown in FIG. 39, at the time of restoration processing, the control unit 21 first acquires restoration processing conditions from the operator (step S1).
701). The restoration processing conditions obtained in this step are as follows:
This is the same as the restoration processing condition in each embodiment described above.

【0240】復元処理条件の取得後、制御部21は、処
理対象圧縮ドキュメントファイルの管理データ(圧縮デ
ータ数Mmax及び種別フラグ#2〜#Mmax、先頭位置デ
ータ#1〜#Mmax)を取得する(ステップS170
2)。そして、種別フラグ#1を“0”とするととも
に、処理を行う圧縮データの圧縮データ番号を記憶する
ための変数MにPs(復元開始ページ番号)を設定する
(ステップS1703)。なお、既に説明した圧縮手順
から明らかなように、圧縮ドキュメントファイル35内
の、ある圧縮データ番号の圧縮データは、その圧縮デー
タ番号と等しいページ番号のイメージデータを圧縮した
データとなっているため、このMの値は、処理(復元)
を行おうとしているイメージデータのページ番号をも表
す値となっている。
After obtaining the restoration processing conditions, the control unit 21 obtains management data (the number of compressed data Mmax, type flags # 2 to #Mmax, and top position data # 1 to #Mmax) of the compressed document file to be processed (see FIG. 4). Step S170
2). Then, the type flag # 1 is set to “0”, and Ps (decompression start page number) is set in a variable M for storing the compressed data number of the compressed data to be processed.
(Step S1703). As is clear from the compression procedure already described, the compressed data of a certain compressed data number in the compressed document file 35 is data obtained by compressing image data of a page number equal to the compressed data number. This value of M is processed (restored)
Is a value that also represents the page number of the image data that is to be executed.

【0241】その後、制御部21は、種別フラグ#Mの
値が“0”であるか否かを判断する(ステップS170
4)。種別フラグ#Mの値が“0”でなかった場合(ス
テップS1704;NO)、制御部21は、Mの値を
“1”減少させる(ステップS1705)。そして、ス
テップS1704に戻り、種別フラグ#Mの値が“0”
であるか否かを判断する。
Thereafter, control unit 21 determines whether or not the value of type flag #M is "0" (step S170).
4). If the value of the type flag #M is not “0” (step S1704; NO), the control unit 21 decreases the value of M by “1” (step S1705). Then, the process returns to step S1704, where the value of the type flag #M is “0”.
Is determined.

【0242】ステップS1704、S1705の処理に
より、種別フラグ#M=0となるMが見出せた際(ステ
ップS1704;YES)、制御部21は、圧縮ドキュ
メントファイル35内の先頭位置データ#Mが示す位置
からの記憶領域に存在している圧縮データ#Mを伸張す
ることによりRAM22上にイメージ#Mを作成する
(ステップS1706)。
When the type flag # M = 0 is found by the processing of steps S1704 and S1705 (step S1704; YES), the control unit 21 determines the position indicated by the head position data #M in the compressed document file 35. Then, an image #M is created on the RAM 22 by decompressing the compressed data #M existing in the storage area from (step S1706).

【0243】その後、制御部21は、Mの値がPsと一
致しているか否かを判断(ステップS1707)し、一
致していなかった場合(ステップS1707;NO)に
は、RAM22上のイメージ#Mを基準イメージとして
認識する(ステップS1708)。その後、Mに“1”
を加算(ステップS1709)して、差分圧縮データ復
元処理(ステップS1710)を実行する。このステッ
プで行われる差分圧縮データ復元処理は、図14を用い
て既に説明したものと同じものである。
Thereafter, the control unit 21 determines whether or not the value of M matches Ps (step S1707). If the value does not match (step S1707; NO), the image # M is recognized as a reference image (step S1708). Then, "1" is set to M
Are added (step S1709), and the differential compressed data decompression process (step S1710) is executed. The differential compressed data decompression processing performed in this step is the same as that already described with reference to FIG.

【0244】差分圧縮データ復元処理の実行後、制御部
21は、ステップS1707に戻り、MがPsと一致し
ているか否かを判断する。そして、両者が一致していな
かった場合(ステップS1707;NO)には、再び、
ステップS1708〜S1710の処理を実行し、両者
が一致した場合(ステップS1707;YES)には、
RAM22上のイメージ#Mを、出力先指定情報で指定
されている出力先に出力する(ステップS1711)。
After executing the differential compressed data restoration processing, the control unit 21 returns to step S1707, and determines whether or not M is equal to Ps. If they do not match (step S1707; NO),
The processing of steps S1708 to S1710 is executed, and if they match (step S1707; YES),
The image #M on the RAM 22 is output to the output destination specified by the output destination specification information (step S1711).

【0245】その後、制御部21は、M<Peが成立す
るか否かを判断する(図40:ステップS1721)。
そして、M<Peであった場合(ステップS1721;
YES)には、Mに“1”を加算する(ステップS17
22)。そして、種別フラグ#Mが“1”であるか否か
を判断し、“1”でなかった場合(ステップS172
3;NO)、RAM22上のイメージ#M−1を基準イ
メージとして認識する(ステップS1724)。そし
て、差分圧縮データ復元処理(ステップS1725)を
実行することによって、RAM22上にイメージ#Mを
作成する。
Thereafter, the control section 21 determines whether or not M <Pe holds (FIG. 40: step S1721).
If M <Pe (step S1721;
To “YES”, “1” is added to M (step S17)
22). Then, it is determined whether or not the type flag #M is “1”, and when it is not “1” (step S172)
3; NO), the image # M-1 on the RAM 22 is recognized as a reference image (step S1724). Then, an image #M is created on the RAM 22 by executing the differential compressed data restoring process (step S1725).

【0246】一方、種別フラグ#Mが“1”であった場
合(ステップS1723;YES)、制御部21は、イ
メージ#M−1を破棄する(ステップS1726)。そ
して、圧縮データ#Mを伸張することによりRAM22
上にイメージ#Mを作成する(ステップS1727)。
すなわち、種別フラグ#Mが“1”である圧縮データ#
Mは、基準イメージを必要としない通常圧縮データであ
る。このため、イメージ#M−1を破棄し、イメージ#
Mを得るために、圧縮データ#Mを伸張する。
If the type flag #M is "1" (step S1723; YES), the control section 21 discards the image # M-1 (step S1726). Then, by expanding the compressed data #M, the RAM 22 is expanded.
An image #M is created above (step S1727).
That is, the compressed data # whose type flag #M is “1”
M is normal compressed data that does not require a reference image. Therefore, the image # M-1 is discarded, and the image # M-1 is discarded.
In order to obtain M, the compressed data #M is expanded.

【0247】ステップS1725あるいはステップS1
727でイメージ#Mを作成した後、制御部21は、そ
のイメージ#Mを指定されている出力先に出力する(ス
テップS1728)。そして、ステップS1721に戻
り、出力したイメージ#Mが復元ページ範囲指定情報で
指定されている最終ページのイメージであるか否かを判
断し、最終ページのイメージであった場合(ステップS
1721;YES)に、不要となったイメージデータを
破棄(図示せず)して、復元処理を終了する。
Step S1725 or step S1
After creating the image #M in 727, the control unit 21 outputs the image #M to the designated output destination (step S1728). Returning to step S1721, it is determined whether or not the output image #M is the image of the last page specified by the restored page range specification information, and if it is the image of the last page (step S1721).
1721; YES), the unnecessary image data is discarded (not shown), and the restoration processing ends.

【0248】以上、説明したように、第5実施形態に係
るドキュメント圧縮/復元装置では、Nページのドキュ
メントに対して、第1〜第Nページ用の圧縮データを含
む圧縮ドキュメントファイルであって、第1ページ用の
圧縮データとして、第1ページのイメージデータの通常
圧縮データが使用され、第2ページ以降の各ページ用の
圧縮データとして、そのページのイメージデータの通常
圧縮データと、前ページのイメージデータを基準イメー
ジとして作成された差分圧縮データの中の、サイズの小
さい方のデータが使用された圧縮ドキュメントファイル
が作成される。すなわち、差分圧縮データを用いること
が適当でないページに関しては通常圧縮データが用いら
れた圧縮ドキュメントファイル35が作成される。
As described above, in the document compressing / decompressing apparatus according to the fifth embodiment, a compressed document file containing compressed data for the first to Nth pages is provided for an N page document. The normal compressed data of the image data of the first page is used as the compressed data for the first page, and the compressed data of the image data of the page and the normal compressed data of the previous page are used as the compressed data for each page after the second page. A compressed document file is created using the smaller size data of the difference compressed data created using the image data as the reference image. That is, for a page for which it is not appropriate to use differential compressed data, a compressed document file 35 using normal compressed data is created.

【0249】従って、本ドキュメント圧縮/復元装置を
用いれば、処理対象とされたドキュメントがどのような
ものであっても、少なくとも従来と同等の圧縮率でその
ドキュメントを圧縮できることになる。そして、各ペー
ジが共通した部分を多く有するドキュメントに対して
は、従来よりも高い圧縮率でそのドキュメントを圧縮で
きることになる。
Therefore, if the document compression / decompression device is used, whatever document is processed, the document can be compressed at least at the same compression ratio as the conventional one. Then, for a document in which each page has many common portions, the document can be compressed at a higher compression ratio than before.

【0250】そして、圧縮ドキュメントファイル35
は、差分圧縮データの代わりに通常圧縮データが使用さ
れることがあるファイルとなっているが故に、圧縮デー
タ#1を読み出さなくとも、目的とするページの復元、
出力を行えることがあるファイルとなっている。本実施
形態に係るドキュメント圧縮/復元装置では、圧縮デー
タ#1の読み出しを必要としない場合を含めた全ての場
合に同一の手順で処理が行えるようにするために、全て
の圧縮データの先頭位置データを圧縮ドキュメントファ
イル35内に含めているのである。
The compressed document file 35
Is a file in which normal compressed data may be used in place of differential compressed data. Therefore, even if compressed data # 1 is not read, restoration of a target page can be performed.
It is a file that can be output. In the document compression / decompression apparatus according to the present embodiment, the start position of all the compressed data is set so that the processing can be performed in the same procedure in all cases including the case where reading of the compressed data # 1 is not necessary. The data is included in the compressed document file 35.

【0251】<第6実施形態>図41に、第6実施形態
に係るドキュメント圧縮/復元装置によって作成される
圧縮ドキュメントファイル36の構成を示す。図示した
ように、圧縮ドキュメントファイル36は、圧縮データ
数Mmax、ページ番号#1〜#Mmax、基準ページ番号#
2〜#Mmax及び先頭位置データ#1〜#Mmaxからなる
管理データと、Mmax個の圧縮データとで構成される。
<Sixth Embodiment> FIG. 41 shows the structure of a compressed document file 36 created by a document compression / decompression device according to a sixth embodiment. As shown in the drawing, the compressed document file 36 includes a compressed data number Mmax, page numbers # 1 to #Mmax, and a reference page number #.
It is composed of management data including 2 to #Mmax and head position data # 1 to #Mmax, and Mmax pieces of compressed data.

【0252】ページ番号#1〜#Mmaxは、それぞれ、
圧縮データ#1〜#Mmaxが何ページ目のイメージデー
タに関する圧縮データであるかを示す情報である。基準
ページ番号#2〜#Mmaxは、それぞれ、圧縮データ#
2〜#Mmaxが通常圧縮データであるか差分圧縮データ
であるかを“0”であるか否かによって示す情報であ
る。また、基準ページ番号#2〜#Mmaxは、“0”で
ないときには、それぞれ、圧縮データ#2〜#Mmaxが
何ページ目のイメージデータを基準イメージとして作成
された圧縮データであるかを示す情報となっている。先
頭位置データ#1〜#Mmaxは、それぞれ、圧縮データ
#1〜#Mmaxの先頭位置を、圧縮ドキュメントファイ
ル36の先頭からの相対アドレスで表したデータであ
る。
The page numbers # 1 to #Mmax are respectively
This is information indicating which page of the compressed data # 1 to #Mmax is the compressed data related to the image data. The reference page numbers # 2 to #Mmax are the compressed data #
2 to #Mmax are information indicating whether the data is normal compressed data or differential compressed data by "0". When the reference page numbers # 2 to #Mmax are not “0”, the information indicating the page number of the compressed data # 2 to #Mmax is the compressed data created as the reference image, respectively. Has become. The start position data # 1 to #Mmax are data representing the start position of the compressed data # 1 to #Mmax, respectively, as a relative address from the start of the compressed document file 36.

【0253】上記のような管理データを備えることから
明らかなように、圧縮ドキュメントファイル36内の圧
縮データ#1は、ページ番号#1が示すページのイメー
ジデータの符号化により得られたデータとなっている。
また、“0”でない基準ページ番号#dを有する圧縮デ
ータ#dは、基準ページ番号#dが示すページのイメー
ジデータを基準イメージとして作成された、ページ番号
#dが示すページのイメージデータを復元できる差分圧
縮データとなっている。なお、差分圧縮データとして
は、圧縮ドキュメントファイル31〜35内の差分圧縮
データと全く同じ構成のものが用いられている。そし
て、基準ページ番号#dが“0”である圧縮データ#d
は、ページ番号#dが示すページのイメージデータの通
常圧縮データとなっている。
As is apparent from the provision of the management data as described above, the compressed data # 1 in the compressed document file 36 is data obtained by encoding the image data of the page indicated by the page number # 1. ing.
The compressed data #d having the reference page number #d that is not “0” restores the image data of the page indicated by the page number #d created using the image data of the page indicated by the reference page number #d as the reference image. It is possible to compress differential data. It should be noted that the differential compressed data has exactly the same configuration as the differential compressed data in the compressed document files 31 to 35. Then, the compressed data #d whose reference page number #d is “0”
Is the normal compressed data of the image data of the page indicated by the page number #d.

【0254】本実施形態に係るドキュメント圧縮/復元
装置において実行される圧縮処理は、第3実施形態に係
るドキュメント圧縮/復元装置において実行される圧縮
処理(図18〜20)と、圧縮データ選択処理の内容の
みが異なったものとなっている。このため、以下では、
圧縮データ選択処理を中心に、本ドキュメント圧縮/復
元装置における圧縮ドキュメントファイル36の作成手
順を説明することにする。
The compression processing executed by the document compression / decompression device according to the present embodiment includes a compression process (FIGS. 18 to 20) executed by the document compression / decompression device according to the third embodiment, and a compressed data selection process. Only the content of the is different. For this reason,
A procedure for creating the compressed document file 36 in the document compression / decompression apparatus will be described focusing on the compressed data selection processing.

【0255】図42、43に、第6実施形態に係るドキ
ュメント圧縮/復元装置で実行される圧縮データ選択処
理の流れ図を示す。図42に示したように、圧縮データ
選択処理時、制御部21は、まず、イメージ#1〜#M
maxを圧縮することにより、それぞれ、通常圧縮データ
#1〜#Mmaxを生成する(ステップS1801)。次い
で、制御部21は、得られているMmax×(Mmax−1)
個の差分圧縮データの中から、サイズが最も小さい差分
圧縮データを特定し、その基準ページ番号aと生成ペー
ジ番号bとを取得する(ステップS1801)。なお、
圧縮データ#x_yのサイズは、圧縮データ#y_xのサ
イズと等しいので、Mmax×(Mmax−1)個の圧縮デー
タの中には、サイズが最も小さい圧縮データが2n(n
は自然数)個存在する。このステップS1801では、
それら2n個の圧縮データの中の、基準ページ番号<生
成ページ番号が成立しているものが、a、bを取得する
ための圧縮データとして特定されている。さらに、その
ような圧縮データが複数個あった場合には、最も小さい
基準ページ番号を有するものが、a、bを取得するため
の圧縮データとして特定されている。
FIGS. 42 and 43 show flowcharts of compressed data selection processing executed by the document compression / decompression device according to the sixth embodiment. As shown in FIG. 42, at the time of the compressed data selection processing, the control unit 21 first sets the images # 1 to #M
By compressing max, normal compressed data # 1 to #Mmax are respectively generated (step S1801). Next, the control unit 21 obtains the obtained Mmax × (Mmax−1)
The difference compression data having the smallest size is specified from the difference compression data, and the reference page number a and the generated page number b are obtained (step S1801). In addition,
Since the size of the compressed data #x_y is equal to the size of the compressed data #y_x, among the Mmax × (Mmax−1) pieces of compressed data, 2n (n
Is a natural number). In this step S1801,
Out of the 2n pieces of compressed data, those satisfying the reference page number <the generated page number are specified as compressed data for acquiring a and b. Further, when there are a plurality of such compressed data, the one having the smallest reference page number is specified as the compressed data for acquiring a and b.

【0256】a、bの取得後、制御部21は、通常圧縮
データ#aを圧縮データ#1として用いることを記憶す
る(ステップS1803)。また、ページ番号#1がa
であることを記憶する(ステップS1804)。
After the acquisition of a and b, the control unit 21 stores that the normal compressed data #a is used as the compressed data # 1 (step S1803). Also, if the page number # 1 is a
Is stored (step S1804).

【0257】その後、制御部21は、差分圧縮データ#
a_bのサイズSa_bと、通常圧縮データ#bのサイズS
bとを比較する(ステップS1805)。そして、Sa_b
<Sbが成立していた場合(ステップS1805;YE
S)には、差分圧縮データ#a_bを圧縮データ#2と
して使用することを記憶する(ステップS1806)。
また、基準ページ番号#2、ページ番号#2を、それぞ
れ、a、bとすることを記憶する(ステップS180
7)。一方、Sa_b<Sbが成立していなかった場合(ス
テップS1805;NO)には、通常圧縮データ#bを
圧縮データ#2として使用することを記憶する(ステッ
プS1808)。また、基準ページ番号#2、ページ番
号#2を、それぞれ、0、bとすることを記憶する(ス
テップS1809)。
After that, the control unit 21 sets the differential compression data #
The size Sa_b of a_b and the size S of normal compressed data #b
b is compared (step S1805). And Sa_b
<If Sb is satisfied (Step S1805; YE)
S) stores that the differential compressed data #a_b is used as the compressed data # 2 (step S1806).
Further, it is stored that the reference page number # 2 and the page number # 2 are a and b, respectively (step S180).
7). On the other hand, when Sa_b <Sb is not satisfied (step S1805; NO), the fact that the normal compressed data #b is used as the compressed data # 2 is stored (step S1808). Further, it stores that the reference page number # 2 and the page number # 2 are 0 and b, respectively (step S1809).

【0258】ステップS1807或いはS1809にお
いて基準ページ番号#2並びにページ番号#2を決定し
た後、制御部21は、変数mに“3”を設定する(図4
3:ステップS1811)。そして、基準ページ番号が
ページ番号#1〜#m−1のいずれかであり、生成ペー
ジ番号がページ番号#1〜#m−1のいずれでもない差
分圧縮データの中から、サイズが最小の差分圧縮データ
#x_yを特定する(ステップS1807)。なお、最
小サイズの圧縮データが複数個存在した場合、制御部2
1は、以下の手順で1つの圧縮データを特定する。複数
個の最小サイズの圧縮データの中に、基準ページ番号が
ページ番号#1となっているものがあった場合には、そ
の圧縮データを最小サイズの圧縮データとして特定す
る。基準ページ番号がページ番号#1となっているもの
がない場合には、復元に必要とされる圧縮データ数(詳
細は後述)が最も少ない圧縮データ(複数個、存在する
場合にはそれらのいずれか)を最小サイズの圧縮データ
として特定する。
After determining reference page number # 2 and page number # 2 in step S1807 or S1809, control unit 21 sets variable m to "3" (FIG. 4).
3: Step S1811). The difference compressed data having the smallest size is selected from the differential compressed data in which the reference page number is any of page numbers # 1 to # m-1 and the generated page number is not any of page numbers # 1 to # m-1. The compressed data #x_y is specified (step S1807). If there are a plurality of compressed data of the minimum size, the control unit 2
1 specifies one piece of compressed data in the following procedure. When the reference page number is page number # 1 among a plurality of minimum-size compressed data, the compressed data is specified as the minimum-size compressed data. When there is no reference page number of page number # 1, the number of compressed data required for restoration (details will be described later) is the smallest (a plurality of compressed data, if any, any of them). ) Is specified as the minimum size compressed data.

【0259】その後、制御部21は、差分圧縮データ#
x_yのサイズSx_yと、通常圧縮データ#yのサイズS
yとを比較する(ステップS1813)。Sx_y<Syが成
立していた場合(ステップS1813;YES)には、
差分圧縮データ#x_yを圧縮データ#mとして使用す
ることを記憶する(ステップS1814)。また、基準
ページ番号#2、ページ番号#2を、それぞれ、x、y
とすることを記憶する(ステップS1815)。一方、
Sx_y<Syが成立していなかった場合(ステップS18
13;NO)には、通常圧縮データ#yを圧縮データ#
mとして使用することを記憶する(ステップS181
6)。また、基準ページ番号#2、ページ番号#2を、
それぞれ、0、yとすることを記憶する(ステップS1
817)。
Thereafter, the control unit 21 sets the differential compression data #
x_y size Sx_y and normal compressed data #y size S
y is compared (step S1813). If Sx_y <Sy holds (step S1813; YES),
The fact that the difference compressed data #x_y is used as the compressed data #m is stored (step S1814). Further, the reference page number # 2 and the page number # 2 are respectively represented by x and y.
Is stored (step S1815). on the other hand,
If Sx_y <Sy is not satisfied (step S18)
13; NO), the normal compressed data #y is
m is stored (step S181).
6). Also, the reference page number # 2 and the page number # 2 are
It stores that they are 0 and y, respectively (step S1).
817).

【0260】ステップS1815或いはS1817にお
いて基準ページ番号#m並びにページ番号#mを決定し
た後、制御部21は、m<Mmaxが成立しているか否か
を判断(ステップS1818)し、成立していた場合
(ステップS1818;YES)には、mに“1”を加
算する(ステップS1819)。そして、変更したmに
対して、ステップS1812からの処理を再び実行す
る。
After determining the reference page number #m and the page number #m in step S1815 or S1817, the control unit 21 determines whether or not m <Mmax is satisfied (step S1818). In this case (step S1818; YES), “1” is added to m (step S1819). Then, the processing from step S1812 is executed again on the changed m.

【0261】制御部21は、このような処理を繰り返し
ていき、m<Mmaxが成立しなくなったとき(ステップ
S1818;NO)に、それまでの処理で得た各種の情
報を用いて、圧縮ドキュメントファイル36を作成する
(ステップS1820)。そして、圧縮データ選択処理
並びに圧縮処理を終了する。
The control section 21 repeats such processing, and when m <Mmax is not satisfied (step S1818; NO), the control section 21 uses various information obtained in the processing up to that point to generate a compressed document. The file 36 is created (step S1820). Then, the compressed data selection process and the compression process are completed.

【0262】以下、図44及び図45を用いて、第6実
施形態に係るドキュメント圧縮/復元装置における圧縮
ドキュメントファイル36の復元手順を説明する。な
お、図44に、第6実施形態に係るドキュメント圧縮/
復元装置で実行される復元処理の流れ図であり、図45
は、復元処理時に実行される基準イメージ作成処理の流
れ図である。
Hereinafter, the procedure for restoring the compressed document file 36 in the document compression / decompression apparatus according to the sixth embodiment will be described with reference to FIGS. 44 and 45. FIG. 44 shows a document compression / data compression process according to the sixth embodiment.
FIG. 45 is a flowchart of a restoration process executed by the restoration device, and FIG.
9 is a flowchart of a reference image creation process executed at the time of a restoration process.

【0263】図44に示したように、復元処理時、制御
部21は、まず、操作者から復元処理条件を取得する
(ステップS1901)。このステップは、ステップS
301、S601等と同じものである。
As shown in FIG. 44, at the time of restoration processing, the control unit 21 first acquires restoration processing conditions from the operator (step S1901). This step includes step S
301, S601 and the like.

【0264】その後、制御部21は、復元が指示された
圧縮ドキュメントファイル36に含まれている管理デー
タ(圧縮データ数Mmaxと、ページ番号#1〜#Mmax、
基準ページ番号#2〜#Mmax、先頭位置データ#1〜
#Mmax)を取得する(ステップS1902)。また、図
示は省略したが、制御部21は、このステップS190
2の直後に、Mmax<Peであるか否か、Ps>Mmaxであ
るか否かを判断する。そして、Mmax<Peであった場合
には、PeにMmaxを設定してから、ステップS1903
を開始する。また、Ps>Mmaxであった場合には、復元
処理を終了する。
Thereafter, the control unit 21 determines whether the management data (the number of compressed data Mmax, the page numbers # 1 to #Mmax,
Reference page numbers # 2 to #Mmax, start position data # 1
#Mmax) (step S1902). Although not shown, the control unit 21 determines in step S190
Immediately after Step 2, it is determined whether or not Mmax <Pe, and whether or not Ps> Mmax. When Mmax <Pe, Pe is set to Mmax, and then step S1903 is performed.
To start. If Ps> Mmax, the restoration process ends.

【0265】ステップS1903において、制御部21
は、変数PにPsを設定する。その後、制御部21は、
変数Mに、第Pページ圧縮データ番号(ページ番号がP
である圧縮データの圧縮データ番号)を設定する(ステ
ップS1904)。すなわち、ページ番号#m=Pであ
るmを求め、求めたmをMに設定する。その後、制御部
21は、イメージ#Mが復元済みである(イメージ#M
がRAM22上に存在する)か否かを判断する(ステッ
プS1905)。
At step S1903, control unit 21
Sets Ps to the variable P. After that, the control unit 21
In the variable M, the P-th page compressed data number (the page number is P
Is set (compressed data number of the compressed data) (step S1904). That is, m with page number # m = P is determined, and the determined m is set to M. Thereafter, the control unit 21 determines that the image #M has been restored (image #M
Is determined on the RAM 22) (step S1905).

【0266】イメージ#Mが復元済みであった場合(ス
テップS1905;YES)、制御部21は、ステップ
S1911に進み、第Pページのイメージデータである
RAM上のイメージ#Mを、出力先指定情報で指定され
ている出力先に出力する。一方、イメージ#Mが復元済
みでなかった場合(ステップS1905;YES)、制
御部21は、基準データ番号#M(図では、R)が
“0”であるか否かを判断する(ステップS190
6)。
If the image #M has been restored (step S1905; YES), the control unit 21 proceeds to step S1911, and stores the image #M on the RAM, which is the image data of the Pth page, in the output destination designation information. Output to the output destination specified by. On the other hand, if the image #M is not already restored (step S1905; YES), the control unit 21, (in the figure, R M) reference data number #M determines whether or not "0" (step S190
6).

【0267】そして、基準データ番号#Mが“0”であ
った場合(ステップS1906;YES)には、通常圧
縮データである圧縮データ#Mを伸張することにより、
イメージ#MをRAM22上に生成する(ステップS1
907)。そして、ステップS1911に進み、そのイ
メージ#Mの出力を行う。
If the reference data number #M is "0" (step S1906; YES), the compressed data #M which is normally compressed data is expanded,
Image #M is generated on RAM 22 (step S1)
907). Then, the process proceeds to step S1911 to output the image #M.

【0268】基準データ番号#Mが“0”でなかった場
合(ステップS1906;NO)、イメージ#Mを復元
するために必要とされる基準イメージをRAM22上に
用意するための処理である基準イメージ作成処理(ステ
ップS1908)を開始する。
If the reference data number #M is not "0" (step S1906; NO), a reference image which is a process for preparing a reference image required for restoring the image #M on the RAM 22 is prepared. The creation process (step S1908) is started.

【0269】図45に示したように、基準イメージ作成
処理時、制御部21は、まず、変数jに“0”を、配列
変数m(j)に第Rページ圧縮データ番号(ページ番
号が基準ページ番号#Mと一致している圧縮データ番
号)を設定する(ステップS2001)。次いで、イメ
ージ#m(j)が復元済みであるか否かを判断する(ス
テップS2002)。
[0269] As shown in FIG. 45, when the reference image creation process, the control unit 21, first, the "0" to the variable j, the R M page compression data number in the array variable m (j) (page number A compressed data number matching the reference page number #M is set (step S2001). Next, it is determined whether or not the image #m (j) has been restored (step S2002).

【0270】イメージ#m(j)が復元済みでなかった
場合(ステップS2002;NO)、制御部21は、基
準ページ番号#m(j)が“0”であるか否かを判断す
る(ステップS2003)。そして、基準ページ番号#
m(j)が“0”であった場合(ステップS2003;
YES)には、通常圧縮データである圧縮データ#m
(j)を伸張することによって、イメージ#m(j)を
RAM22上に作成する(ステップS2004)。
If image #m (j) has not been restored (step S2002; NO), control unit 21 determines whether reference page number #m (j) is "0" (step S2002). S2003). And reference page number #
When m (j) is “0” (Step S2003;
YES), the compressed data #m which is the normal compressed data
An image #m (j) is created on the RAM 22 by expanding (j) (step S2004).

【0271】基準ページ番号#m(j)が“0”でなか
った場合(ステップS2003;NO)、制御部21
は、jに“1”を加算する(ステップS2005)。そ
して、rを基準ページ番号#m(j−1)としたとき
の、第rページ圧縮データ番号を配列変数m(j)に設
定する(ステップS2006)。その後、ステップS2
002に戻り、新たなj値に対して上記した処理を実行
する。
If the reference page number #m (j) is not “0” (step S2003; NO), the control unit 21
Adds “1” to j (step S2005). Then, when r is the reference page number #m (j-1), the r-th page compressed data number is set to the array variable m (j) (step S2006). Then, step S2
Returning to 002, the above-described processing is executed for a new j value.

【0272】そして、イメージ#m(j)が復元済みで
あった場合(ステップS2002;YES)、制御部2
1は、ステップS2011に進み、j=0であるか否か
を判断する。
If image #m (j) has been restored (step S2002; YES), control unit 2
The process advances to step S2011 to determine whether or not j = 0.

【0273】j=0でなかった場合(ステップS201
1;NO)、制御部21は、イメージ#m(j)のコピ
ーを基準イメージとして生成(ステップS2012)
し、差分圧縮データ復元処理(ステップS2013)を
実行する。このステップで行われる差分圧縮データ復元
処理は、Mの代わりにm(j−1)が使用される点を除
けば、図14を用いて説明した差分圧縮データ復元処理
と同じものである。すなわち、ステップS2013で
は、圧縮データ#m(j−1)に応じて、基準イメージ
の一部が書き換えられることにより、イメージ#m(j
−1)が生成される。
If j = 0 is not satisfied (step S201)
1; NO), the control unit 21 generates a copy of the image #m (j) as a reference image (step S2012).
Then, the differential compressed data restoration processing (step S2013) is executed. The differential compressed data restoration processing performed in this step is the same as the differential compressed data restoration processing described with reference to FIG. 14 except that m (j−1) is used instead of M. That is, in step S2013, a part of the reference image is rewritten in accordance with the compressed data #m (j-1), so that the image #m (j
-1) is generated.

【0274】この後、制御部21は、jの値を“1”減
らす処理(ステップS2014)を行った後、値を変更
したjに対して、ステップS2011からの処理を再び
実行する。そして、j=0が成立したとき(ステップS
2011;YES)に、基準イメージ作成処理を終了す
る。
Thereafter, the control unit 21 performs the process of reducing the value of j by “1” (step S2014), and then executes the process from step S2011 again on j whose value has been changed. Then, when j = 0 holds (step S
2011; YES), the reference image creation processing ends.

【0275】図44に戻って、復元処理の説明を続け
る。基準イメージ作成処理(ステップS1908)の実
行後、制御部21は、基準イメージ作成処理で作成され
た(あるいは既に存在していた)イメージ#m(0)の
コピーを基準イメージとして生成する(ステップS19
09)。そして、差分圧縮データ作成処理(ステップS
1910)を実行する。このステップで行われる差分圧
縮データ作成処理は、図14を用いて説明したものと全
く同じものである。すなわち、ステップS1910で
は、基準イメージが、圧縮データ#Mに基づき書き換え
られ、第Pページのイメージデータであるイメージ#M
が作成される。
Returning to FIG. 44, description of the restoration processing will be continued. After executing the reference image creation processing (step S1908), the control unit 21 generates a copy of the image #m (0) created (or already existing) created by the reference image creation processing as a reference image (step S19).
09). Then, the differential compressed data creation processing (step S
1910). The differential compressed data creation processing performed in this step is exactly the same as that described with reference to FIG. That is, in step S1910, the reference image is rewritten based on the compressed data #M, and the image #M which is the image data of the P-th page is rewritten.
Is created.

【0276】その後、制御部21は、RAM22上のイ
メージ#Mを、指定されている出力先に出力する(ステ
ップS1911)。次いで、Pに“1”を加算(ステッ
プS1911)し、PがPeを超えていなかった場合
(ステップS1912;NO)には、ステップS190
5に戻り、値を変更したPに対して上述した処理を再度
実行する。そして、P=Pe+1となったとき(ステッ
プS1912;YES)に、不要となったイメージデー
タを破棄(図示せず)して、復元処理を終了する。
After that, the control section 21 outputs the image #M on the RAM 22 to the designated output destination (step S1911). Next, “1” is added to P (step S1911), and if P has not exceeded Pe (step S1912; NO), step S190 is performed.
Returning to 5, the above-mentioned processing is executed again for P whose value has been changed. Then, when P = Pe + 1 (step S1912; YES), the unnecessary image data is discarded (not shown), and the restoration processing ends.

【0277】以上、説明したように、第6実施形態に係
るドキュメント圧縮/復元装置では、Nページのドキュ
メントに対して、第1〜第Nページ用の圧縮データを含
む圧縮ドキュメントファイルであって、少なくとも1つ
の通常圧縮データを含み、通常圧縮データよりもサイズ
が小さい差分圧縮データが作成できるページに関して
は、差分圧縮データが用いられた圧縮ドキュメントファ
イルが作成される。
As described above, in the document compression / decompression device according to the sixth embodiment, a compressed document file containing compressed data for the first to N-th pages is provided for the N-page document. For a page including at least one piece of normal compressed data and capable of creating differential compressed data smaller in size than the normal compressed data, a compressed document file using the differential compressed data is created.

【0278】従って、本ドキュメント圧縮/復元装置を
用いれば、処理対象とされたドキュメントがどのような
ものであっても、少なくとも従来と同等の圧縮率でその
ドキュメントを圧縮できることになる。そして、各ペー
ジが共通した部分を多く有するドキュメントに対して
は、上記した各実施形態のドキュメント圧縮/復元装置
並びに従来の同種の装置よりも高い圧縮率でそのドキュ
メントを圧縮できることになる。
Therefore, if the document compression / decompression device is used, whatever document is processed, the document can be compressed at least at the same compression ratio as the conventional one. Then, for a document having many common portions on each page, the document can be compressed at a higher compression ratio than the document compression / decompression device of each of the above-described embodiments and the same type of conventional device.

【0279】<第7実施形態>第7実施形態に係るドキ
ュメント圧縮/復元装置は、第1実施形態に係るドキュ
メント圧縮/復元装置を変形したものである。
<Seventh Embodiment> A document compression / decompression device according to a seventh embodiment is a modification of the document compression / decompression device according to the first embodiment.

【0280】図46に、第7実施形態に係るドキュメン
ト圧縮/復元装置によって作成される圧縮ドキュメント
ファイル37の構成を示す。図から明らかなように、圧
縮ドキュメントファイル37は、要素データ数Nmax
と、それぞれ、置換開始位置データと置換数データと置
換データとからなるNmax個の要素データとで構成され
た差分圧縮データが用いられたものとなっている。
FIG. 46 shows the structure of a compressed document file 37 created by the document compression / decompression device according to the seventh embodiment. As is apparent from the figure, the compressed document file 37 has the element data number Nmax.
, And Nmax pieces of element data including replacement start position data, replacement number data, and replacement data, respectively.

【0281】以下、本ドキュメント圧縮/復元装置の圧
縮/復元動作を説明することによって、要素データを構
成している各データの意味を説明する。なお、本ドキュ
メント圧縮/復元装置の全体的な動作は、第1実施形態
に係るドキュメント圧縮/復元装置と同じものであるの
で、以下では、動作が異なっている部分を中心に本ドキ
ュメント圧縮/復元装置の説明を行うことにする。
Hereinafter, the meaning of each data constituting the element data will be described by describing the compression / decompression operation of the document compression / decompression apparatus. Note that the overall operation of the document compression / decompression device is the same as that of the document compression / decompression device according to the first embodiment. The device will be described.

【0282】図47、48に、本ドキュメント圧縮/復
元装置で実行される差分圧縮データ作成処理の流れ図を
示す。
FIGS. 47 and 48 show flowcharts of differential compressed data creation processing executed by the document compression / decompression apparatus.

【0283】図47に示したように、差分圧縮データ作
成処理時、制御部21は、kに“1”を、iに“0”
を、Lに“0”を設定する(ステップS2101)。そ
して、イメージ#Mの単位データ#k(以下、Dとも表
記する)と基準イメージの単位データ#kとを比較する
(ステップS2102)。
As shown in FIG. 47, at the time of the differential compressed data creation processing, the control unit 21 sets “1” to k and “0” to i.
Is set to “0” for L (step S2101). Then, the unit data #k of the image #M (hereinafter also referred to as D) is compared with the unit data #k of the reference image (step S2102).

【0284】両者が一致していた場合(ステップS21
03;YES)、制御部21は、kに“1”を加算する
(ステップS2110)。そして、kがkmax以下であ
るか否かを判断し、kがkmax以下であった場合(ステ
ップS2111;YES)には、ステップS2102か
らの処理を再度実行する。
If the two match (step S21)
03; YES), the control unit 21 adds “1” to k (step S2110). Then, it is determined whether or not k is equal to or smaller than kmax. If k is equal to or smaller than kmax (step S2111; YES), the processing from step S2102 is executed again.

【0285】Dと基準イメージの単位データ#kとが一
致していなかった場合(ステップS2103;NO)、
制御部21は、Lが“0”であるか否かを判断する(ス
テップS2104)。Lが“0”であった場合(ステッ
プS2104;YES)、制御部21は、変数ksにk
の値を、Lに“1”を、変数DoldにDを、koldにkを
設定(ステップS2109)し、ステップS2110に
進む。
If D and unit data #k of the reference image do not match (step S2103; NO),
The control unit 21 determines whether or not L is “0” (Step S2104). When L is “0” (step S2104; YES), the control unit 21 sets k to the variable ks.
Is set to "1" for L, D for variable Dold, and k for kold (step S2109), and the flow advances to step S2110.

【0286】一方、Lが“0”でなかった場合(ステッ
プS2104;NO)、制御部21は、D=Dold及び
k=kold+1が成立してしているか否かを判断する
(ステップS2105)。そして、当該条件が成立して
いた場合(ステップS2105;YES)には、Lに
“1”を加算するとともに、koldにkを設定する(ス
テップS2106)。そして、ステップS2110に進
む。
On the other hand, if L is not "0" (step S2104; NO), the control unit 21 determines whether D = Dold and k = kold + 1 hold (step S2105). If the condition is satisfied (step S2105; YES), “1” is added to L and k is set to kold (step S2106). Then, the process proceeds to step S2110.

【0287】D=Dold、k=kold+1のいずれか(あ
るいは双方)が成立していなかった場合(ステップS2
105;NO)、制御部21は、変数iに“1”を加算
する(ステップS2107)。そして、その時点におけ
るks、L、Doldの値を、置換データ#iの各要素とし
て記憶する(ステップS2108)。そして、ステップ
S2109からの処理を実行する。
If either (or both) of D = Dold and k = kold + 1 do not hold (step S2
105; NO), the control unit 21 adds "1" to the variable i (step S2107). Then, the values of ks, L, and Dold at that time are stored as respective elements of the replacement data #i (step S2108). Then, the processing from step S2109 is executed.

【0288】制御部21は、このような処理を、イメー
ジ#M内の全ての単位データに関する処理が完了するま
で繰り返す。そして、全ての単位データに関する処理が
完了したとき(ステップS2111;NO)には、図4
8に示したあるように、L=0であるか否かを判断する
(ステップS2112)。L=0でなかった場合(ステ
ップS2112;NO)、制御部21は、iに“1”を
加算(ステップS2113)し、ks、L、Doldを、要
素データ#iの各要素(置換開始位置データ、置換数デ
ータ、置換データ)として記憶する(ステップS211
4)。そして、iの値を圧縮データ#Mの要素データ数
Mmaxとして記憶(ステップS2115)し、差分圧縮デ
ータ作成処理を終了する。一方、L=0であった場合
(ステップS2112;YES)、制御部21は、i値
の変更等を行うことなく、ステップS2115を実行
し、差分圧縮データ作成処理を終了する。
The control section 21 repeats such processing until the processing for all the unit data in the image #M is completed. Then, when the processing for all the unit data is completed (step S2111; NO), FIG.
As shown in FIG. 8, it is determined whether or not L = 0 (step S2112). If L = 0 is not satisfied (step S2112; NO), the control unit 21 adds “1” to i (step S2113), and replaces ks, L, and Dold with each element (replacement start position) of the element data #i. (Data, replacement number data, replacement data) (step S211).
4). Then, the value of i is stored as the number of element data Mmax of the compressed data #M (step S2115), and the differential compressed data creation processing ends. On the other hand, if L = 0 (step S2112; YES), the control unit 21 executes step S2115 without changing the i value or the like, and ends the differential compressed data creation processing.

【0289】なお、ステップS2112〜S2114の
処理は、イメージ#Mの最後の単位データが基準イメー
ジの対応する単位データと異なっていた場合に、その単
位データに関する要素データを差分圧縮データ中に含め
るために行われている。
The processing in steps S2112 to S2114 is performed to include element data relating to the last unit data of the image #M in the differential compressed data when the last unit data is different from the corresponding unit data of the reference image. It has been done.

【0290】すなわち、本実施形態に係るドキュメント
圧縮/復元装置における差分圧縮データ作成処理時に
は、イメージ#Mの、基準イメージと異なっている部分
の中から、同じ内容の連続した単位データで構成されて
いる部分が探索され、そのような各部分の先頭の要素デ
ータを表す情報(置換開始位置データks)と、当該部
分を構成する単位データの数(置換数データL)と、当
該部分を構成している単位データの内容(置換データ
D)とからなる要素データを含む差分圧縮データが作成
される。
That is, at the time of differential compressed data creation processing in the document compression / decompression device according to the present embodiment, the image #M is composed of continuous unit data having the same contents from portions different from the reference image. Is searched for, the information (replacement start position data ks) representing the head element data of each such part, the number of unit data constituting the part (replacement number data L), and the Difference compressed data including element data composed of the content of the unit data (replacement data D) is created.

【0291】そして、このようにして作成された差分圧
縮データが、図49に示した差分圧縮データ復元処理に
よって復元される。
The differential compressed data created in this manner is restored by the differential compressed data restoring process shown in FIG.

【0292】すなわち、制御部21は、まず、圧縮デー
タ#Mの要素データ数Nmaxを取得する(ステップS22
01)。次いで、要素データ番号を記憶するための変数
iに“1”を設定(ステップS2202)し、iの値が
Nmax以下であるか否かを判断する(ステップS220
3)。iの値がNmax以下であった場合(ステップS22
03;YES)、制御部21は、圧縮ドキュメントファ
イル37から、圧縮データ#Mの要素データ#i(置換
位置データks、置換数データL、置換データD)を取
得する(ステップS2204)。
That is, the control unit 21 first obtains the number Nmax of element data of the compressed data #M (step S22).
01). Next, "1" is set to a variable i for storing the element data number (step S2202), and it is determined whether or not the value of i is equal to or smaller than Nmax (step S220).
3). When the value of i is equal to or smaller than Nmax (step S22)
03; YES), the control unit 21 acquires the element data #i (replacement position data ks, replacement number data L, replacement data D) of the compressed data #M from the compressed document file 37 (step S2204).

【0293】その後、制御部21は、RAM22上に記
憶されている基準イメージの、ks示す位置で始まる連
続したL個の単位データを、それぞれ、置換データDに
変更する(ステップS2205)。その後、iに“1”
を加算(ステップS2206)してから、ステップS2
203に戻り、変更したiの値とNmaxとを比較する。
そして、i≦Nmaxが成立していた場合(ステップS2
203;YES)には、ステップS404〜S406の
処理を再度実行し、i≦Nmaxが成立していなかった場
合(ステップS2203;NO)、すなわち、圧縮デー
タ#Mの全ての要素データに対する処理が完了したとき
に、差分圧縮データ復元処理を終了する。
Thereafter, the control unit 21 changes the continuous L unit data starting from the position indicated by ks of the reference image stored in the RAM 22 to the replacement data D (step S2205). Then, i is "1"
Is added (Step S2206), and then Step S2
Returning to 203, the changed value of i is compared with Nmax.
If i ≦ Nmax is satisfied (step S2)
203; YES), the processing of steps S404 to S406 is executed again, and if i ≦ Nmax is not satisfied (step S2203; NO), that is, the processing for all the element data of the compressed data #M is completed Then, the differential compression data decompression process ends.

【0294】本実施形態に係るドキュメント圧縮/復元
装置によって作成される圧縮ドキュメントファイル37
内の一個の要素データのサイズは、連続数データが含ま
れている分だけ、圧縮ドキュメントファイル31内の要
素データのサイズよりも大きくなっている。しかしなが
ら、連続数データがq(≧2)であった場合、圧縮ドキ
ュメントファイル31においてはq個の要素データで表
される部分が、本圧縮ドキュメントファイル37におい
ては1個の要素データで表されることになる。従って、
イメージ#M中に、基準イメージと異なっている部分で
あって、同じ内容の連続した単位データで構成されてい
る部分が、ある程度以上の割合で含まれていた場合、圧
縮ドキュメントファイル37の方がサイズの小さなファ
イルとなる。そして、表計算ソフトで作成されたドキュ
メントや、請求書等の定型のドキュメントのイメージデ
ータには、通常、そのような部分が多く含まれている。
このため、本ドキュメント圧縮/復元装置を用いれば、
第1実施形態に係るドキュメント圧縮/復元装置よりも
高い圧縮率でドキュメントを圧縮できることになる。
The compressed document file 37 created by the document compression / decompression device according to the present embodiment
The size of one of the element data is larger than the size of the element data in the compressed document file 31 by the amount including the continuous number data. However, when the continuous number data is q (≧ 2), the part represented by q element data in the compressed document file 31 is represented by one element data in the main compressed document file 37. Will be. Therefore,
If the image #M includes a portion different from the reference image and composed of continuous unit data having the same content at a certain ratio or more, the compressed document file 37 is It becomes a small file. The image data of a document created by spreadsheet software or a standard document such as an invoice usually includes many such portions.
Therefore, if this document compression / decompression device is used,
The document can be compressed at a higher compression ratio than the document compression / decompression device according to the first embodiment.

【0295】<変形形態>各実施形態のドキュメント圧
縮/復元装置は各種の変形を行うことができる。例え
ば、第7実施形態のドキュメント圧縮/復元装置で用い
られている構成の差分圧縮データが用いられるように、
第2〜第6実施形態のドキュメント圧縮/復元装置を変
形することができる。また、第5、第6実施形態に係る
ドキュメント圧縮/復元装置で使用されている技術(差
分圧縮データを用いることが適当でないページに通常圧
縮データを用いること)を、第2、第3実施形態に係る
ドキュメント圧縮/復元装置に適用することもできる。
<Modifications> The document compression / decompression device of each embodiment can perform various modifications. For example, as the differential compressed data having the configuration used in the document compression / decompression device of the seventh embodiment is used,
The document compression / decompression devices of the second to sixth embodiments can be modified. In addition, the technique used in the document compression / decompression apparatus according to the fifth and sixth embodiments (usually using compressed data for a page where it is not appropriate to use differential compressed data) is described in the second and third embodiments. Can be applied to the document compression / decompression device according to.

【0296】また、各実施形態のドキュメント圧縮/復
元装置は、圧縮結果として1つのファイルを作成するも
のであったが、ページ毎にファイルが作成されるように
装置を構成しても良い。さらに、各実施形態のドキュメ
ント圧縮/復元装置は、通常圧縮データを作成するため
にランレングス符号化が用いられた装置であったが、他
の符号化手順により通常圧縮データが作成されるように
してもよいことは当然である。
Further, the document compression / decompression device of each embodiment creates one file as a compression result, but the device may be configured so that a file is created for each page. Further, the document compression / decompression device of each embodiment is a device in which run-length encoding is used to create normal compressed data. However, the normal compression data is created by another encoding procedure. Of course, it may be.

【0297】また、各実施形態のドキュメント圧縮/復
元装置は、コンピュータに、所定のプログラムをインス
トールすることによって実現された装置であったが、上
記したような処理が行えるICを作製するといったこと
により、ドキュメント圧縮/復元装置を実現してもよ
い。また、印刷装置やファクシミリ装置や複合機の一機
能として、ドキュメント圧縮/復元装置を実現しても良
い。
Although the document compression / decompression device of each embodiment is realized by installing a predetermined program in a computer, the document compression / decompression device is manufactured by manufacturing an IC capable of performing the above-described processing. , A document compression / decompression device may be realized. Further, a document compression / decompression device may be realized as a function of a printing device, a facsimile device, or a multifunction peripheral.

【0298】[0298]

【発明の効果】本発明のドキュメント圧縮装置、ドキュ
メント圧縮方法によれば、複数ページのイメージデータ
からなるドキュメントを高い圧縮率で圧縮できる。ま
た、本発明のドキュメント復元装置、ドキュメント復元
方法によれば、本発明のドキュメント圧縮装置、ドキュ
メント圧縮方法によって得られた圧縮データを復元する
ことができる。
According to the document compression apparatus and the document compression method of the present invention, a document composed of a plurality of pages of image data can be compressed at a high compression rate. Further, according to the document decompression device and the document decompression method of the present invention, it is possible to decompress the compressed data obtained by the document compression device and the document compression method of the present invention.

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

【図1】各実施形態に係るドキュメント圧縮/復元装置
のハードウェア構成を示したブロック図である。
FIG. 1 is a block diagram illustrating a hardware configuration of a document compression / decompression device according to each embodiment.

【図2】第1実施形態に係るドキュメント圧縮/復元装
置によって作成される圧縮ドキュメントファイルの説明
図である。
FIG. 2 is an explanatory diagram of a compressed document file created by the document compression / decompression device according to the first embodiment.

【図3】第1実施形態に係るドキュメント圧縮/復元装
置において実行される圧縮処理の流れ図である。
FIG. 3 is a flowchart of a compression process executed in the document compression / decompression device according to the first embodiment.

【図4】第1実施形態に係るドキュメント圧縮/復元装
置において実行される差分圧縮データ作成処理の流れ図
である。
FIG. 4 is a flowchart of differential compressed data creation processing executed in the document compression / decompression device according to the first embodiment.

【図5】第1実施形態に係るドキュメント圧縮/復元装
置において実行される圧縮処理の説明図である。
FIG. 5 is an explanatory diagram of a compression process performed in the document compression / decompression device according to the first embodiment.

【図6】第1実施形態に係るドキュメント圧縮/復元装
置において実行される復元処理の流れ図である。
FIG. 6 is a flowchart of a decompression process executed in the document compression / decompression device according to the first embodiment.

【図7】第1実施形態に係るドキュメント圧縮/復元装
置において実行される差分圧縮データ復元処理の流れ図
である。
FIG. 7 is a flowchart of differential compressed data decompression processing executed in the document compression / decompression device according to the first embodiment.

【図8】第1実施形態に係るドキュメント圧縮/復元装
置において実行される復元処理の説明図である。
FIG. 8 is an explanatory diagram of a decompression process executed in the document compression / decompression device according to the first embodiment.

【図9】第1実施形態に係るドキュメント圧縮/復元装
置において実行される復元処理の説明図である。
FIG. 9 is an explanatory diagram of a decompression process executed in the document compression / decompression device according to the first embodiment.

【図10】第2実施形態に係るドキュメント圧縮/復元
装置によって作成される圧縮ドキュメントファイルの説
明図である。
FIG. 10 is an explanatory diagram of a compressed document file created by a document compression / decompression device according to a second embodiment.

【図11】第2実施形態に係るドキュメント圧縮/復元
装置において実行される圧縮処理の流れ図である。
FIG. 11 is a flowchart of a compression process executed in the document compression / decompression device according to the second embodiment.

【図12】第2実施形態に係るドキュメント圧縮/復元
装置において実行される圧縮処理の説明図である。
FIG. 12 is an explanatory diagram of a compression process performed in the document compression / decompression device according to the second embodiment.

【図13】第2実施形態に係るドキュメント圧縮/復元
装置において実行される復元処理の流れ図である。
FIG. 13 is a flowchart of a decompression process executed in the document compression / decompression device according to the second embodiment.

【図14】第2実施形態に係るドキュメント圧縮/復元
装置において実行される差分圧縮データ復元処理の流れ
図である。
FIG. 14 is a flowchart of differential compressed data decompression processing executed in the document compression / decompression device according to the second embodiment.

【図15】第2実施形態に係るドキュメント圧縮/復元
装置において実行される復元処理の説明図である。
FIG. 15 is an explanatory diagram of a decompression process executed in the document compression / decompression device according to the second embodiment.

【図16】第2実施形態に係るドキュメント圧縮/復元
装置において実行される復元処理の説明図である。
FIG. 16 is an explanatory diagram of a decompression process executed in the document compression / decompression device according to the second embodiment.

【図17】第3実施形態に係るドキュメント圧縮/復元
装置によって作成される圧縮ドキュメントファイルの説
明図である。
FIG. 17 is an explanatory diagram of a compressed document file created by the document compression / decompression device according to the third embodiment.

【図18】第3実施形態に係るドキュメント圧縮/復元
装置において実行される圧縮処理の流れ図である。
FIG. 18 is a flowchart of a compression process performed in the document compression / decompression device according to the third embodiment.

【図19】第3実施形態に係るドキュメント圧縮/復元
装置において実行される差分圧縮データ作成処理の説明
図である。
FIG. 19 is an explanatory diagram of differential compressed data creation processing executed in the document compression / decompression device according to the third embodiment.

【図20】第3実施形態に係るドキュメント圧縮/復元
装置において実行される圧縮データ選択処理の流れ図で
ある。
FIG. 20 is a flowchart of compressed data selection processing executed in the document compression / decompression device according to the third embodiment.

【図21】第3実施形態に係るドキュメント圧縮/復元
装置において実行される圧縮処理を説明するための図で
ある。
FIG. 21 is a diagram illustrating a compression process performed in the document compression / decompression device according to the third embodiment.

【図22】第3実施形態に係るドキュメント圧縮/復元
装置において作成される圧縮ドキュメントファイルの一
例を示した図である。
FIG. 22 is a diagram showing an example of a compressed document file created by the document compression / decompression device according to the third embodiment.

【図23】第3実施形態に係るドキュメント圧縮/復元
装置において実行される復元処理の説明図である。
FIG. 23 is an explanatory diagram of a decompression process executed in the document compression / decompression device according to the third embodiment.

【図24】第4実施形態に係るドキュメント圧縮/復元
装置によって作成される圧縮ドキュメントファイルの説
明図である。
FIG. 24 is an explanatory diagram of a compressed document file created by the document compression / decompression device according to the fourth embodiment.

【図25】第4実施形態に係るドキュメント圧縮/復元
装置において実行される圧縮データ選択処理の流れ図で
ある。
FIG. 25 is a flowchart of a compressed data selection process executed in the document compression / decompression device according to the fourth embodiment.

【図26】第4実施形態に係るドキュメント圧縮/復元
装置において実行される圧縮処理を説明するための図で
ある。
FIG. 26 is a diagram illustrating a compression process performed in the document compression / decompression device according to the fourth embodiment.

【図27】第4実施形態に係るドキュメント圧縮/復元
装置において実行される圧縮処理を説明するための図で
ある。
FIG. 27 is a diagram illustrating a compression process performed in the document compression / decompression device according to the fourth embodiment.

【図28】第4実施形態に係るドキュメント圧縮/復元
装置において実行される圧縮処理を説明するための図で
ある。
FIG. 28 is a diagram illustrating a compression process performed by the document compression / decompression device according to the fourth embodiment.

【図29】第4実施形態に係るドキュメント圧縮/復元
装置において実行される圧縮処理を説明するための図で
ある。
FIG. 29 is a diagram illustrating a compression process performed in the document compression / decompression device according to the fourth embodiment.

【図30】第4実施形態に係るドキュメント圧縮/復元
装置において作成される圧縮ドキュメントファイルの一
例を示した図である。
FIG. 30 is a diagram showing an example of a compressed document file created by the document compression / decompression device according to the fourth embodiment.

【図31】第4実施形態に係るドキュメント圧縮/復元
装置において実行される復元処理の説明図である。
FIG. 31 is an explanatory diagram of a decompression process performed in the document compression / decompression device according to the fourth embodiment.

【図32】第4実施形態に係るドキュメント圧縮/復元
装置において実行される基準イメージ作成処理の説明図
である。
FIG. 32 is an explanatory diagram of a reference image creation process executed in the document compression / decompression device according to the fourth embodiment.

【図33】第4実施形態に係るドキュメント圧縮/復元
装置において実行される復元処理を説明するための図で
ある。
FIG. 33 is a view for explaining a decompression process executed in the document compression / decompression device according to the fourth embodiment.

【図34】第4実施形態に係るドキュメント圧縮/復元
装置において実行される復元処理を説明するための図で
ある。
FIG. 34 is a diagram for explaining a decompression process performed in the document compression / decompression device according to the fourth embodiment.

【図35】第4実施形態に係るドキュメント圧縮/復元
装置において実行される復元処理を説明するための図で
ある。
FIG. 35 is a diagram illustrating a decompression process performed by the document compression / decompression device according to the fourth embodiment.

【図36】本発明の第5実施形態に係るドキュメント圧
縮/復元装置によって作成される圧縮ドキュメントファ
イルの説明図である。
FIG. 36 is an explanatory diagram of a compressed document file created by the document compression / decompression device according to the fifth embodiment of the present invention.

【図37】第5実施形態に係るドキュメント圧縮/復元
装置において実行される圧縮処理の流れ図である。
FIG. 37 is a flowchart of a compression process executed in the document compression / decompression device according to the fifth embodiment.

【図38】第5実施形態に係るドキュメント圧縮/復元
装置において実行される圧縮データ作成処理の流れ図で
ある。
FIG. 38 is a flowchart of compressed data creation processing executed in the document compression / decompression device according to the fifth embodiment.

【図39】第5実施形態に係るドキュメント圧縮/復元
装置において実行される復元処理の流れ図である。
FIG. 39 is a flowchart of a decompression process executed in the document compression / decompression device according to the fifth embodiment.

【図40】第5実施形態に係るドキュメント圧縮/復元
装置において実行される復元処理の、図39に続く流れ
図である。
FIG. 40 is a flowchart following FIG. 39 of the decompression processing executed in the document compression / decompression device according to the fifth embodiment.

【図41】第6実施形態に係るドキュメント圧縮/復元
装置によって作成される圧縮ドキュメントファイルの構
成図である。
FIG. 41 is a configuration diagram of a compressed document file created by a document compression / decompression device according to a sixth embodiment.

【図42】第6実施形態に係るドキュメント圧縮/復元
装置において実行される圧縮データ選択処理の流れ図で
ある。
FIG. 42 is a flowchart of compressed data selection processing executed in the document compression / decompression device according to the sixth embodiment.

【図43】第6実施形態に係るドキュメント圧縮/復元
装置において実行される圧縮データ選択処理の、図42
に続く流れ図である。
FIG. 43 shows a compressed data selection process executed in the document compression / decompression device according to the sixth embodiment;
FIG.

【図44】第6実施形態に係るドキュメント圧縮/復元
装置において実行される復元処理の流れ図である。
FIG. 44 is a flowchart of a decompression process executed in the document compression / decompression device according to the sixth embodiment.

【図45】第6実施形態に係るドキュメント圧縮/復元
装置において実行される基準イメージ作成処理の流れ図
である。
FIG. 45 is a flowchart of a reference image creation process executed in the document compression / decompression device according to the sixth embodiment.

【図46】第7実施形態に係るドキュメント圧縮/復元
装置によって作成される圧縮ドキュメントファイルの構
成図である。
FIG. 46 is a configuration diagram of a compressed document file created by the document compression / decompression device according to the seventh embodiment.

【図47】第7実施形態に係るドキュメント圧縮/復元
装置において実行される差分圧縮データ作成処理の流れ
図である。
FIG. 47 is a flowchart of differential compressed data creation processing executed in the document compression / decompression device according to the seventh embodiment.

【図48】第7実施形態に係るドキュメント圧縮/復元
装置において実行される差分圧縮データ作成処理の、図
47に続く流れ図である。
FIG. 48 is a flowchart following FIG. 47 of differential compressed data creation processing executed in the document compression / decompression device according to the seventh embodiment.

【図49】第7実施形態に係るドキュメント圧縮/復元
装置において実行される差分圧縮データ復元処理の流れ
図である。
FIG. 49 is a flowchart of differential compressed data decompression processing executed in the document compression / decompression device according to the seventh embodiment.

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

11 ディスプレイ 12 入力装置 13 印刷装置 14 制御装置 15 CD−ROM 21 制御部 22 RAM 23 HDD 24 通信制御部 25 ディスプレイ制御回路 26 インタフェース回路 28 CD−ROM 29 バス 31〜37 圧縮ドキュメントファイル Reference Signs List 11 display 12 input device 13 printing device 14 control device 15 CD-ROM 21 control unit 22 RAM 23 HDD 24 communication control unit 25 display control circuit 26 interface circuit 28 CD-ROM 29 bus 31-37 compressed document file

Claims (36)

【特許請求の範囲】[Claims] 【請求項1】 第1ないし第Nページからなるドキュメ
ントに基づき、そのドキュメントの第1ないし第Nペー
ジのイメージデータを復元できる圧縮ドキュメントデー
タを作成するためのドキュメント圧縮装置であって、 前記ドキュメントの第1ページのイメージデータを符号
化することにより、第1ページに関する通常圧縮データ
を作成する通常圧縮データ作成手段と、 それぞれ、前記ドキュメントの第2ないし第Nページの
イメージデータを生成イメージデータとし、かつ、直前
のページのイメージデータを基準イメージデータとした
N−1個の差分圧縮データであって、前記基準イメージ
データと異なっている前記生成イメージデータの部分の
位置及び内容を示すN−1個の差分圧縮データを作成す
る差分圧縮データ作成手段と、 前記通常圧縮データ作成手段によって作成された通常圧
縮データと、前記差分圧縮データ作成手段によって作成
されたN−1個の差分圧縮データと、各通常圧縮データ
及び差分圧縮データが前記ドキュメントのいずれのペー
ジに関するものであるかを示す情報とを含む圧縮ドキュ
メントデータを作成する圧縮ドキュメントデータ作成手
段とを備えることを特徴とするドキュメント圧縮装置。
1. A document compression apparatus for generating compressed document data capable of restoring image data of the first to Nth pages of a document based on the document including the first to Nth pages, comprising: Normal compressed data generating means for generating normal compressed data relating to the first page by encoding the image data of the first page; and image data of the second to Nth pages of the document as generated image data, respectively. N-1 difference compressed data using the image data of the immediately preceding page as reference image data, and N-1 pieces of positions and contents of the portion of the generated image data different from the reference image data Differential compressed data creating means for creating differential compressed data of: The normal compressed data created by the normal compressed data creating means, the N-1 differential compressed data created by the differential compressed data creating means, and each of the normal compressed data and the differential compressed data relate to any page of the document. A compressed document data creating unit for creating compressed document data including information indicating whether the document is a document.
【請求項2】 第1ないし第Nページからなるドキュメ
ントに基づき、そのドキュメントの第1ないし第Nペー
ジのイメージデータを復元できる圧縮ドキュメントデー
タを作成するためのドキュメント圧縮装置であって、 前記ドキュメントの第1ページのイメージデータを符号
化することにより、第1ページに関する通常圧縮データ
を作成する通常圧縮データ作成手段と、 それぞれ、前記ドキュメントの第2ないし第Nページの
イメージデータを生成イメージデータとし、かつ、第1
ページのイメージデータを基準イメージデータとしたN
−1個の差分圧縮データであって、前記基準イメージデ
ータと異なっている前記生成イメージデータの部分の位
置及び内容を示すN−1個の差分圧縮データを作成する
差分圧縮データ作成手段と、 前記通常圧縮データ作成手段によって作成された通常圧
縮データと、前記差分圧縮データ作成手段によって作成
されたN−1個の差分圧縮データと、それらの通常圧縮
データ及び差分圧縮データが前記ドキュメントのいずれ
のページに関するものであるかを示す情報とを含む圧縮
ドキュメントデータを作成する圧縮ドキュメントデータ
作成手段とを備えることを特徴とするドキュメント圧縮
装置。
2. A document compression apparatus for creating, based on a document including first to Nth pages, compressed document data capable of restoring image data of the first to Nth pages of the document, the document compression apparatus comprising: Normal compressed data generating means for generating normal compressed data relating to the first page by encoding the image data of the first page; and image data of the second to Nth pages of the document as generated image data, respectively. And the first
N using page image data as reference image data
Differential compressed data creating means for creating (N-1) differential compressed data that is -1 differential compressed data and indicates a position and a content of a portion of the generated image data that is different from the reference image data; The normal compressed data created by the normal compressed data creating means, the N-1 differential compressed data created by the differential compressed data creating means, and the normal compressed data and the differential compressed data are stored in any page of the document. And a compressed document data creating unit for creating compressed document data including information indicating whether the document is compressed.
【請求項3】 第1ないし第Nページからなるドキュメ
ントに基づき、そのドキュメントの第1ないし第Nペー
ジのイメージデータを復元できる圧縮ドキュメントデー
タを作成するためのドキュメント圧縮装置であって、 前記ドキュメントの、あるページのイメージデータを生
成イメージデータとし、かつ、それとは異なるページの
イメージデータを基準イメージデータとした差分圧縮デ
ータであって、前記基準イメージデータと異なっている
前記生成イメージデータの部分の位置及び内容を示す差
分圧縮データを、前記ドキュメントに含まれる全ての2
ページの組み合わせについて作成する差分圧縮データ作
成手段と、 前記差分圧縮データ作成手段で作成されたN×(N−
1)個の差分圧縮データを、同じイメージデータが基準
イメージデータとして使用されているN−1個の差分圧
縮データからなるN個のグループに分類し、各グループ
に含まれるN−1個の差分圧縮データのサイズの合計を
算出する合計算出手段と、 この合計算出手段によって算出された合計が最も小さい
グループ内の差分圧縮データの作成時に基準イメージデ
ータとして使用されているイメージデータを符号化する
ことにより、そのイメージデータが表しているページに
関する通常圧縮データを作成する通常圧縮データ作成手
段と、 前記通常圧縮データ作成手段によって作成された前記通
常圧縮データと、前記合計算出手段によって算出された
合計が最も小さい前記グループに含まれるN−1個の差
分圧縮データと、それらの通常圧縮データ及び差分圧縮
データが前記ドキュメントのいずれのページに関するも
のであるかを示す情報を含む圧縮ドキュメントデータを
作成する圧縮ドキュメントデータ作成手段とを備えるこ
とを特徴とするドキュメント圧縮装置。
3. A document compression apparatus for creating compressed document data based on a document including first to Nth pages and capable of restoring image data of the first to Nth pages of the document, the document compression apparatus comprising: A difference compressed data in which image data of a certain page is used as generated image data, and image data of a different page is used as reference image data, and a position of a portion of the generated image data which is different from the reference image data. And the differential compressed data indicating the contents
Differential compressed data generating means for generating a combination of pages; and N × (N-
1) The differential compressed data is classified into N groups of N-1 differential compressed data in which the same image data is used as reference image data, and N-1 differential compressed data included in each group are classified. Total calculating means for calculating the total size of the compressed data; and encoding of image data used as reference image data when creating differential compressed data in a group having the smallest total calculated by the total calculating means. The normal compressed data creating means for creating normal compressed data for the page represented by the image data, the normal compressed data created by the normal compressed data creating means, and the sum calculated by the sum calculating means N-1 differentially compressed data included in the smallest group and their normal compressed data Document compression apparatus data and compressed difference data is characterized by comprising a compressed document data generating means for generating a compressed document data including information indicating whether it relates to one of the pages of the document.
【請求項4】 第1ないし第Nページからなるドキュメ
ントに基づき、そのドキュメントの第1ないし第Nペー
ジのイメージデータを復元できる圧縮ドキュメントデー
タを作成するためのドキュメント圧縮装置であって、 前記ドキュメントの、あるページのイメージデータを生
成イメージデータとし、かつ、それとは異なるページの
イメージデータを基準イメージデータとした差分圧縮デ
ータであって、前記基準イメージデータと異なっている
前記生成イメージデータの部分の位置及び内容を示す差
分圧縮データを、前記ドキュメントに含まれる全ての2
ページの組み合わせについて作成する差分圧縮データ作
成手段と、 前記差分圧縮データ作成手段で作成されたN×(N−
1)個の差分圧縮データの中から、サイズが最も小さい
差分圧縮データを特定する特定手段と、 この特定手段で特定された差分圧縮データの作成時に基
準イメージデータとして用いられているイメージデータ
を符号化することにより、そのイメージデータが表して
いるページに対応付けられた通常圧縮データを作成する
通常圧縮データ作成手段と、 通常圧縮データ或いは差分圧縮データが既に対応付けら
れているいずれかのページに関するイメージデータを基
準イメージデータとするとともに、通常圧縮データ或い
は差分圧縮データが未だ対応付けられていないいずれか
のページに関するイメージデータを生成イメージデータ
とした差分圧縮データの中から、サイズが最も小さな差
分圧縮データを探索し、探索した差分圧縮データを、そ
の作成に生成イメージデータとして用いられているイメ
ージデータが表しているページに対応付ける処理を、前
記ドキュメントの前記通常圧縮データが対応付けられて
いるページを除く全てのページに前記差分圧縮データ作
成手段で作成されたいずれかの差分圧縮データが対応付
けられるまで繰り返す対応付手段と、 前記通常圧縮データ作成手段によって作成された前記通
常圧縮データと、前記差分圧縮データ作成手段によって
作成されて前記対応付手段によって各ページに対応付け
られた差分圧縮データと、それらの通常圧縮データ及び
差分圧縮データが前記ドキュメントのいずれのページに
関するものであるかを示す情報と、各差分圧縮データが
どのページのイメージデータを基準イメージデータとし
て用いたものであるかを示す情報とを含む圧縮ドキュメ
ントデータを作成する圧縮ドキュメントデータ作成手段
とを備えることを特徴とするドキュメント圧縮装置。
4. A document compression apparatus for creating, based on a document including first to Nth pages, compressed document data capable of restoring image data of the first to Nth pages of the document, the document compression apparatus comprising: A difference compressed data in which image data of a certain page is used as generated image data, and image data of a different page is used as reference image data, and a position of a portion of the generated image data which is different from the reference image data. And the differential compressed data indicating the contents
Differential compressed data generating means for generating a combination of pages; and N × (N-
1) Identifying means for identifying the differential compressed data having the smallest size among the differential compressed data, and encoding the image data used as the reference image data when creating the differential compressed data identified by the identifying means. The normal compressed data creating means for creating the normal compressed data associated with the page represented by the image data, and any one of the pages to which the normal compressed data or the differential compressed data has already been associated. The difference compression data having the smallest size among the difference compression data in which the image data is used as the reference image data and the image data of any page to which the normal compression data or the difference compression data is not yet associated is generated image data. Searches the data and compares the searched differential compressed data Creating a process for associating a page represented by image data used as generated image data with the differential compressed data creating means for all pages of the document except the page to which the normal compressed data is associated An associating unit that repeats until any of the differential compressed data is associated, the normal compressed data created by the normal compressed data creating unit, and the normal compressed data created by the differential compressed data creating unit, and Differential compressed data associated with each page, information indicating which page of the document the normal compressed data and differential compressed data relate to, and which page of image data each differential compressed data is based on. Information indicating whether the data is used as image data. Document compression apparatus characterized by comprising a compressed document data generating means for generating a non-compressed document data.
【請求項5】 前記通常圧縮データ作成手段によって通
常圧縮データが作成されたページを除く各ページのイメ
ージデータを符号化することにより、各ページに関する
N−1個の通常圧縮データを作成する第2通常圧縮デー
タ作成手段と、 前記通常圧縮データ作成手段によって通常圧縮データが
作成されたページを除く各ページに対して、そのページ
に関する差分圧縮データのサイズが、前記第2通常圧縮
データ作成手段で作成されたそのページに関する通常圧
縮データのサイズよりも大きいか否かを判定する判定手
段とを、さらに備え、 前記圧縮ドキュメント作成手段は、前記判定手段によっ
て差分圧縮データの方がサイズが大きいと判定されたペ
ージに対しては、前記差分圧縮データの代わりに当該ペ
ージに関する前記第2圧縮データ作成手段で作成された
通常圧縮データを含む圧縮ドキュメントデータであっ
て、第2圧縮データ作成手段で作成された通常圧縮デー
タが用いられたページを示す情報をさらに含む圧縮ドキ
ュメントデータを作成することを特徴とする請求項1な
いし請求項4のいずれかに記載のドキュメント圧縮装
置。
5. A second method for creating N-1 pieces of normal compressed data for each page by encoding image data of each page except for the page for which the normal compressed data is created by the normal compressed data creating means. For each page except for the page for which the normal compressed data is created by the normal compressed data creating means, the size of the differential compressed data relating to the page is created by the second normal compressed data creating means. And determining means for determining whether the size of the compressed data is larger than the size of the normal compressed data for the page. The compressed document creation means determines that the differential compressed data is larger in size by the determining means. Page, the second compressed data creation for the page is performed instead of the differential compressed data. Generating compressed document data including normal compressed data created by the means, and further including information indicating a page using the normal compressed data created by the second compressed data creating means. 5. The document compression apparatus according to claim 1, wherein:
【請求項6】 前記差分圧縮データ作成手段は、 生成イメージデータと基準イメージデータとを、各イメ
ージデータを構成している所定サイズのデータである単
位データ毎に比較することにより、生成イメージデータ
に含まれる、同じ内容の1つ以上の単位データが連続す
る領域であり、かつ、基準イメージデータの対応する部
分には当該内容の単位データが存在していない領域であ
る要置換領域の開始位置を示す開始位置情報とその要置
換領域を構成している単位データの数を示す連続数情報
とその要置換領域で用いられている単位データの内容を
示す置換データとからなる要素データを複数個含む差分
圧縮データを作成することを特徴とする請求項1ないし
請求項5のいずれかに記載のドキュメント圧縮装置。
6. The differential compressed data creating means compares the generated image data with the reference image data for each unit data, which is data of a predetermined size constituting each image data, to generate generated image data. The start position of the replacement required area, which is an area where one or more unit data of the same content is included and is continuous and the corresponding part of the reference image data does not have the unit data of the content, is included. Includes a plurality of element data consisting of start position information indicating the number of unit data constituting the required replacement area, continuous number information indicating the number of unit data constituting the required replacement area, and replacement data indicating the content of the unit data used in the required replacement area 6. The document compression apparatus according to claim 1, wherein differential compression data is created.
【請求項7】 前記ドキュメントは、第1ないし第Nペ
ージのイメージデータに変換できる情報からなる印刷デ
ータであることを特徴とする請求項1ないし請求項6の
いずれかに記載のドキュメント圧縮装置。
7. The document compression apparatus according to claim 1, wherein the document is print data including information that can be converted into image data of first to Nth pages.
【請求項8】 ドキュメントの第1ページに関する通常
圧縮データと、それぞれ、そのドキュメントの第2ない
し第Nページに関するN−1個の特殊圧縮データとを含
む圧縮ドキュメントデータであり、各特殊圧縮データ
が、関連するページのイメージデータの、前ページのイ
メージデータと異なっている部分の位置及び内容を示し
ている圧縮ドキュメントデータを復元するためのドキュ
メント復元装置であって、 イメージデータを記憶するための記憶手段と、 前記圧縮ドキュメントデータに含まれている第1ページ
に関する通常圧縮データを復号することにより、前記ド
キュメントの第1ページを表すイメージデータを前記記
憶手段内に生成する第1生成手段と、 この第1生成手段によって前記記憶手段内に生成された
イメージデータを出力する第1出力手段と、 差分圧縮データに基づき前記記憶手段内に記憶されたイ
メージデータの内容を書き換え、書き換えによって得ら
れたイメージデータを出力する処理を、前記圧縮ドキュ
メントデータに含まれている第2ないし第Nページに関
する特殊圧縮データに対して、順次、実行する第2出力
手段とを備えることを特徴とするドキュメント復元装
置。
8. Compressed document data including normal compressed data relating to the first page of a document and N-1 special compressed data relating to the second to Nth pages of the document, wherein each special compressed data is A document restoring device for restoring compressed document data indicating a position and a content of a portion of image data of a related page different from image data of a previous page, and storing the image data. Means for generating image data representing a first page of the document in the storage means by decoding normal compressed data relating to a first page included in the compressed document data; The image data generated in the storage means by the first generation means is output. The compressed document data includes a first output unit that outputs the compressed document data, and a process of rewriting the content of the image data stored in the storage unit based on the difference compressed data and outputting the image data obtained by the rewriting. A document decompressing apparatus, comprising: second output means for sequentially executing special compressed data on second to Nth pages.
【請求項9】 ドキュメントの第1ページに関する通常
圧縮データと、それぞれ、そのドキュメントの第2ない
し第Nページに関するN−1個の特殊圧縮データとを含
む圧縮ドキュメントデータであって、各特殊圧縮データ
が、関連するページのイメージデータの、第1ページの
イメージデータと異なっている部分の位置及び内容を示
している圧縮ドキュメントデータを復元するためのドキ
ュメント復元装置であって、 イメージデータを記憶するための記憶手段と、 前記圧縮ドキュメントデータに含まれている第1ページ
に関する通常圧縮データを復号することにより、前記ド
キュメントの第1ページを表すイメージデータを前記記
憶手段内に生成する第1生成手段と、 この第1生成手段によって前記記憶手段内に生成された
イメージデータを出力する第1出力手段と、 前記記憶手段内に前記第1ページに関するイメージデー
タを新たに生成し、生成したイメージデータを特殊圧縮
データに基づき書き換え、書き換えによって得られたイ
メージデータを出力する処理を、前記圧縮ドキュメント
データに含まれている第2ないし第Nページに関する特
殊圧縮データに対して、順次、実行する第2出力手段と
を備えることを特徴とするドキュメント復元装置。
9. Compressed document data including normal compressed data relating to a first page of a document and N-1 special compressed data relating to the second to Nth pages of the document, respectively. Is a document restoring device for restoring compressed document data indicating a position and contents of a portion of the image data of a related page different from the image data of the first page, and for storing the image data And a first generation unit for generating image data representing a first page of the document in the storage unit by decoding normal compressed data related to a first page included in the compressed document data. Image data generated in the storage means by the first generation means First output means for outputting image data relating to the first page in the storage means, rewriting the generated image data based on special compressed data, and outputting image data obtained by the rewriting. And a second output unit for sequentially executing the special compressed data on the second to Nth pages included in the compressed document data.
【請求項10】 ドキュメントの第Xページに関する通
常圧縮データと、それぞれ、そのドキュメントの第Xペ
ージを除く第1ないし第Nページに関するN−1個の特
殊圧縮データとを含む圧縮ドキュメントデータであっ
て、各特殊圧縮データが、関連するページのイメージデ
ータの、第Xページのイメージデータと異なっている部
分の位置及び内容を示している圧縮ドキュメントデータ
を復元するためのドキュメント復元装置であって、 イメージデータを記憶するための記憶手段と、 前記圧縮ドキュメントデータに含まれている第Xページ
に対応付けられた通常圧縮データを所定の復号手順を用
いて伸張することにより、前記ドキュメントの第Xペー
ジを表すイメージデータを前記記憶手段内に生成する生
成手段と、 この生成手段で生成されたイメージデータを出力する第
1出力手段と、 前記記憶手段内に前記第Xページに関するイメージデー
タのコピーを生成し、生成したイメージデータのコピー
を差分圧縮データに基づき書き換え、書き換えによって
得られたイメージデータを出力する処理を、前記圧縮ド
キュメントデータに含まれている、前記第Xページを除
く第1ないし第Nページに関する差分圧縮データに対し
て、順次、実行する第2出力手段とを備えることを特徴
とするドキュメント復元装置。
10. Compressed document data including normal compressed data on the Xth page of a document and N-1 special compressed data on the 1st to Nth pages except the Xth page of the document, respectively. A document restoring device for restoring compressed document data in which each special compressed data indicates a position and a content of a portion of the image data of a related page different from the image data of the Xth page; Storage means for storing data; and decompressing the normal compressed data associated with the Xth page included in the compressed document data by using a predetermined decoding procedure, thereby obtaining the Xth page of the document. Generating means for generating image data to be represented in the storage means; A first output unit for outputting the generated image data, a copy of the image data relating to the X-th page is generated in the storage unit, and the generated copy of the image data is rewritten based on the differential compressed data. Second output means for sequentially executing a process of outputting image data on differentially compressed data related to the first to Nth pages excluding the Xth page included in the compressed document data. Document restoration device characterized by the above-mentioned.
【請求項11】 前記第1出力手段は、前記第2出力手
段による第X−1ページに関する差分圧縮データに対す
る処理が実行された後、前記第2出力手段による第X+
1ページに関する差分圧縮データに対する処理が実行さ
れる前に機能することを特徴とする請求項10記載のド
キュメント復元装置。
11. The first output means, after the second output means performs a process on the differentially compressed data relating to the (X-1) th page, outputs the X + th data by the second output means.
11. The document restoring apparatus according to claim 10, wherein the apparatus functions before a process for differentially compressed data relating to one page is executed.
【請求項12】 前記圧縮ドキュメントデータは、特殊
圧縮データとして、復号によってイメージデータが生成
される通常圧縮データを含むことがあるデータであり、 前記第2出力手段は、処理すべきページに関する特殊圧
縮データが通常圧縮データであった場合には、その通常
圧縮データを復号することにより、当該ページを表すイ
メージデータを前記記憶手段内に生成し、生成したイメ
ージデータを出力することを特徴とする請求項8ないし
請求項11のいずれかに記載のドキュメント復元装置。
12. The compressed document data is data that may include, as special compressed data, normal compressed data for which image data is generated by decoding, wherein the second output unit is configured to perform special compression on a page to be processed. If the data is normally compressed data, the image data representing the page is generated in the storage unit by decoding the normally compressed data, and the generated image data is output. The document restoration device according to any one of claims 8 to 11.
【請求項13】 ドキュメントの第Xページに関する通
常圧縮データと、そのドキュメントの第Xページを除く
第1ないし第Nページに関するN−1個の特殊圧縮デー
タと、各特殊圧縮データを他ページに対応付ける対応付
情報とを含む圧縮ドキュメントデータであり、各特殊圧
縮データが、関連するページのイメージデータの、前記
対応付情報で対応づけられている他ページのイメージデ
ータと異なっている部分の位置及び内容を示している圧
縮ドキュメントデータを復元するためのドキュメント復
元装置であって、 イメージデータを記憶するための記憶手段と、 前記圧縮ドキュメントデータに含まれている第Xページ
に関連する通常圧縮データを復号することにより、前記
ドキュメントの第Xページを表すイメージデータを前記
記憶手段内に生成する第1生成手段と、 前記記憶手段内に記憶されたイメージデータを、前記圧
縮ドキュメントファイルに含まれる特殊圧縮データに応
じて書き換えることにより、その特殊圧縮データが関連
するページを表すイメージデータを生成する第2生成手
段と、 前記記憶手段内に前記第2生成手段によって書き換えら
れるイメージデータを用意する用意手段と、 前記対応付情報に応じて、前記第2生成手段、あるい
は、前記用意手段と前記第2生成手段の双方を機能させ
ることによって、前記記憶手段内に第Xページを除く第
1ないし第Nページのイメージデータを生成するととも
に、前記記憶手段内に生成された第1ないし第Nページ
のイメージデータを出力する生成・出力制御手段とを備
えることを特徴とするドキュメント復元装置。
13. The normal compressed data relating to the Xth page of the document, N-1 special compressed data relating to the first to Nth pages excluding the Xth page of the document, and each special compressed data is associated with another page. Compressed document data including association information, and the position and content of a portion of the image data of the associated page that differs from the image data of another page associated with the association information A document restoring device for restoring compressed document data, the storage device for storing image data, and decoding the normal compressed data related to the X-th page included in the compressed document data Storing the image data representing the X-th page of the document in the storage means. A first generating means for generating the image data stored in the storage means in accordance with the special compressed data included in the compressed document file, whereby image data representing a page to which the special compressed data is related A generating means for generating image data to be rewritten by the second generating means in the storage means; and a second generating means or the preparing means according to the association information. By causing both the and the second generating means to function, image data of the first to Nth pages excluding the Xth page is generated in the storage means, and the first to the nth pages generated in the storage means are generated. A document restoration device comprising: a generation / output control unit that outputs N pages of image data.
【請求項14】 前記圧縮ドキュメントデータは、特殊
圧縮データとして、復号によってイメージデータが生成
される通常圧縮データを含むことがある、通常圧縮デー
タが用いられた特殊圧縮データを識別するための情報
と、通常圧縮データが用いられていない特殊圧縮データ
を他ページに対応づける情報とからなる対応付情報を含
むデータであり、 前記生成・出力手段は、前記対応付情報によって通常圧
縮データが用いられていることが示されている特殊圧縮
データに対しては、その特殊圧縮データを復号すること
により、その特殊圧縮データが関連するページを表すイ
メージデータを前記記憶手段内に生成することを特徴と
する請求項13記載のドキュメント復元装置。
14. The compressed document data may include, as special compressed data, normal compressed data for which image data is generated by decoding, and information for identifying special compressed data using normal compressed data. , Data that includes association information including information that associates special compressed data for which normal compressed data is not used with another page. The generation / output unit uses the normally compressed data according to the association information. Decoding the special compressed data to indicate that the special compressed data is associated with the special compressed data to generate image data representing a page related to the special compressed data in the storage unit. The document restoration device according to claim 13.
【請求項15】 第1ないし第Nページからなるドキュ
メントに基づき、そのドキュメントの第1ないし第Nペ
ージのイメージデータを復元できる圧縮ドキュメントデ
ータを作成するためのドキュメント圧縮方法であって、 前記ドキュメントの第1ページのイメージデータを符号
化することにより、第1ページに関する通常圧縮データ
を作成する通常圧縮データ作成ステップと、それぞれ、
前記ドキュメントの第2ないし第Nページのイメージデ
ータを生成イメージデータとし、かつ、直前のページの
イメージデータを基準イメージデータとしたN−1個の
差分圧縮データであって、前記基準イメージデータと異
なっている前記生成イメージデータの部分の位置及び内
容を示すN−1個の差分圧縮データを作成する差分圧縮
データ作成ステップと、 前記通常圧縮データ作成ステップにおいて作成された通
常圧縮データと、前記差分圧縮データ作成ステップにお
いて作成されたN−1個の差分圧縮データと、各通常差
分圧縮データ及び差分圧縮データが前記ドキュメントの
いずれのページに関するものであるかを示す情報とを含
む圧縮ドキュメントデータを作成する圧縮ドキュメント
データ作成ステップとを含むことを特徴とするドキュメ
ント圧縮方法。
15. A document compression method for creating compressed document data capable of restoring image data of the first to Nth pages of a document based on the document including the first to Nth pages, comprising: A normal compressed data generating step of generating normal compressed data for the first page by encoding the image data of the first page;
N-1 difference compressed data in which image data of the second to Nth pages of the document are used as generated image data and image data of the immediately preceding page is used as reference image data, and is different from the reference image data. A differential compressed data generating step of generating N-1 differential compressed data indicating a position and a content of the generated image data portion; a normal compressed data generated in the normal compressed data generating step; Compressed document data including N-1 difference compressed data created in the data creation step and information indicating which page of the document the respective normal difference compressed data and the difference compressed data are related to is created. A compressed document data creating step. Document compression method.
【請求項16】 第1ないし第Nページからなるドキュ
メントに基づき、そのドキュメントの第1ないし第Nペ
ージのイメージデータを復元できる圧縮ドキュメントデ
ータを作成するためのドキュメント圧縮方法であって、 前記ドキュメントの第1ページのイメージデータを符号
化することにより、第1ページに関する通常圧縮データ
を作成する通常圧縮データ作成ステップと、 それぞれ、前記ドキュメントの第2ないし第Nページの
イメージデータを生成イメージデータとし、かつ、第1
ページのイメージデータを基準イメージデータとしたN
−1個の差分圧縮データであって、前記基準イメージデ
ータと異なっている前記生成イメージデータの部分の位
置及び内容を示すN−1個の差分圧縮データを作成する
差分圧縮データ作成ステップと、 前記通常圧縮データ作成ステップにおいて作成された通
常圧縮データと、前記差分圧縮データ作成ステップにお
いて作成されたN−1個の差分圧縮データと、それらの
通常圧縮データ及び差分圧縮データが前記ドキュメント
のいずれのページに関するものであるかを示す情報とを
含む圧縮ドキュメントデータを作成する圧縮ドキュメン
トデータ作成ステップとを含むことを特徴とするドキュ
メント圧縮方法。
16. A document compression method for creating compressed document data capable of restoring image data of the first to Nth pages of a document based on the document including the first to Nth pages, comprising: A normal compressed data generating step of generating normal compressed data relating to the first page by encoding the image data of the first page; and generating image data of the second to Nth pages of the document as generated image data, respectively. And the first
N using page image data as reference image data
Differential compressed data generating step of generating N-1 differential compressed data indicating the position and contents of a part of the generated image data which is different from the reference image data, wherein the differential compressed data is -1 differential compressed data; The normal compressed data created in the normal compressed data creation step, the N-1 difference compressed data created in the difference compressed data creation step, and the normal compressed data and the difference compressed data are stored in any page of the document. A compressed document data creating step of creating compressed document data including information indicating whether the document is related to the document.
【請求項17】 第1ないし第Nページからなるドキュ
メントに基づき、そのドキュメントの第1ないし第Nペ
ージのイメージデータを復元できる圧縮ドキュメントデ
ータを作成するためのドキュメント圧縮方法であって、 前記ドキュメントの、あるページのイメージデータを生
成イメージデータとし、かつ、それとは異なるページの
イメージデータを基準イメージデータとした差分圧縮デ
ータであって、前記基準イメージデータと異なっている
前記生成イメージデータの部分の位置及び内容を示す差
分圧縮データを、前記ドキュメントに含まれる全ての2
ページの組み合わせについて作成する差分圧縮データ作
成ステップと、 前記差分圧縮データ作成ステップで作成されたN×(N
−1)個の差分圧縮データを、同じイメージデータが基
準イメージデータとして使用されているN−1個の差分
圧縮データからなるN個のグループに分類し、各グルー
プに含まれるN−1個の差分圧縮データのサイズの合計
を算出する合計算出ステップと、 この合計算出ステップにおいて算出された合計が最も小
さいグループ内の差分圧縮データの作成時に基準イメー
ジデータとして使用されているイメージデータを符号化
することにより、そのイメージデータが表しているペー
ジに関する通常圧縮データを作成する通常圧縮データ作
成ステップと、 前記通常圧縮データ作成ステップにおいて作成された前
記通常圧縮データと、前記合計算出ステップにおいて算
出された合計が最も小さい前記グループに含まれるN−
1個の差分圧縮データと、それらの通常差分圧縮データ
及び差分圧縮データが前記ドキュメントのいずれのペー
ジに関するものであるかを示す情報を含む圧縮ドキュメ
ントデータを作成する圧縮ドキュメントデータ作成ステ
ップとを含むことを特徴とするドキュメント圧縮方法。
17. A document compression method for creating compressed document data capable of restoring image data of the first to Nth pages of a document based on the document including the first to Nth pages, comprising: A difference compressed data in which image data of a certain page is used as generated image data, and image data of a different page is used as reference image data, and a position of a portion of the generated image data which is different from the reference image data. And the differential compressed data indicating the contents
A differential compressed data generating step for generating a combination of pages; and N × (N
-1) differentially compressed data are classified into N groups of N-1 differentially compressed data in which the same image data is used as reference image data, and N-1 number of differentially compressed data included in each group are classified. A sum calculating step for calculating the sum of the sizes of the differential compressed data; and encoding the image data used as the reference image data when creating the differential compressed data in the group having the smallest total calculated in the total calculating step. By this means, a normal compressed data creation step of creating normal compressed data for the page represented by the image data, the normal compressed data created in the normal compressed data creation step, and a total calculated in the total calculation step N- included in the group with the smallest
A step of generating compressed document data including one piece of differential compressed data and information indicating which page of the document the normal differential compressed data and the differential compressed data are related to; A document compression method characterized by the following.
【請求項18】 第1ないし第Nページからなるドキュ
メントに基づき、そのドキュメントの第1ないし第Nペ
ージのイメージデータを復元できる圧縮ドキュメントデ
ータを作成するためのドキュメント圧縮方法であって、 前記ドキュメントの、あるページのイメージデータを生
成イメージデータとし、かつ、それとは異なるページの
イメージデータである基準イメージデータとした差分圧
縮データであって、前記基準イメージデータと異なって
いる前記生成イメージデータの部分の位置及び内容を示
す差分圧縮データを、前記ドキュメントに含まれる全て
の2ページの組み合わせについて作成する差分圧縮デー
タ作成ステップと、 前記差分圧縮データ作成ステップで作成されたN×(N
−1)個の差分圧縮データの中から、サイズが最も小さ
い差分圧縮データを特定する特定ステップと、 この特定ステップで特定された差分圧縮データの作成時
に基準イメージデータとして用いられているイメージデ
ータを符号化することにより、そのイメージデータが表
しているページに対応付けられた通常圧縮データを作成
する通常圧縮データ作成ステップと、 通常圧縮データ或いは差分圧縮データが既に対応付けら
れたページに関するイメージデータを基準イメージデー
タとし、かつ、通常圧縮データ或いは差分圧縮データが
未だ対応付けられていないページに関するイメージデー
タを生成イメージデータとした差分圧縮データの中か
ら、サイズが最も小さな差分圧縮データを探索し、探索
した差分圧縮データを、その作成に生成イメージデータ
として用いられているイメージデータが表しているペー
ジに対応付ける処理を、前記ドキュメントの前記通常圧
縮データが対応付けられているページを除く全てのペー
ジに前記差分圧縮データ作成ステップで作成されたいず
れかの差分圧縮データが対応付けられるまで繰り返す対
応付ステップと、 前記通常圧縮データ作成ステップにおいて作成された前
記通常圧縮データと、前記差分圧縮データ作成ステップ
において作成されて前記対応付ステップにおいて各ペー
ジに対応付けられた差分圧縮データと、それらの通常圧
縮データ及び差分圧縮データが前記ドキュメントのいず
れのページに関するものであるかを示す情報と、各差分
圧縮データがどのページのイメージデータを基準イメー
ジデータとして用いたものであるかを示す情報とを含む
圧縮ドキュメントデータを作成する圧縮ドキュメントデ
ータ作成ステップとを含むことを特徴とするドキュメン
ト圧縮方法。
18. A document compression method for creating compressed document data capable of restoring image data of the first to Nth pages of a document based on the document including the first to Nth pages, comprising: A differential compressed data in which image data of a certain page is used as generated image data, and reference image data which is image data of a different page, and the difference of the generated image data which is different from the reference image data. A differential compressed data generating step of generating differential compressed data indicating a position and contents for all combinations of two pages included in the document; and N × (N
-1) a specifying step of specifying differential compression data having the smallest size from among the differential compression data; and image data used as reference image data when creating the differential compression data specified in this specific step. A normal compressed data creating step of creating normal compressed data associated with the page represented by the image data by encoding; and image data relating to the page to which the normal compressed data or differential compressed data has already been associated. Searching for differentially compressed data having the smallest size from differentially compressed data that has been generated as image data relating to a page to which reference compressed image data or differentially compressed data has not yet been associated as reference image data, The compressed difference data that was created The process of associating the page represented by the image data used as the compressed data with any of the pages created in the differential compressed data creating step for all pages of the document except for the page associated with the normal compressed data An associating step that repeats until the differential compressed data is associated with the normal compressed data created in the normal compressed data creating step, and a corresponding page created in the differential compressed data creating step and associated with each page in the associating step Attached differential compressed data, information indicating which page of the document the normal compressed data and differential compressed data relate to, and which page of image data each differential compressed data uses as reference image data. Information that indicates Document compression method, which comprises a compressed document data creation step of creating a compressed document data including and.
【請求項19】 前記通常圧縮データ作成ステップにお
いて通常圧縮データが作成されたページを除く各ページ
のイメージデータを符号化することにより、各ページに
関するN−1個の通常圧縮データを作成する第2通常圧
縮データ作成ステップと、 前記通常圧縮データ作成ステップにおいて通常圧縮デー
タが作成されたページを除く各ページに対して、そのペ
ージに関する差分圧縮データのサイズが、前記第2通常
圧縮データ作成ステップで作成されたそのページに関す
る通常圧縮データのサイズよりも大きいか否かを判定す
る判定ステップとを、さらに含み、 前記圧縮ドキュメント作成ステップは、前記判定ステッ
プにおいて差分圧縮データの方がサイズが大きいと判定
されたページに対しては、前記差分圧縮データの代わり
に当該ページに関する前記第2圧縮データ作成ステップ
で作成された通常圧縮データを含む圧縮ドキュメントデ
ータであって、第2圧縮データ作成ステップで作成され
た通常圧縮データが用いられたページを示す情報をさら
に含む圧縮ドキュメントデータを作成することを特徴と
する請求項15ないし請求項18のいずれかに記載のド
キュメント圧縮方法。
19. A second method for creating N-1 pieces of normal compressed data for each page by encoding image data of each page except the page for which the normal compressed data was created in the normal compressed data creating step. In the normal compressed data creating step, for each page except the page in which the normal compressed data was created in the normal compressed data creating step, the size of the differential compressed data related to the page is created in the second normal compressed data creating step. A determination step of determining whether the size of the compressed data is larger than the size of the normal compressed data for the page. The compressed document creation step determines that the difference compressed data is larger in size in the determination step. Page, instead of the compressed differential data, Compressed document data including the normal compressed data created in the second compressed data creating step, the compressed document further including information indicating a page using the normal compressed data created in the second compressed data creating step 19. The document compression method according to claim 15, wherein data is created.
【請求項20】 前記差分圧縮データ作成ステップは、 生成イメージデータと基準イメージデータとを、各イメ
ージデータを構成している所定サイズのデータである単
位データ毎に比較することにより、生成イメージデータ
に含まれる、同じ内容の1つ以上の単位データが連続す
る領域であり、基準イメージデータの対応する部分には
当該内容の単位データが存在していない領域である要置
換領域の開始位置を示す開始位置情報と、その要置換領
域を構成している単位データの数を示す連続数情報と、
その要置換領域で用いられている単位データの内容を示
す置換データとからなる要素データを複数個含む差分圧
縮データを作成することを特徴とする請求項15ないし
請求項19のいずれかに記載のドキュメント圧縮方法。
20. The differential compressed data creating step includes: comparing the generated image data with the reference image data for each unit data, which is data of a predetermined size constituting each image data; A start area indicating a start position of a replacement required area, which is an area in which one or more unit data of the same content is continuous and a corresponding part of the reference image data does not include the unit data of the content. Position information, continuous number information indicating the number of unit data constituting the required replacement area,
20. The compressed differential data including a plurality of element data including replacement data indicating the contents of unit data used in the required replacement area. Document compression method.
【請求項21】 前記ドキュメントは、第1ないし第N
ページのイメージデータに変換できる情報からなる印刷
データであることを特徴とする請求項15ないし請求項
20のいずれかに記載のドキュメント圧縮方法。
21. The document according to claim 1, wherein the first to Nth documents are
21. The document compression method according to claim 15, wherein the print data is print data including information that can be converted into image data of a page.
【請求項22】 ドキュメントの第1ページに関する通
常圧縮データと、それぞれ、そのドキュメントの第2な
いし第Nページに関するN−1個の特殊圧縮データとを
含む圧縮ドキュメントデータであり、各特殊圧縮データ
が、関連するページのイメージデータの、前ページのイ
メージデータと異なっている部分の位置及び内容を示し
ている圧縮ドキュメントデータを復元するためのドキュ
メント復元方法であって、 前記圧縮ドキュメントデータに含まれている第1ページ
に関する通常圧縮データを復号することにより、前記ド
キュメントの第1ページを表すイメージデータを記憶装
置内に生成する第1生成ステップと、 この第1生成ステップにおいて前記記憶装置内に生成さ
れたイメージデータを出力する第1出力ステップと、 差分圧縮データに基づき前記記憶装置内に記憶されたイ
メージデータの内容を書き換え、書き換えによって得ら
れたイメージデータを出力する処理を、前記圧縮ドキュ
メントデータに含まれている第2ないし第Nページに関
する特殊圧縮データに対して、順次、実行する第2出力
ステップとを含むことを特徴とするドキュメント復元方
法。
22. Compressed document data including normal compressed data relating to the first page of a document and N-1 special compressed data relating to the second to Nth pages of the document, wherein each special compressed data is A document restoring method for restoring compressed document data indicating a position and a content of a portion of the image data of a related page different from the image data of the previous page, wherein the document data is included in the compressed document data. A first generating step of generating image data representing the first page of the document in the storage device by decoding the normal compressed data relating to the first page in the storage device; and generating the image data in the storage device in the first generating step. A first output step of outputting the compressed image data; The process of rewriting the contents of the image data stored in the storage device based on the data and outputting the image data obtained by the rewriting is performed by a special compression for the second to Nth pages included in the compressed document data. A second output step of sequentially executing data on the document.
【請求項23】 ドキュメントの第1ページに関する通
常圧縮データと、それぞれ、そのドキュメントの第2な
いし第Nページに関するN−1個の特殊圧縮データとを
含む圧縮ドキュメントデータであって、各特殊圧縮デー
タが、関連するページのイメージデータの、第1ページ
のイメージデータと異なっている部分の位置及び内容を
示している圧縮ドキュメントデータを復元するためのド
キュメント復元方法であって、 前記圧縮ドキュメントデータに含まれている第1ページ
に関する通常圧縮データを復号することにより、前記ド
キュメントの第1ページを表すイメージデータを記憶装
置内に生成する第1生成ステップと、 この第1生成ステップにおいて前記記憶装置内に生成さ
れたイメージデータを出力する第1出力ステップと、 前記記憶装置内に前記第1ページに関するイメージデー
タを新たに生成し、生成したイメージデータを特殊圧縮
データに基づき書き換え、書き換えによって得られたイ
メージデータを出力する処理を、前記圧縮ドキュメント
データに含まれている第2ないし第Nページに関する特
殊圧縮データに対して、順次、実行する第2出力ステッ
プとを含むことを特徴とするドキュメント復元方法。
23. Compressed document data including normal compressed data relating to the first page of a document and N-1 special compressed data relating to the second to Nth pages of the document, respectively. Is a document restoring method for restoring compressed document data indicating a position and a content of a portion of the image data of a related page different from the image data of the first page, wherein the document data is included in the compressed document data. A first generation step of generating image data representing the first page of the document in the storage device by decoding the normal compressed data related to the first page, A first output step of outputting the generated image data; The processing of newly generating image data relating to the first page in the storage device, rewriting the generated image data based on the special compressed data, and outputting the image data obtained by the rewriting is included in the compressed document data. A second output step of sequentially executing the special compressed data for the second to Nth pages.
【請求項24】 ドキュメントの第Xページに関する通
常圧縮データと、それぞれ、そのドキュメントの第Xペ
ージを除く第1ないし第Nページに関するN−1個の特
殊圧縮データとを含む圧縮ドキュメントデータであっ
て、各特殊圧縮データが、関連するページのイメージデ
ータの、第Xページのイメージデータと異なっている部
分の位置及び内容を示している圧縮ドキュメントデータ
を復元するためのドキュメント復元方法であって、 前記圧縮ドキュメントデータに含まれている第Xページ
に対応付けられた通常圧縮データを所定の復号手順を用
いて伸張することにより、前記ドキュメントの第Xペー
ジを表すイメージデータを記憶装置内に生成する生成ス
テップと、この生成ステップで生成されたイメージデー
タを出力する第1出力ステップと、 前記記憶装置内に前記第Xページに関するイメージデー
タのコピーを生成し、生成したイメージデータのコピー
を差分圧縮データに基づき書き換え、書き換えによって
得られたイメージデータを出力する処理を、前記圧縮ド
キュメントデータに含まれている、前記第Xページを除
く第1ないし第Nページに関する差分圧縮データに対し
て、順次、実行する第2出力ステップとを含むことを特
徴とするドキュメント復元方法。
24. Compressed document data including normal compressed data relating to the Xth page of the document and N-1 special compressed data relating to the first to Nth pages excluding the Xth page of the document, respectively. A document restoration method for restoring compressed document data in which each special compressed data indicates a position and a content of a portion of the image data of a related page different from the image data of the Xth page, Generating image data representing the X-th page of the document in the storage device by expanding the normal compressed data associated with the X-th page included in the compressed document data using a predetermined decoding procedure. Step and a first output step for outputting the image data generated in the generation step. Generating a copy of the image data relating to the X-th page in the storage device, rewriting the generated copy of the image data based on the differential compression data, and outputting the image data obtained by the rewriting. A second output step of sequentially executing differential compression data on the first to Nth pages excluding the Xth page included in the compressed document data.
【請求項25】 前記第1出力ステップは、前記第2出
力ステップによる第X−1ページに関する差分圧縮デー
タに対する処理が実行された後、前記第2出力ステップ
による第X+1ページに関する差分圧縮データに対する
処理が実行される前に機能することを特徴とする請求項
24記載のドキュメント復元方法。
25. In the first output step, after the processing on the differentially compressed data relating to the (X−1) th page by the second output step is performed, the processing on the differentially compressed data regarding the (X + 1) th page by the second output step is performed. 25. The method of claim 24, wherein the method functions before the is executed.
【請求項26】 前記圧縮ドキュメントデータは、特殊
圧縮データとして、復号によってイメージデータが生成
される通常圧縮データを含むことがあるデータであり、 前記第2出力ステップは、処理すべきページに関する特
殊圧縮データが通常圧縮データであった場合には、その
通常圧縮データを復号することにより、当該ページを表
すイメージデータを前記記憶装置内に生成し、生成した
イメージデータを出力することを特徴とする請求項22
ないし請求項25のいずれかに記載のドキュメント復元
方法。
26. The compressed document data is data which may include, as special compressed data, normal compressed data for which image data is generated by decoding, wherein the second output step includes a special compression for a page to be processed. When the data is normally compressed data, the image data representing the page is generated in the storage device by decoding the normally compressed data, and the generated image data is output. Item 22
26. The document restoring method according to claim 25.
【請求項27】 ドキュメントの第Xページに関する通
常圧縮データと、そのドキュメントの第Xページを除く
第1ないし第Nページに関するN−1個の特殊圧縮デー
タと、各特殊圧縮データを他ページに対応付ける対応付
情報とを含む圧縮ドキュメントデータであり、各特殊圧
縮データが、関連するページのイメージデータの、前記
対応付情報で対応づけられている他ページのイメージデ
ータと異なっている部分の位置及び内容を示している圧
縮ドキュメントデータを復元するためのドキュメント復
元方法であって、 前記圧縮ドキュメントデータに含まれている第Xページ
に関連する通常圧縮データを復号することにより、前記
ドキュメントの第Xページを表すイメージデータを記憶
装置内に生成する第1生成ステップと、 前記記憶装置内に記憶されたイメージデータを、前記圧
縮ドキュメントファイルに含まれる特殊圧縮データに応
じて書き換えることにより、その特殊圧縮データが関連
するページを表すイメージデータを生成する第2生成ス
テップと、 前記記憶装置内に前記第2生成ステップにおいて書き換
えられるイメージデータを用意する用意ステップと、 前記対応付情報に応じて、前記第2生成ステップ、ある
いは、前記用意ステップと前記第2生成ステップの双方
を機能させることによって、前記記憶装置内に第Xペー
ジを除く第1ないし第Nページのイメージデータを生成
するとともに、前記記憶装置内に生成された第1ないし
第Nページのイメージデータを出力する生成・出力制御
ステップとを含むことを特徴とするドキュメント復元方
法。
27. The normal compressed data relating to the Xth page of the document, N-1 special compressed data relating to the first to Nth pages excluding the Xth page of the document, and each special compressed data is associated with another page. Compressed document data including association information, and the position and content of a portion of the image data of the associated page that differs from the image data of another page associated with the association information A document restoration method for restoring compressed document data, the method comprising: decoding X-th page of the document by decoding normal compressed data related to X-th page included in the compressed document data. A first generation step of generating image data to be represented in a storage device; A second generation step of rewriting the stored image data in accordance with the special compressed data included in the compressed document file to generate image data representing a page to which the special compressed data is related; A preparing step of preparing image data to be rewritten in the second generating step; and, by making the second generating step or both of the preparing step and the second generating step function according to the association information, A generation / output control step of generating first to Nth page image data except for the Xth page in the storage device and outputting the first to Nth page image data generated in the storage device; A document restoration method comprising:
【請求項28】 前記圧縮ドキュメントデータは、特殊
圧縮データとして、復号によってイメージデータが生成
される通常圧縮データを含むことがある、通常圧縮デー
タが用いられた特殊圧縮データを識別するための情報
と、通常圧縮データが用いられていない特殊圧縮データ
を他ページに対応づける情報とからなる対応付情報を含
むデータであり、 前記生成・出力ステップは、前記対応付情報によって通
常圧縮データが用いられていることが示されている特殊
圧縮データに対しては、その特殊圧縮データを復号する
ことにより、その特殊圧縮データが関連するページを表
すイメージデータを前記記憶装置内に生成することを特
徴とする請求項27記載のドキュメント復元方法。
28. The compressed document data may include, as special compressed data, normal compressed data for which image data is generated by decoding, and information for identifying special compressed data using normal compressed data. , Data including association information including information for associating special compressed data for which normal compressed data is not used with another page, wherein the generation / output step uses normal compressed data according to the association information. Decoding the special compressed data for the special compressed data indicating that the special compressed data is associated with the special compressed data to generate image data representing a page related to the special compressed data in the storage device. The document restoration method according to claim 27.
【請求項29】 コンピュータを、 第1ないし第Nページからなるドキュメントに基づき、
そのドキュメントの第1ないし第Nページのイメージデ
ータを復元できる圧縮ドキュメントデータを作成するた
めの装置であって、 前記ドキュメントの第1ページのイメージデータを符号
化することにより、第1ページに関する通常圧縮データ
を作成する通常圧縮データ作成手段と、それぞれ、前記
ドキュメントの第2ないし第Nページのイメージデータ
を生成イメージデータとし、かつ、直前のページのイメ
ージデータを基準イメージデータとしたN−1個の差分
圧縮データであって、前記基準イメージデータと異なっ
ている前記生成イメージデータの部分の位置及び内容を
示すN−1個の差分圧縮データを作成する差分圧縮デー
タ作成手段と、 前記通常圧縮データ作成手段によって作成された通常圧
縮データと、前記差分圧縮データ作成手段によって作成
されたN−1個の差分圧縮データと、各通常圧縮データ
及び差分圧縮データが前記ドキュメントのいずれのペー
ジに関するものであるかを示す情報とを含む圧縮ドキュ
メントデータを作成する圧縮ドキュメントデータ作成手
段とを備える装置として機能させるためのプログラムを
記録したコンピュータ読取可能な記録媒体。
29. A computer, based on a document consisting of pages 1 to N,
An apparatus for creating compressed document data capable of restoring image data of the first to Nth pages of the document, wherein the image data of the first page of the document is encoded to perform normal compression on the first page. Normal compressed data generating means for generating data; and N-1 pieces of image data for each of the second to Nth pages of the document as generated image data and the image data of the immediately preceding page as reference image data. Differential compressed data creating means for creating N-1 pieces of differential compressed data that are differential compressed data and indicate positions and contents of portions of the generated image data that are different from the reference image data; Means for generating the normal compressed data and the differential compressed data Compressed document data for creating compressed document data including N-1 pieces of differentially compressed data created by the means, and information indicating which page of the document the respective normal compressed data and difference compressed data relate to. A computer-readable recording medium that records a program for causing the apparatus to function as an apparatus including a creating unit.
【請求項30】 コンピュータを、 第1ないし第Nページからなるドキュメントに基づき、
そのドキュメントの第1ないし第Nページのイメージデ
ータを復元できる圧縮ドキュメントデータを作成するた
めの装置であって、 前記ドキュメントの第1ページのイメージデータを符号
化することにより、第1ページに関する通常圧縮データ
を作成する通常圧縮データ作成手段と、 それぞれ、前記ドキュメントの第2ないし第Nページの
イメージデータを生成イメージデータとし、かつ、第1
ページのイメージデータを基準イメージデータとしたN
−1個の差分圧縮データであって、前記基準イメージデ
ータと異なっている前記生成イメージデータの部分の位
置及び内容を示すN−1個の差分圧縮データを作成する
差分圧縮データ作成手段と、 前記通常圧縮データ作成手段によって作成された通常圧
縮データと、前記差分圧縮データ作成手段によって作成
されたN−1個の差分圧縮データと、それらの通常圧縮
データ及び差分圧縮データが前記ドキュメントのいずれ
のページに関するものであるかを示す情報とを含む圧縮
ドキュメントデータを作成する圧縮ドキュメントデータ
作成手段とを備える装置として機能させるためのプログ
ラムを記録したコンピュータ読取可能な記録媒体。
30. A computer, based on a document consisting of pages 1 to N,
An apparatus for creating compressed document data capable of restoring image data of the first to Nth pages of the document, wherein the image data of the first page of the document is encoded to perform normal compression on the first page. Normal compressed data generating means for generating data, wherein the image data of the second to Nth pages of the document are generated image data;
N using page image data as reference image data
Differential compressed data creating means for creating (N-1) differential compressed data that is -1 differential compressed data and indicates a position and a content of a portion of the generated image data that is different from the reference image data; The normal compressed data created by the normal compressed data creating means, the N-1 differential compressed data created by the differential compressed data creating means, and the normal compressed data and the differential compressed data are stored in any page of the document. A computer-readable recording medium storing a program for causing the apparatus to function as an apparatus including compressed document data creating means for creating compressed document data including information indicating whether the information is related to the program.
【請求項31】 コンピュータを、 第1ないし第Nページからなるドキュメントに基づき、
そのドキュメントの第1ないし第Nページのイメージデ
ータを復元できる圧縮ドキュメントデータを作成するた
めの装置であって、 前記ドキュメントの、あるページのイメージデータを生
成イメージデータとし、かつ、それとは異なるページの
イメージデータである基準イメージデータとした差分圧
縮データであって、前記基準イメージデータと異なって
いる前記生成イメージデータの部分の位置及び内容を示
す差分圧縮データを、前記ドキュメントに含まれる全て
の2ページの組み合わせについて作成する差分圧縮デー
タ作成手段と、 前記差分圧縮データ作成手段で作成されたN×(N−
1)個の差分圧縮データを、同じイメージデータが基準
イメージデータとして使用されているN−1個の差分圧
縮データからなるN個のグループに分類し、各グループ
に含まれるN−1個の差分圧縮データのサイズの合計を
算出する合計算出手段と、 この合計算出手段によって算出された合計が最も小さい
グループ内の差分圧縮データの作成時に基準イメージデ
ータとして使用されているイメージデータを符号化する
ことにより、そのイメージデータが表しているページに
関する通常圧縮データを作成する通常圧縮データ作成手
段と、 前記通常圧縮データ作成手段によって作成された前記通
常圧縮データと、前記合計算出手段によって算出された
合計が最も小さい前記グループに含まれるN−1個の差
分圧縮データと、それらの通常圧縮データ及び差分圧縮
データが前記ドキュメントのいずれのページに関するも
のであるかを示す情報を含む圧縮ドキュメントデータを
作成する圧縮ドキュメントデータ作成手段とを備える装
置として機能させるためのプログラムを記録したコンピ
ュータ読取可能な記録媒体。
31. A computer, based on a document consisting of pages 1 to N,
An apparatus for creating compressed document data capable of restoring image data of the first to Nth pages of the document, wherein image data of a certain page of the document is generated image data, and a different page of the document is generated. Difference compressed data that is reference image data that is image data and that is different from the reference image data and that indicates the position and content of the portion of the generated image data that is different from the reference image data, for all two pages included in the document And N × (N−N) generated by the differential compressed data generating means.
1) The differential compressed data is classified into N groups of N-1 differential compressed data in which the same image data is used as reference image data, and N-1 differential compressed data included in each group are classified. Sum calculation means for calculating the sum of the sizes of the compressed data; and encoding of the image data used as the reference image data when creating the difference compressed data in the group having the smallest sum calculated by the sum calculation means. The normal compressed data creating means for creating normal compressed data for the page represented by the image data, the normal compressed data created by the normal compressed data creating means, and the sum calculated by the sum calculating means N-1 differentially compressed data included in the smallest group and their normal compressed data And a compressed document data creating means for creating compressed document data including information indicating which page of the document the difference compressed data is related to. recoding media.
【請求項32】 コンピュータを、 第1ないし第Nページからなるドキュメントに基づき、
そのドキュメントの第1ないし第Nページのイメージデ
ータを復元できる圧縮ドキュメントデータを作成するた
めのドキュメント圧縮装置であって、 前記ドキュメントの、あるページのイメージデータを生
成イメージデータとし、かつ、それとは異なるページの
イメージデータである基準イメージデータとした差分圧
縮データであって、前記基準イメージデータと異なって
いる前記生成イメージデータの部分の位置及び内容を示
す差分圧縮データを、前記ドキュメントに含まれる全て
の2ページの組み合わせについて作成する差分圧縮デー
タ作成手段と、 前記差分圧縮データ作成手段で作成されたN×(N−
1)個の差分圧縮データの中から、サイズが最も小さい
差分圧縮データを特定する特定手段と、 この特定手段で特定された差分圧縮データの作成時に基
準イメージデータとして用いられているイメージデータ
を符号化することにより、そのイメージデータが表して
いるページに対応付けられた通常圧縮データを作成する
通常圧縮データ作成手段と、 通常圧縮データ或いは差分圧縮データが既に対応付けら
れているいずれかのページに関するイメージデータを基
準イメージデータとし、かつ、通常圧縮データ或いは差
分圧縮データが未だ対応付けられていないページに関す
るイメージデータを生成イメージデータとした差分圧縮
データの中から、サイズが最も小さな差分圧縮データを
探索し、探索した差分圧縮データを、その作成に生成イ
メージデータとして用いられているイメージデータが表
しているページに対応付ける処理を、前記ドキュメント
の前記通常圧縮データが対応付けられているページを除
く全てのページに前記差分圧縮データ作成手段で作成さ
れたいずれかの差分圧縮データが対応付けられるまで繰
り返す対応付手段と、 前記通常圧縮データ作成手段によって作成された前記通
常圧縮データと、前記差分圧縮データ作成手段によって
作成されて前記対応付手段によって各ページに対応付け
られた差分圧縮データと、それらの通常圧縮データ及び
差分圧縮データが前記ドキュメントのいずれのページに
関するものであるかを示す情報と、各差分圧縮データが
どのページのイメージデータを基準イメージデータとし
て用いたものであるかを示す情報とを含む圧縮ドキュメ
ントデータを作成する圧縮ドキュメントデータ作成手段
とを備える装置として機能させるためのプログラムを記
録したコンピュータ読取可能な記録媒体。
32. A computer, based on a document consisting of pages 1 to N,
What is claimed is: 1. A document compression apparatus for creating compressed document data capable of restoring image data of first to Nth pages of a document, wherein image data of a certain page of said document is generated image data and is different from said image data. Differential compressed data that is reference image data that is image data of a page, and differential compressed data that indicates the position and content of a part of the generated image data that is different from the reference image data, Differential compressed data generating means for generating a combination of two pages, and N × (N-
1) Identifying means for identifying the differential compressed data having the smallest size among the differential compressed data, and encoding the image data used as the reference image data when creating the differential compressed data identified by the identifying means. The normal compressed data creating means for creating the normal compressed data associated with the page represented by the image data, and any one of the pages to which the normal compressed data or the differential compressed data has already been associated. Search for differential compressed data having the smallest size from differential compressed data in which image data is used as reference image data and image data relating to a page to which normal compressed data or differential compressed data is not yet associated is generated image data. Then, the searched differential compressed data is The process of associating the page represented by the image data used as the compressed data with any of the pages created by the differential compressed data creating unit on all pages of the document except the page associated with the normal compressed data Associating means that repeats until the differential compressed data is associated with the normal compressed data created by the normal compressed data creating means, and each page created by the differential compressed data creating means and associated with each page by the associating means. Attached differential compressed data, information indicating which page of the document the normal compressed data and differential compressed data relate to, and which page of image data each differential compressed data uses as reference image data. Compressed document containing information indicating whether the Recorded computer-readable recording medium a program for functioning as a device and a compressed document data creation means for creating a cement data.
【請求項33】 コンピュータを、 ドキュメントの第1ページに関する通常圧縮データと、
それぞれ、そのドキュメントの第2ないし第Nページに
関するN−1個の特殊圧縮データとを含む圧縮ドキュメ
ントデータであり、各特殊圧縮データが、関連するペー
ジのイメージデータの、前ページのイメージデータと異
なっている部分の位置及び内容を示している圧縮ドキュ
メントデータを復元するための装置であって、 イメージデータを記憶するための記憶手段と、 前記圧縮ドキュメントデータに含まれている第1ページ
に関する通常圧縮データを復号することにより、前記ド
キュメントの第1ページを表すイメージデータを前記記
憶手段内に生成する第1生成手段と、 この第1生成手段によって前記記憶手段内に生成された
イメージデータを出力する第1出力手段と、 差分圧縮データに基づき前記記憶手段内に記憶されたイ
メージデータの内容を書き換え、書き換えによって得ら
れたイメージデータを出力する処理を、前記圧縮ドキュ
メントデータに含まれている第2ないし第Nページに関
する特殊圧縮データに対して、順次、実行する第2出力
手段とを備える装置として機能させるためのプログラム
を記録したコンピュータ読取可能な記録媒体。
33. A computer comprising: normally compressed data for a first page of a document;
Each of the compressed document data includes N-1 special compressed data relating to the second to Nth pages of the document, each special compressed data being different from the image data of the previous page of the image data of the associated page. For restoring compressed document data indicating the position and contents of a portion of the compressed document data, comprising: storage means for storing image data; and normal compression relating to a first page included in the compressed document data. First generating means for generating image data representing a first page of the document in the storage means by decoding data; and outputting the image data generated in the storage means by the first generating means. First output means, and an image stored in the storage means based on the differential compressed data A second output unit for sequentially executing a process of rewriting data contents and outputting image data obtained by the rewriting on special compressed data relating to the second to Nth pages included in the compressed document data; And a computer-readable recording medium storing a program for causing the apparatus to function as an apparatus having the following.
【請求項34】 コンピュータを、 ドキュメントの第1ページに関する通常圧縮データと、
それぞれ、そのドキュメントの第2ないし第Nページに
関するN−1個の特殊圧縮データとを含む圧縮ドキュメ
ントデータであって、各特殊圧縮データが、関連するペ
ージのイメージデータの、第1ページのイメージデータ
と異なっている部分の位置及び内容を示している圧縮ド
キュメントデータを復元するためのドキュメント復元装
置であって、 イメージデータを記憶するための記憶手段と、 前記圧縮ドキュメントデータに含まれている第1ページ
に関する通常圧縮データを復号することにより、前記ド
キュメントの第1ページを表すイメージデータを前記記
憶手段内に生成する第1生成手段と、 この第1生成手段によって前記記憶手段内に生成された
イメージデータを出力する第1出力手段と、 前記記憶手段内に前記第1ページに関するイメージデー
タを新たに生成し、生成したイメージデータを特殊圧縮
データに基づき書き換え、書き換えによって得られたイ
メージデータを出力する処理を、前記圧縮ドキュメント
データに含まれている第2ないし第Nページに関する特
殊圧縮データに対して、順次、実行する第2出力手段と
を備える装置として機能させるためのプログラムを記録
したコンピュータ読取可能な記録媒体。
34. A computer comprising: normally compressed data for a first page of a document;
Compressed document data including N-1 special compressed data for the second to Nth pages of the document, each of the special compressed data being the image data of the first page of the image data of the associated page A document restoring device for restoring compressed document data indicating a position and contents of a part different from the above, comprising: storage means for storing image data; and a first means included in the compressed document data. First generating means for generating image data representing a first page of the document in the storage means by decoding normal compressed data relating to a page; and an image generated in the storage means by the first generating means. First output means for outputting data, and the first page in the storage means. A process of generating new image data, rewriting the generated image data based on the special compressed data, and outputting the image data obtained by the rewriting is performed on the second to Nth pages included in the compressed document data. A computer-readable recording medium on which a program for functioning as a device having a second output unit for sequentially executing special compressed data is recorded.
【請求項35】 コンピュータを、 ドキュメントの第Xページに関する通常圧縮データと、
それぞれ、そのドキュメントの第Xページを除く第1な
いし第Nページに関するN−1個の特殊圧縮データとを
含む圧縮ドキュメントデータであって、各特殊圧縮デー
タが、関連するページのイメージデータの、第Xページ
のイメージデータと異なっている部分の位置及び内容を
示している圧縮ドキュメントデータを復元するための装
置であって、 イメージデータを記憶するための記憶手段と、 前記圧縮ドキュメントデータに含まれている第Xページ
に対応付けられた通常圧縮データを所定の復号手順を用
いて伸張することにより、前記ドキュメントの第Xペー
ジを表すイメージデータを前記記憶手段内に生成する生
成手段と、 この生成手段で生成されたイメージデータを出力する第
1出力手段と、前記記憶手段内に前記第Xページに関す
るイメージデータのコピーを生成し、生成したイメージ
データのコピーを差分圧縮データに基づき書き換え、書
き換えによって得られたイメージデータを出力する処理
を、前記圧縮ドキュメントデータに含まれている、前記
第Xページを除く第1ないし第Nページに関する差分圧
縮データに対して、順次、実行する第2出力手段とを備
える装置として機能させるためのプログラムを記録した
コンピュータ読取可能な記録媒体。
35. A computer comprising: normally compressed data for page X of the document;
Compressed document data including N-1 special compressed data for the first to Nth pages except the Xth page of the document, each of the special compressed data being an image data of the associated page. An apparatus for restoring compressed document data indicating the position and contents of a part different from the image data of the X page, comprising: storage means for storing image data; Generating means for generating, in the storage means, image data representing the X-th page of the document by decompressing the normal compressed data associated with the X-th page using a predetermined decoding procedure; A first output unit for outputting the image data generated in the step (c), and the X-th page in the storage unit. The process of generating a copy of the image data, rewriting the generated copy of the image data based on the differential compressed data, and outputting the image data obtained by the rewriting, includes processing the X-th page included in the compressed document data. A computer-readable recording medium in which a program for functioning as a device including second output means for sequentially executing differential compressed data relating to first to Nth pages to be excluded is recorded.
【請求項36】 コンピュータを、 ドキュメントの第Xページに関する通常圧縮データと、
そのドキュメントの第Xページを除く第1ないし第Nペ
ージに関するN−1個の特殊圧縮データと、各特殊圧縮
データを他ページに対応付ける対応付情報とを含む圧縮
ドキュメントデータであり、各特殊圧縮データが、関連
するページのイメージデータの、前記対応付情報で対応
づけられている他ページのイメージデータと異なってい
る部分の位置及び内容を示している圧縮ドキュメントデ
ータを復元するための装置であって、 イメージデータを記憶するための記憶手段と、 前記圧縮ドキュメントデータに含まれている第Xページ
に関連する通常圧縮データを復号することにより、前記
ドキュメントの第Xページを表すイメージデータを前記
記憶手段内に生成する第1生成手段と、 前記記憶手段内に記憶されたイメージデータを、前記圧
縮ドキュメントファイルに含まれる特殊圧縮データに応
じて書き換えることにより、その特殊圧縮データが関連
するページを表すイメージデータを生成する第2生成手
段と、 前記記憶手段内に前記第2生成手段によって書き換えら
れるイメージデータを用意する用意手段と、 前記対応付情報に応じて、前記第2生成手段、あるい
は、前記用意手段と前記第2生成手段の双方を機能させ
ることによって、前記記憶手段内に第Xページを除く第
1ないし第Nページのイメージデータを生成するととも
に、前記記憶手段内に生成された第1ないし第Nページ
のイメージデータを出力する生成・出力制御手段とを備
える装置として機能させるためのプログラムを記録した
コンピュータ読取可能な記録媒体。
36. A computer comprising: normally compressed data for page X of the document;
Compressed document data including N-1 special compressed data relating to the first to N-th pages except the X-th page of the document, and association information for associating each special compressed data with another page; Is a device for restoring compressed document data indicating the position and content of a portion of the image data of a related page that is different from the image data of another page associated with the association information, Storage means for storing image data; and decoding the normal compressed data associated with the X-th page contained in the compressed document data, thereby storing the image data representing the X-th page of the document in the storage means. First generating means for generating image data in the storage means, and compressing the image data stored in the storage means. A second generation unit for generating image data representing a page to which the special compressed data is related by rewriting in accordance with the special compressed data included in the document file; and an image rewritten in the storage unit by the second generation unit. A preparing means for preparing data, and the second generating means, or both the preparing means and the second generating means are operated in accordance with the association information, so that the X-th page is stored in the storage means. A program for generating an image data of the first to Nth pages excluding, and a generation / output control unit for outputting the image data of the first to Nth pages generated in the storage unit; A computer-readable recording medium on which is recorded.
JP11159896A 1999-06-07 1999-06-07 Document compressor, document decoder, document compression method, document decoding method and computer-readable recording medium Withdrawn JP2000350044A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11159896A JP2000350044A (en) 1999-06-07 1999-06-07 Document compressor, document decoder, document compression method, document decoding method and computer-readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11159896A JP2000350044A (en) 1999-06-07 1999-06-07 Document compressor, document decoder, document compression method, document decoding method and computer-readable recording medium

Publications (1)

Publication Number Publication Date
JP2000350044A true JP2000350044A (en) 2000-12-15

Family

ID=15703553

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11159896A Withdrawn JP2000350044A (en) 1999-06-07 1999-06-07 Document compressor, document decoder, document compression method, document decoding method and computer-readable recording medium

Country Status (1)

Country Link
JP (1) JP2000350044A (en)

Similar Documents

Publication Publication Date Title
JP4999791B2 (en) Information processing apparatus, control method thereof, and program
JP2008521292A (en) Lossless compression system and method for digital images
JP2542726B2 (en) High resolution image pixel encoding / decoding device using low resolution replica
US20050286778A1 (en) Compression unit, decompression unit for image data and programs for compressing and decompressing image data
JP2011223276A (en) Image processing apparatus, image processing method, and program
JPH11177788A (en) Printing control method and printer
JPH1011343A (en) Processor and method for information processing
US20090245666A1 (en) Image file editing apparatus and method, and program
JP2011254405A (en) Image processor and image processing method
JP2000350044A (en) Document compressor, document decoder, document compression method, document decoding method and computer-readable recording medium
US8130408B2 (en) Image forming system and data processing method
US20040167918A1 (en) Information processing method and apparatus
JPH09205647A (en) Image coder, image decoder and image processor
JP5409090B2 (en) Information processing apparatus, information processing method, program, and storage medium
JP2008301373A (en) Image encoding apparatus, image decoding apparatus, and control method thereof
JP2008022376A (en) Image processing device, control method thereof, computer program, and computer readable storage medium
JP2008258916A (en) Image processor, control method for image processor and computer program
JP3267269B2 (en) Printing apparatus and printing method
JP3081051B2 (en) Image processing apparatus and image processing method
JP4521942B2 (en) Document management apparatus and method
JPH1091767A (en) Image filing method and device
JP5643578B2 (en) Image processing apparatus, image processing method, and program
JP3690102B2 (en) Image processing apparatus and image processing method
JP2005134956A (en) Image processor
JP2006173844A (en) Image processor and its control method

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060905