JP3610381B2 - Data compression device - Google Patents
Data compression device Download PDFInfo
- Publication number
- JP3610381B2 JP3610381B2 JP14850199A JP14850199A JP3610381B2 JP 3610381 B2 JP3610381 B2 JP 3610381B2 JP 14850199 A JP14850199 A JP 14850199A JP 14850199 A JP14850199 A JP 14850199A JP 3610381 B2 JP3610381 B2 JP 3610381B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- input data
- output
- match
- past
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Description
【0001】
【発明の属する技術分野】
本発明はデータ圧縮装置に関し、特に、Ziv−Lempel符号(LZ符号)による圧縮処理を高速に行う場合に適用して好適なものである。
【0002】
【従来の技術】
従来のLZ符号化では、過去のデータの出現位置をハッシュテーブルを用いて検索するものがあった。また、過去のデータと入力中のデータとを1バイト単位で比較するハードコンパレータ方式を用いることにより、圧縮処理の高速化を図るものがあった。
【0003】
【発明が解決しようとする課題】
しかしながら、ハッシュテーブル方式では、処理速度が遅いという問題がある。また、ハードコンパレータ方式は、1バイト単位のコンパレートであり、動作クロック以上の処理速度で処理できないという問題がある。さらに、従来の方式では、プリント時の余白エリアの最大圧縮率が低いという問題がある。
【0004】
そこで、本発明の目的は、データ圧縮を高速に行うことが可能なデータ圧縮装置を提供することである。
【0005】
【課題を解決するための手段】
上述した課題を解決するために、本発明によれば、比較対象となる過去の入力データの全ての出現位置に対応した比較手段を設けるようにしている。また、本発明の一態様によれば、同一の入力データ列の繰り返し回数を入力データ列の符号として出力するようにしている。
【0006】
このことにより、過去の入力データ列と現在の入力データ列との1回の比較動作により、過去のデータ列の中から最長一致長及び最長一致位置を求めることが可能となり、最長一致長及び最長一致位置を求める際に、過去のデータ列の出現位置を1つ1つ溯りながら比較処理を何度も行う必要がなくなることから、LZ符号によるデータ圧縮を高速に行うことが可能となる。さらに、プリント時の余白部分については、同一の入力データ列の繰り返しとなるため、余白部分のデータ圧縮を効率的に行うことが可能となる。
【0007】
また、本発明の一態様によれば、最長一致長及び最長一致位置を格納するデータ領域のビット長は、入力データのビット長と同一である。
このことにより、現在の入力データ列と過去の入力データ列とが一致した時に、LZ符号を出力し、現在の入力データ列と過去の入力データ列とが一致しない時に、現在の入力データをそのまま出力した場合においても、生データ及びLZ符号を同一のデータフォーマット上で出力することか可能となり、効率的なデータ圧縮を行うことが可能となる。
【0008】
また、本発明の一態様によれば、過去の入力データ及び現在の入力データの一致長分のシフトを、バレルシフタを用いて行うようにしている。
このことにより、過去のデータ列及び現在の入力データ列の一致長分のシフトを1度に行うことが可能となり、LZ符号によるデータ圧縮を高速に行うことが可能となる。
【0010】
【発明の実施の形態】
以下、本発明の一実施例に係わるデータ圧縮装置について図面を参照しながら説明する。図1は、本発明の第1実施例に係わるデータ圧縮方法を説明する図である。図1において、1バイト単位の入力データ列を、過去の入力データ列と比較する。そして、過去の入力データ列の中に現在の入力データ列と一致するものがあれば、一致したかどうかを示すフラグデータを“1”に設定する。そして、入力データ列と一致した部分のうち、一致長の最も長い部分を一致位置posと一致長lenで置き換える。
【0011】
例えば、過去の入力データ列(ヘキサで示す)として、“02、05、08、0C、0B、0A、03、04、05、・・・”が入力され、現在の入力データ列として、“0A、0B、0C、1A、1B、0D、・・・”が入力されたものとすると、現在の入力データ列と過去の入力データ列とを比較する。ここで、最長一致時のデータが8バイトまでに制限されているものとすると、1バイト分のフラグデータと、8バイト分のデータD0〜D7を用意し、データD0〜D7をフラグデータの各ビット値とリンクさせる。そして、現在のデータ列の“0A、0B、0C”の部分が過去のデータ列と一致したものとすると、フラグデータの7ビット目を“1”に設定する。また、データD0の上位3ビット分を一致長len、データD0の下位5ビット分を一致位置posに割り当て、現在のデータ列の“0A、0B、0C”の部分の符号として、一致位置pos=5及び一致長len=3を表す符号をデータD0として出力する。
【0012】
次に、現在の入力データ列及び過去の入力データ列を一致長len=3つだけシフトする。そして、シフト後の“1A、1B、0D、・・・”という現在の入力データ列を、シフト後の“0C、0B、0A、03、04、05、・・・”という過去の入力データ列と比較する。ここで、現在の入力データ列の“1A”というデータは、過去のデータ列のいずれのデータとも一致しない。この場合、フラグデータの6ビット目を“0”に設定するとともに、現在の入力データ列の“1A”の符号をそのままデータD1として出力する。なお、“1A”は1バイトのデータであり、一致長len及び一致位置posを示すデータも1バイトである。このため、一致長len及び一致位置posを示すデータを格納するデータD0〜D7の領域を、入力データをそのままデータD0〜D7に格納する場合に用いることが可能となり、データD0〜D7の領域を有効に利用することができる。以上の処理をデータD0〜D7について行い、1バイト分のフラグデータと8バイト分の圧縮データとが1組となる72bitの出力データを生成する。
【0013】
図2は、本発明の一実施例に係わるデータ圧縮装置のシステム構成を示すブロック図である。図2において、CPU1のプログラム2及びワークRAM3が設けられ、CPU1は、I/Oポート4、5を介して圧縮回路6を制御する。なお、CPU1による圧縮回路6の制御は、Dreq信号及びDack信号を用いたデータ入出力制御であり、終了はend信号を用いる。また、圧縮回路6へのデータ入力Dinは64bit、圧縮回路6からのデータ出力Doutは72ビットである(なお、図2において、太線はバイト単位のデータを示している。以下の図5〜10、図13、図18、図19も同様)。圧縮回路6は、LZ符号によるデータ圧縮を行う。ここで、圧縮回路6は、過去の入力データDinの中から現在の入力データDinとの一致をサーチするコンパレータを、比較対象となる過去の入力データDinの全ての出現位置に対して備えている。
【0014】
図3は、図2のデータ圧縮装置のデータ入力シーケンスを示すフローチャートである。図3において、CPU1は、圧縮回路6からのiDreq(データ入力要求)がある度に(ステップS1)、8bit分の入力データDinを圧縮回路6に出力するとともに、iDack(データ入力許可)を出力する(ステップS2)。そして、CPU1は、圧縮対象となる全てのデータの出力が終了すると(ステップS3)、iEND(データ入力の終了)を圧縮回路6に出力する(ステップS4)。
【0015】
図4は、図2のデータ圧縮装置のデータ出力シーケンスを示すフローチャートである。図4において、CPU1は、圧縮回路6からのkDreq(データ出力要求)がある度に(ステップS11)、72bit分の出力データDoutを圧縮回路6から読み出すとともに、kDack(データ出力許可)を圧縮回路6に出力する(ステップS13)。CPU1は、圧縮回路6からkEND(データ出力の終了)を受け取るまで以上の処理を続ける(ステップS14)。
【0016】
図5は、本発明の第1実施例に係わるデータ圧縮装置の圧縮回路6の構成を示すブロック図である。図5において、input FIFO11は8バイト分のFIFOであり、圧縮回路6に入力された入力データDinを現在の入力データ列として保持する。スライドFIFO12は32バイト分のFIFOであり、input FIFO11から出力されたデータiFD0を過去の入力データ列として保持する。
【0017】
サーチ回路13は、input FIFO11に保持されている現在の入力データ列iFD0〜iFD7とスライドFIFO12に保持されている過去の入力データ列SFD0〜SFD31とを比較する。そして、一致する部分があれば、過去の入力データ列SFD0〜SFD31の中の一致位置Match−Pos及び一致長Match−Lenを出力するとともに、Match Flag=1とする。一方、一致する部分がない場合は、Match Flag=0とする。
【0018】
ここで、サーチ回路13は、過去の入力データ列SFD0〜SFD31の全てのデータの出現位置に対応するコンパレータを備えている。そして、現在の入力データiFD0〜iFD7をそれらの全てのコンパレータに1度に供給することにより、現在の入力データ列iFD0〜iFD7と過去の入力データ列SFD0〜SFD31との1回の比較処理により、一致位置Match−Pos及び一致長Match−Lenを算出する。このことにより、過去の入力データ列SFD0〜SFD31との一致位置Match−Pos及び一致長Match−Lenを算出する場合に、過去の入力データ列SFD0〜SFD31を1つずつ溯りながら比較処理を行う必要がなくなり、一致位置Match−Pos及び一致長Match−Lenを高速に算出することが可能となる。
【0019】
出力回路14は、Match Flag=1の場合は、一致位置Match−Pos及び一致長Match−Lenからなる1バイトの圧縮データを生成し、Match Flag=0の場合は、input FIFO11から出力された1バイトのデータiFD0をそのまま用いることにより、1バイト分のフラグデータと8バイト分の圧縮データが1組となる9バイトの出力データDoutを生成する。そして、CPU1とのkDreq、kDack及びkend信号の通信結果に基づいて、出力データDoutをCPU1に送信する。
【0020】
シーケンサ15は、CPU1とのiDreq、iDack及びiend信号の通信結果に基づいて、input FIFO11、スライドFIFO12及び出力回路14のデータの入出力制御を行う。
【0021】
図6は、図5の圧縮回路6のinput FIFO11の構成例を示すブロック図である。図6において、8バイト分のラッチ21a〜21cが設けられ、各ラッチ21a〜21cは、セレクタ22a、22b、・・・を介して次段のラッチ21a〜21cに接続されている。各セレクタ22a、22b、・・・は、Shift Mode=0の場合、input FIFO11に入力されたデータDinを選択して、次段のラッチ21a〜21cに出力する。一方、ShiftMode=1の場合、前段のラッチ21a〜21cから出力された入力データiFD0〜iFD7を選択して、次段のラッチ21a〜21cに出力する。ラッチ21a〜21cは、入力データiFD0〜iFD7を保持する。そして、Shift Mode=1の場合、i−sftCLKが入力されるごとに、現在保持している入力データiFD0〜iFD7をセレクタ22a、22b、・・・を介して次段のラッチ21a〜21cにシフトする。一方、Shift Mode=0の場合、input FIFO11に入力されたデータDinが、L0〜L7で選択されたラッチ21a〜21cにラッチされる。
【0022】
図7は、図5の圧縮回路6のスライドFIFO12の構成例を示すブロック図である。図7において、32バイト分のラッチ31a〜31cが設けられ、各ラッチ31a〜31cは、次段のラッチ31a〜31cに接続されている。ここで、ラッチ31a〜31cは、過去の入力データSFD31〜SFD0を保持し、s−sftCLKが入力されるごとに、現在保持している過去の入力データSFD31〜SFD0を次段のラッチ31a〜31cにシフトする。
【0023】
図8は、図5の圧縮回路6のサーチ回路13の構成例を示すブロック図である。図8において、比較部41には、input FIFO11に保持されている現在の入力データiFD0〜iFD7とスライドFIFO12に保持されている過去の入力データSFD31〜SFD0が入力される。そして、現在の入力データiFD0〜iFD7と過去の入力データSFD31〜SFD0との比較を行い、過去の入力データSFD31〜SFD0の各位置に対応した一致長len1〜31を出力する。プライオリティエンコーダ42は、一致長len1〜31の中から、最長一致長Match_lenを選択する。そして、最長一致長Match_lenが2以上の場合、Match_Flag=1を出力するとともに、最長一致長Match_len及び最長一致位置Match_posを出力する。一方、最長一致長Match_lenが1以下の場合、Match_Flag=0を出力する。
【0024】
図9は、図5の圧縮回路6の比較部41の構成例を示すブロック図である。図9において、比較部41には、31個のコンパレータ51a〜51cが設けられ、各コンパレータ51a〜51cは、過去の入力データSFD31〜SFD0の各出現位置に対応している。ここで、入力データSFD31〜SFD0は全部で32個あるが、一致長が1の出現位置に対応するコンパレータは不要なため、コンパレータ51a〜51cは全部で31個でよい。また、現在の8個の入力データiFD0〜iFD7を一度に比較するため、2×8入力のコンパレータ51cが31個だけ必要となるが、過去の入力データSFD6〜SFD1の各出現位置に対応する部分は、比較対照となる過去の入力データSFD31〜SFD0がそれぞれ7〜2個しかない。このため、過去の入力データSFD6〜SFD1の出現位置に対応するコンパレータ51a、52b、・・・は、それぞれ2×2入力〜2×7入力でよい。各コンパレータ51a〜51cは、現在の入力データiFD0〜iFD7と過去の入力データSFD31〜SFD0との比較を行い、その時の一致長len1〜31を出力する
このように、比較部41には、現在の8個の入力データiFD0〜iFD7と過去の32個の入力データSFD31〜SFD0のうちの連続する8個分との比較を行うためのコンパレータ51a〜51cが、過去の入力データSFD31〜SFD0の全ての出現位置に対応して設けられている。このため、現在の入力データiFD0〜iFD7と過去の入力データSFD31〜SFD0との最長一致位置を検出する場合、現在の入力データiFD0〜iFD7をシフトさせながら過去の入力データSFD31〜SFD0との比較を何度も行う必要がなくなり、最長一致位置及び最長一致長を1回の比較処理により検出することが可能となる。
【0025】
図10は、図9の比較部41のコンパレータ51cの構成例を示すブロック図である。図10において、コンパレータ51cは、現在の8個の入力データiFD0〜iFD7をA0〜A7に入力するとともに、過去の32個の入力データSFD31〜SFD0の中の連続する8個をB0〜B7に入力する。そして、現在の8個の入力データiFD0〜iFD7と過去の32個の入力データSFD31〜SFD0の中の連続する8個とを比較し、その時の一致長lenを出力する。ここで、一致長lenは0〜8の値を取り得るので、一致長lenのビット数は3ビット必要になる。
【0026】
図11は、図10のコンパレータ51cの出力データの一例を示す図である。図11において、一致したバイト数を一致長lenとして、コード化して出力する。ここで、1バイトマッチは圧縮効果がないため、0を出力する。
【0027】
図12は、図8のサーチ回路13のプライオリティエンコーダ42の構成例を示すブロック図である。図12において、プライオリティエンコーダ42は最大一致長算出部61を備え、最大一致長算出部61は31個の一致長len1〜31の中の最大一致長Match_lenを出力するとともに、最大一致長Match_lenを与える最長一致位置Match_posをi1〜i31の中から選択して出力する。また、最大一致長Match_lenはコンパレータ62に対しても出力され、コンパレータ62は最大一致長Match_lenと0とを比較する。そして、最大一致長Match_len=0の場合は、コンパレータ62は1を出力し、コンパレータ62からの出力がインバータ63で反転されて、Match_Flag=0が出力される。一方、最大一致長Match_lenが0でない場合は、コンパレータ62は0を出力し、コンパレータ62からの出力がインバータ63で反転されて、Match_Flag=1が出力される。図13は、図5の圧縮回路6の出力回路14の構成例を示すブロック図である。図13において、8ビット分のMatch_Flagを格納するラッチ73及び8バイト分の圧縮データD0〜D7を格納するためのラッチ74a〜74cが設けられている。プライオリティエンコーダ42から出力されたMatch_Flagの値はラッチ73に出力されるとともに、シーケンサ71及びセレクタ72に出力される。セレクタ72は、Match_Flag=1の場合、プライオリティエンコーダ42から出力された最大一致長Match_len及び最長一致位置Match_posをラッチ74a〜74cに出力する。一方、セレクタ72は、Match_Flag=0の場合、input FIFO11から出力された8ビットの生データDthruをラッチ74a〜74cに出力する。
【0028】
シーケンサ71は、シーケンサ15からput信号が出力されるごとに、F7及びLD0、F6及びLD1、・・・、F0及びLD7を順次選択し、8ビット分のMatch_Flagをラッチ73に格納するとともに、8バイト分の圧縮データD0〜D7をラッチ74a〜74cに格納する。そして、8ビット分のMatch_Flagがラッチ73に格納されるとともに、8バイト分の圧縮データD0〜D7がラッチ74a〜74cに格納されると、これらの72bit分のデータをDoutとして出力するとともに、KDreqをCPU1に出力する。そして、CPU1が72bit分の出力データDoutを取り込み、CPU1がkDackを出力すると、出力回路14は、CPU1から出力されたkDackを取り込み、シーケンサ15からjENDが出力されるまで、以上の出力動作を繰り返す。その後、シーケンサ15からjENDが出力されると、出力回路14は、kENDをCPU1に出力して出力動作を終了する。
【0029】
図14は、図5の圧縮回路6のシーケンサ15の動作を示すフローチャートである。図14において、圧縮回路6が圧縮動作を行う場合、シーケンサ15は、input FIFO11及びスライドFIFO12にreset信号を出力し、ラッチ21a〜21c及びラッチ31a〜31cをクリアする(ステップS21)。次に、input FIFO11のshift modeを0に設定し(ステップS22)、input FIFO11のセレクタ22a、22b、・・・をデータDinの入力モードに切り替え、n=0とする(ステップS23)。次に、iDreqをCPU1に出力し(ステップS24)、CPU1からiDackが返ってくると(ステップS25)、input FIFO11にL7〜L0を順次出力ことにより(ステップS26〜S28)、CPU1から出力された入力データDinをラッチ21a〜21cにラッチさせる。一方、CPU1からのiDackの応答待ちの状態で、CPU1からiENDが出力されると(ステップS29)、出力回路14にjENDを出力する(ステップS30)。
【0030】
次に、input FIFO11のラッチ21a〜21cに8バイト分の入力データDinがラッチされると(ステップS28)、put信号を出力回路14に出力する(ステップS31)。次に、サーチ回路13から出力されたMatch Flagが1の場合(ステップS32)、shift modeを1に設定し、i−sftCLK及びs−sftCLKを最大一致長Match_len回だけ出力することにより、input FIFO11のラッチ21a〜21cにラッチされているデータiFD0〜iFD7をMatch_len回だけシフトさせるとともに、スライドFIFO12のラッチ31a〜31cにラッチされているデータSFD31〜SFD0をMatch_len回だけシフトさせる(ステップS33)。そして、countにMatch_lenを設定する(ステップS34)。一方、サーチ回路13から出力されたMatch Flagが0の場合(ステップS32)、shift modeを1に設定し、i−sftCLK及びs−sftCLKを1回だけ出力することにより、input FIFO11のラッチ21a〜21cにラッチされているデータiFD0〜iFD7を1回だけシフトさせるとともに、スライドFIFO12のラッチ31a〜31cにラッチされているデータSFD31〜SFD0を1回だけシフトさせる(ステップS35)。そして、countに1を設定する(ステップS36)。
【0031】
次に、input FIFO11のshift modeを0に設定し(ステップS37)、input FIFO11のセレクタ22a、22b、・・・をデータDinの入力モードに切り替える。次に、iDreqをCPU1に出力し(ステップS38)、CPU1からiDackが返ってくると(ステップS39)、input FIFO11にL(7−count)を出力することにより(ステップS40)、データシフトにより空になったL(7−count)番目のラッチ21a〜21cに新たな入力データDinをラッチさせる。以上の処理をinput FIFO11のシフトの回数countだけ行うことにより(ステップS41、S42)、データiFD0〜iFD7のシフトにより空になったラッチ21a〜21cをFillにする。ラッチ21a〜21cがFillになると、ステップS31に戻り、put信号を出力回路14に出力する。一方、CPU1からのiDackの応答待ちの状態で、CPU1からiENDが出力されると(ステップS43)、出力回路14にjENDを出力する(ステップS44)。
【0032】
図15は、図13の出力回路14のシーケンサ71の動作を示すフローチャートである。図15において、n=0に設定し(ステップS51)、シーケンサ15からput信号が出力されると(ステップS52)、F(7−n)及びLDnを出力する(ステップS53)。以上の処理を8ビット分のMatch_Flag及び8バイト分の圧縮データD0〜D7について行い(ステップS52〜s55)、8ビット分のMatch_Flagがラッチ73に格納されるとともに、8バイト分の圧縮データD0〜D7がラッチ74a〜74cに格納されると、これらの72bit分のデータをDoutとして出力し、KDreqをCPU1に出力する(ステップS56)。そして、CPU1がkDackを出力すると(ステップS57)、シーケンサ15からjENDが出力されるまで(ステップS58)、以上の出力動作を繰り返す。その後、シーケンサ15からjENDが出力されると、kENDをCPU1に出力し(ステップS59)、出力動作を終了する。
【0033】
以上説明したように、本発明の第1実施例に係わるデータ圧縮装置によれば、比較対象となる過去の入力データ列の全てのデータに対応したコンパレータをパラレルに配置することにより、比較サーチを1回で完了することが可能となり、処理を高速に行うことが可能になる。また、最長マッチング列を8バイトにすることにより、効率的な圧縮データを生成することが可能となる。
【0034】
次に、本発明の第2実施例に係わるデータ圧縮装置について説明する。第1実施例でのマッチング時の全データのシフトは、一致した文字数の回数だけ行われ、一致した文字数が多い場合には、データシフトに時間がかかる。そこで、本発明の第2実施例では、一致した文字数分のシフトを単純なシフトレジスタを用いて行う代わりに、バレルシフタを用いて行うことにより、複数文字数分のシフトを1回のシフト動作で行い、シフト動作を高速化する。
【0035】
図16は、本発明の第2実施例に係わるデータ圧縮装置のバレルシフタの構成例を示すブロック図である。図16において、バレルシフタには、nバイト前のフリップフロップ81a〜81cの出力を現在のフリップフロップ81dに設定するためのセレクタ82が設けられている。このバレルシフタを図6のinput FIFO11及び図7のスライドFIFO12に設ける。このことにより、i−sftCLK及びs−sftCLKを1回出力するだけで、input FIFO11のラッチ21a〜21cにラッチされているデータiFD0〜iFD7のシフトをMatch_len分だけ行うことが可能となるとともに、スライドFIFO12のラッチ31a〜31cにラッチされているデータSFD31〜SFD0のシフトをMatch_len分だけ行うことが可能となり、複数バイトのシフト処理を高速に行うことが可能となる。
【0036】
次に、本発明の第3実施例に係わるデータ圧縮装置について説明する。本発明の第1実施例では、余白部分についてのデータ圧縮を行うと、余白部分の8バイト分のデータが1バイト分のデータに圧縮される。しかし、余白部分では、同一データが数百バイト以上に渡って繰り返し出現することが多い。このため、余白部分については、第1実施例のデータ圧縮方法をそのまま適用したのでは、非効率である。そこで、本発明の第3実施例では、複数バイトに渡る同一データの繰り返しを検出するための追加回路を設ける。そして、余白部分等のリピートデータに対し、その繰り返し回数を符号化することにより、圧縮率の向上を図るようにする。
【0037】
図17は、本発明の第3実施例に係わるデータ圧縮方法を説明する図である。図17において、1バイト単位の入力データ列を、過去のデータ列と比較する。そして、現在の8バイト分の全ての入力データ列が過去の最後尾の入力データと一致するかどうか調べる。ここで、現在の8バイト分の全ての入力データ列が過去の最後尾の入力データと一致した場合、フラグデータを“1”に設定し、現在の入力データ列を8バイト分ずつシフトしながら、現在の8バイト分の全ての入力データ列が過去の最後尾の入力データと何回一致するかをカウントする。そして、その時のカウント値CNTを符号化する。
【0038】
ここで、繰り返しデータを符号化する場合、入力データを一致長len及び一致位置posで符号化する時に用いたデータ構造をそのまま採用する。すなわち、一致長lenの格納領域に繰り返しデータの識別情報を格納し、一致位置posの格納領域に8バイトデータの繰り返しのカウント値CNTを格納する。ここで、図1の符号化方法では、一致長len=1の場合は、生データがそのまま出力されるため、図11に示すように、一致長len=1の符号は使用されていない。そこで、一致長len=1の符号を余白部分の繰り返しデータを識別するために使用する。
【0039】
例えば、過去のデータ列(ヘキサで示す)の最後尾(出現位置0)が、“00”の状態で、現在のデータ列として、“00、00、00、00、00、00、00、00・・・”が入力されたものとする。そして、現在の8バイト分の全ての入力データ“00、00、00、00、00、00、00、00”と過去の最後尾の入力データ“00”との一致が確認されると、フラグデータの7ビット目を“1”に設定する。また、データD0の一致長lenの領域(上位3ビット)に1を格納し、データD0のカウント値CNTの領域(下位5ビット)に1を格納する。次に、現在の入力データ列を8バイト分だけシフトし、シフト後の現在の8バイト分の全ての入力データ列が過去の最後尾の入力データ“00”と一致するかどうかを調べる。そして、一致する場合は、データD0のカウント値CNTを1だけ増加させる。以上の動作を現在の8バイト分の全ての入力データ列が過去の最後尾の入力データと一致しなくなるまで続け、シフト後の現在の8バイト分の全ての入力データ列が過去の最後尾の入力データと一致する場合は、データD0のカウント値CNTを1ずつ増やしていく。現在の8バイト分の全ての入力データ列が過去の最後尾の入力データと一致しなくなると、データD0のカウント値CNTのカウントアップを終了し、その時の現在の入力データ列の符号をデータD1に格納する。以上の処理をデータD0〜D7について行い、1バイト分のフラグデータと8バイト分の圧縮データが1組となる72bitの出力データを生成する。
【0040】
このように、現在の入力データ列を8バイト分ずつシフトした時に、余白部分に対応する入力データ“00”が続く限りは、データD0のカウント値CNTが1ずつ増えるだけで、余白部分のデータを格納するためにデータD1〜D7の領域を使用する必要がない。このため、余白部分のデータ圧縮を効率的に行うことが可能となる。なお、図17の実施例では、カウント値CNTを格納する領域が5bit分しか用意されていないので、カウント値CNTが32以上になると、カウント値CNTをそれ以上アウントアップできないので、次のデータD1〜D7の領域に余白部分のデータを格納する必要がある。しかし、LZ符号を使用した場合に比べ、最大で32倍の圧縮効果がある。
【0041】
図18は、本発明の第3実施例に係わるデータ圧縮装置のコンパレータの構成例を示すブロック図である。このコンパレータは、現在の8バイト分の全ての入力データ列と過去の最後尾の入力データとが一致するかどうかを調べるためのものである。図18において、コンパレータ91には、input FIFO11から出力される現在の入力データiFD0〜iFD7とスライドFIFO12から出力される過去の最後尾の入力データSFD0とが供給される。そして、現在の全ての入力データiFD0〜iFD7が過去の最後尾の入力データSFD0と一致する場合、Rep−Flag=1に設定し、現在の全ての入力データiFD0〜iFD7が過去の最後尾の入力データSFD0と一致しない場合、Rep−Flag=0に設定する。
【0042】
図19は、本発明の第3実施例に係わるデータ圧縮装置の出力回路の構成例を示すブロック図である。図19において、出力回路14’は、図13の出力回路14に対し、セレクタ101〜103、加算器104、コンパレータ105、インバータ106及びAND回路107が新たに設けられており、図18のコンパレータ91から出力されるRep−Flagの値がシーケンサ71’及びセレクタ101に供給される。
【0043】
シーケンサ71’は、まず、Sel_Repinc=0に設定する。そして、Rep−Flag=0の場合、セレクタ101、102により、セレクタ72’からの出力データが選択される。そして、Match−Flagの値に応じて、最大一致長Match_len及び最長一致位置Match_posまたは生データDthruがラッチ74a’〜74c’に供給される。
【0044】
一方、Sel_Repinc=0の時にRep−Flag=1になると、セレクタ101、102により、“00100001”という8ビットデータが選択される。そして、LDnを出力することにより、n番目のラッチ74a’〜74c’にこの8ビットデータが格納される。ここで、この8ビットデータの上位3ビットは繰り返しデータの識別情報を表し、下位5ビットは8バイトデータの繰り返し回数CNTを表している。従って、“00100001”という8ビットデータをラッチ74a’〜74c’に格納することにより、8バイトデータの繰り返しデータが1回出現したという情報が記憶される。
【0045】
次に、シーケンサ15からput信号が出力された時にRep−Flagが1の場合、シーケンサ71’は、Sel_Repinc=1に設定するとともに、Sel_D=nに設定し、LDnを出力する。このことにより、n番目のラッチ74a’〜74c’にラッチされているデータDnがセレクタ103により選択され、加算器104によりデータDnに1が加算される。そして、データDnに1を加算した値がセレクタ102により選択され、その加算結果がn番目のラッチ74a’〜74c’にラッチされる。このことにより、n番目のラッチ74a’〜74c’にラッチされているデータDnの繰り返し回数CNTを1だけ増加させることができる。ここで、コンパレータ105は加算器104から出力された加算結果を監視し、Dnに格納されている繰り返し回数CNTが32に達すると、そのことをAND回路107を介してシーケンサ71’に伝える。シーケンサ71’は、Dnに格納されている繰り返し回数CNTが32に達したという知らせを受けると、n+1番目のラッチ74a’〜74c’に対して以上の動作を行う。そして、8ビット分のMatch_Flagがラッチ73’に格納されるとともに、8バイト分の圧縮データD0〜D7がラッチ74a’〜74c’に格納されると、これらの72bit分のデータをDoutとして出力するとともに、KDreqをCPU1に出力する。
【0046】
図20は、図19の出力回路14’のシーケンサ71’の動作を示すフローチャートである。図20において、Sel_Repinc=0に設定し(ステップS61)、n=0に設定する(ステップS62)。次に、シーケンサ15からput信号が出力されると(ステップS63)、Rep−Flag=1かどうかを判断し(ステップS64)、Rep−Flag=0の場合、F(7−n)及びLDnを出力する(ステップS65)。以上の処理を8ビット分のMatch_Flag及び8バイト分の圧縮データD0〜D7について行い(ステップS63〜s67)、8ビット分のMatch_Flagがラッチ73’に格納されるとともに、8バイト分の圧縮データD0〜D7がラッチ74a’〜74c’に格納されると、これらの72bit分のデータをDoutとして出力し、KDreqをCPU1に出力する(ステップS68)。
【0047】
一方、ステップS64において、Rep−Flag=1の場合、Sel_Repinc=0に設定し(ステップS72)、F(7−n)及びLDnを出力する(ステップS73)。次に、シーケンサ15からput信号が出力されると(ステップS74)、Rep−Flag=1かつDnのCNTが32より小さいかどうかを判断する(ステップS75)。そして、Rep−Flag=1かつDnのCNTが32より小さい場合は、Sel_D=n、Sel_Repinc=1に設定する(ステップS76)。Sel_D=n、Sel_Repinc=1に設定することにより、ラッチ74a’〜74c’に格納されているD0〜D7のうちのDnがセレクタ103により選択され、加算器104で1だけ加算された値がセレクタ102で選択され、ラッチ74a’〜74c’に戻される。そして、LDnを出力することにより(ステップS77)、Dnに1を加算した値がDnを格納していたラッチ74a’〜74c’にラッチされる。以上の動作をシーケンサ15からput信号が出力される度に行い、Rep−Flag=0になるかまたはDnのCNTが32以上になると、ステップS66に進み、nを1だけ増加させる。一方、ステップS74において、put信号の出力の待機中に、シーケンサ15からjENDが出力されると(ステップS78)、kENDをCPU1に出力し(ステップS71)、出力動作を終了する。
【0048】
次に、CPU1がkDackを出力すると(ステップS69)、シーケンサ15からjENDが出力されるまで(ステップS70)、以上の出力動作を繰り返す。そして、シーケンサ15からjENDが出力されると、kENDをCPU1に出力し(ステップS71)、出力動作を終了する。
【0049】
なお、上述した実施例では、データ圧縮について説明したが、データ伸張に適用するようにしてもよい。また、上述した実施例では、8bitのデータを8バイトずつ処理する例について示したが、これ以外であってもよい。また、上述した実施例では、現在の8バイト分のデータを過去の32バイト分のデータと比較する場合について示したが、これ以外であってもよい。例えば、現在の16バイト分のデータを過去の64バイト分のデータと比較するようにしてもよい。
【0050】
【発明の効果】
以上説明したように、本発明によれば、比較対象となる過去の入力データの全ての出現位置に対応した比較手段を設けることにより、現在の入力データと過去の入力データとの比較を過去の入力データの全ての出現位置に対して同時に行うことが可能となり、LZ符号における最長一致長及び最長一致位置を過去のデータ列と現在の入力データ列との1回の比較動作により求めることが可能となることから、LZ符号によるデータ圧縮を高速に行うことが可能となる。
【0051】
また、本発明の一態様によれば、一致長及び出現位置を格納する領域のビット長を入力データのビット長と一致させることにより、生データとLZ符号とを同一のデータフォーマット上で混在させて出力することが可能となり、データ圧縮を効率的に行うことが可能となる。
【0052】
また、本発明の一態様によれば、過去のデータ列及び現在の入力データ列の一致長分のシフトを、バレルシフタを用いて行うことにより、過去の入力データ列及び現在の入力データ列の一致長分のシフトを1度に行うことが可能となり、LZ符号によるデータ圧縮を高速に行うことが可能となる。
【0053】
また、本発明の一態様によれば、同一の入力データ列の繰り返し回数を入力データ列の符号として出力することにより、プリント時の余白部分のデータ圧縮を効率的に行うことが可能となる。
【図面の簡単な説明】
【図1】本発明の第1実施例に係わるデータ圧縮方法を説明する図である。
【図2】本発明の一実施例に係わるデータ圧縮装置のシステム構成を示すブロック図である。
【図3】図2のデータ圧縮装置のデータ入力シーケンスを示すフローチャートである。
【図4】図2のデータ圧縮装置のデータ出力シーケンスを示すフローチャートである。
【図5】本発明の第1実施例に係わるデータ圧縮装置の圧縮回路の構成を示すブロック図である。
【図6】図5の圧縮回路のinput FIFOの構成例を示すブロック図である。
【図7】図5の圧縮回路のスライドFIFOの構成例を示すブロック図である。
【図8】図5の圧縮回路のサーチ回路の構成例を示すブロック図である。
【図9】図5の圧縮回路の比較部の構成例を示すブロック図である。
【図10】図9の比較部のコンパレータの構成例を示すブロック図である。
【図11】図10のコンパレータの出力データの一例を示す図である。
【図12】図8のサーチ回路のプライオリティエンコーダの構成例を示すブロック図である。
【図13】図5の圧縮回路6の出力回路14の構成例を示すブロック図である。
【図14】図5の圧縮回路6のシーケンサ15の動作を示すフローチャートである。
【図15】図13の出力回路14のシーケンサ71の動作を示すフローチャートである。
【図16】本発明の第2実施例に係わるデータ圧縮装置のバレルシフタの構成例を示すブロック図である。
【図17】本発明の第3実施例に係わるデータ圧縮方法を説明する図である。
【図18】本発明の第3実施例に係わるデータ圧縮装置のコンパレータの構成例を示すブロック図である。
【図19】本発明の第3実施例に係わるデータ圧縮装置の出力回路の構成例を示すブロック図である。
【図20】図19の出力回路14’のシーケンサ71’の動作を示すフローチャートである。
【符号の説明】
1 CPU
2 プログラム
3 RAM
4、5 I/Oポート
6 圧縮回路
11 input FIFO
12 スライド FIFO
13 サーチ回路
14、14’ 出力回路
15、71 シーケンサ
21a〜21c、31a〜31c、81a〜81d フリップフロップ
22a、22b、72、82、72’、101〜103 セレクタ
41 比較部
42 プライオリティエンコーダ
51a〜51c、62、91、105 コンパレータ
61 最大一致長算出部
73、74a〜74c、73’、74a’〜74c’ ラッチ
104 加算器
106 インバータ
107 AND回路[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a data compression apparatus, and is particularly suitable for application to high-speed compression processing using a Ziv-Lempel code (LZ code).
[0002]
[Prior art]
In the conventional LZ encoding, there is one in which the appearance position of past data is searched using a hash table. In addition, there has been a method of speeding up the compression processing by using a hard comparator system that compares past data and input data in units of 1 byte.
[0003]
[Problems to be solved by the invention]
However, the hash table method has a problem that the processing speed is slow. In addition, the hard comparator method is a comparison in units of 1 byte, and there is a problem that processing cannot be performed at a processing speed higher than the operation clock. Further, the conventional method has a problem that the maximum compression rate of the blank area at the time of printing is low.
[0004]
Therefore, an object of the present invention is to provide a data compression apparatus capable of performing data compression at high speed.
[0005]
[Means for Solving the Problems]
In order to solve the above-described problem, according to the present invention, comparison means corresponding to all appearance positions of past input data to be compared is provided.According to one aspect of the present invention, the number of repetitions of the same input data string is output as a code of the input data string.
[0006]
As a result, the longest match length and the longest match position can be obtained from the past data string by one-time comparison operation between the past input data string and the current input data string. When determining the coincidence position, it is not necessary to repeatedly perform comparison processing while changing the appearance positions of past data strings one by one, so that data compression using the LZ code can be performed at high speed.Furthermore, since the same input data string is repeated for the blank portion at the time of printing, it is possible to efficiently perform the data compression of the blank portion.
[0007]
According to one aspect of the present invention, the bit length of the data area storing the longest match length and the longest match position is the same as the bit length of the input data.
As a result, when the current input data string and the past input data string match, an LZ code is output. When the current input data string and the past input data string do not match, the current input data remains unchanged. Even when the data is output, the raw data and the LZ code can be output on the same data format, and efficient data compression can be performed.
[0008]
Further, according to one aspect of the present invention, a shift corresponding to the coincidence length of past input data and current input data is performed using a barrel shifter.
As a result, it is possible to shift the matching length of the past data string and the current input data string at a time, and it is possible to perform data compression using the LZ code at high speed.
[0010]
DETAILED DESCRIPTION OF THE INVENTION
A data compression apparatus according to an embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a diagram for explaining a data compression method according to the first embodiment of the present invention. In FIG. 1, an input data string in units of 1 byte is compared with a past input data string. If there is a past input data string that matches the current input data string, flag data indicating whether or not they match is set to “1”. Then, the longest match length of the portions that match the input data string is replaced with the match position pos and the match length len.
[0011]
For example, “02, 05, 08, 0C, 0B, 0A, 03, 04, 05,...” Is input as the past input data string (indicated by hex), and “0A” is input as the current input data string. , 0B, 0C, 1A, 1B, 0D,... ”Are input, the current input data string is compared with the past input data string. If the longest match data is limited to 8 bytes, 1 byte of flag data and 8 bytes of data D0 to D7 are prepared. Link with bit value. Then, if the “0A, 0B, 0C” portion of the current data string matches the past data string, the seventh bit of the flag data is set to “1”. Further, the upper 3 bits of the data D0 are assigned to the match length len, and the lower 5 bits of the data D0 are assigned to the match position pos, and the match position pos = 5 and a code representing the matching length len = 3 are output as data D0.
[0012]
Next, the current input data string and the past input data string are shifted by the matching length len = 3. Then, the current input data string “1A, 1B, 0D,...” After the shift is replaced with the past input data string “0C, 0B, 0A, 03, 04, 05,. Compare with Here, the data “1A” in the current input data string does not match any data in the past data string. In this case, the sixth bit of the flag data is set to “0” and the code of “1A” of the current input data string is output as data D1 as it is. “1A” is 1-byte data, and the data indicating the match length len and the match position pos is also 1 byte. For this reason, it becomes possible to use the areas of data D0 to D7 storing data indicating the match length len and the match position pos when the input data is stored as it is in the data D0 to D7. It can be used effectively. The above processing is performed on the data D0 to D7 to generate 72-bit output data in which 1-byte flag data and 8-byte compressed data form one set.
[0013]
FIG. 2 is a block diagram showing a system configuration of a data compression apparatus according to an embodiment of the present invention. In FIG. 2, a
[0014]
FIG. 3 is a flowchart showing a data input sequence of the data compression apparatus of FIG. In FIG. 3, every time there is an iDreq (data input request) from the compression circuit 6 (step S1), the
[0015]
FIG. 4 is a flowchart showing a data output sequence of the data compression apparatus of FIG. In FIG. 4, every time there is a kDreq (data output request) from the compression circuit 6 (step S11), the
[0016]
FIG. 5 is a block diagram showing the configuration of the
[0017]
The
[0018]
Here, the
[0019]
The
[0020]
The
[0021]
FIG. 6 is a block diagram showing a configuration example of the
[0022]
FIG. 7 is a block diagram showing a configuration example of the
[0023]
FIG. 8 is a block diagram showing a configuration example of the
[0024]
FIG. 9 is a block diagram illustrating a configuration example of the
As described above, the
[0025]
FIG. 10 is a block diagram illustrating a configuration example of the comparator 51c of the
[0026]
FIG. 11 is a diagram illustrating an example of output data of the comparator 51c in FIG. In FIG. 11, the number of matched bytes is encoded as a match length len and output. Here, since 1-byte match has no compression effect, 0 is output.
[0027]
FIG. 12 is a block diagram showing a configuration example of the
[0028]
Each time the put signal is output from the
[0029]
FIG. 14 is a flowchart showing the operation of the
[0030]
Next, when 8-byte input data Din is latched in the
[0031]
Next, the shift mode of the
[0032]
FIG. 15 is a flowchart showing the operation of the
[0033]
As described above, according to the data compression apparatus according to the first embodiment of the present invention, the comparison search is performed by arranging in parallel the comparators corresponding to all the data of the past input data string to be compared. It can be completed in one time, and processing can be performed at high speed. Further, by making the
[0034]
Next, a data compression apparatus according to the second embodiment of the present invention is described. The shift of all data during matching in the first embodiment is performed as many times as the number of matched characters. If the number of matched characters is large, it takes time to shift the data. Therefore, in the second embodiment of the present invention, instead of using a simple shift register to shift the number of matched characters, a barrel shifter is used to perform a shift for a plurality of characters in a single shift operation. Speed up the shift operation.
[0035]
FIG. 16 is a block diagram showing a configuration example of the barrel shifter of the data compression apparatus according to the second embodiment of the present invention. In FIG. 16, the barrel shifter is provided with a
[0036]
Next, a data compression apparatus according to the third embodiment of the present invention is described. In the first embodiment of the present invention, when data compression is performed on the blank portion, the 8-byte data in the blank portion is compressed into 1-byte data. However, in the margin part, the same data often appears repeatedly over several hundred bytes. For this reason, it is inefficient to apply the data compression method of the first embodiment as it is to the blank portion. Therefore, in the third embodiment of the present invention, an additional circuit for detecting repetition of the same data over a plurality of bytes is provided. Then, the repetition rate is encoded with respect to repeat data such as a blank portion, thereby improving the compression rate.
[0037]
FIG. 17 is a diagram for explaining a data compression method according to the third embodiment of the present invention. In FIG. 17, the input data string in 1-byte units is compared with the past data string. Then, it is checked whether or not all the current 8-byte input data strings match the last input data in the past. Here, when all the current 8-byte input data strings match the last input data in the past, the flag data is set to “1”, and the current input data string is shifted by 8 bytes. The number of times the current input data string for 8 bytes matches the last input data in the past is counted. Then, the count value CNT at that time is encoded.
[0038]
Here, when encoding repetitive data, the data structure used when encoding the input data with the matching length len and the matching position pos is used as it is. That is, the identification information of repeated data is stored in the storage area of the matching length len, and the repeated count value CNT of 8-byte data is stored in the storage area of the matching position pos. Here, in the encoding method of FIG. 1, since the raw data is output as it is when the match length len = 1, the code with the match length len = 1 is not used as shown in FIG. 11. Therefore, a code with a matching length len = 1 is used to identify repetitive data in the blank portion.
[0039]
For example, the last data string (indicated by hex) (appearance position 0) is “00” and the current data string is “00, 00, 00, 00, 00, 00, 00, 00”. "..." is input. When it is confirmed that all the input data “00, 00, 00, 00, 00, 00, 00, 00” for the current 8 bytes matches the last input data “00” in the past, The seventh bit of data is set to “1”. Further, 1 is stored in the area (upper 3 bits) of the match length len of the data D0, and 1 is stored in the area (lower 5 bits) of the count value CNT of the data D0. Next, the current input data string is shifted by 8 bytes, and it is checked whether or not all the input data strings for the current 8 bytes after the shift match the last input data “00” in the past. If they match, the count value CNT of the data D0 is increased by 1. The above operation is continued until all input data strings for the current 8 bytes do not coincide with the last input data in the past, and all the input data strings for the current 8 bytes after the shift are in the last of the past. If it matches the input data, the count value CNT of the data D0 is incremented by one. When all the current 8-byte input data strings do not coincide with the last input data in the past, the count-up of the count value CNT of the data D0 is finished, and the sign of the current input data string at that time is the data D1. To store. The above processing is performed on the data D0 to D7 to generate 72-bit output data in which 1-byte flag data and 8-byte compressed data form one set.
[0040]
As described above, when the current input data string is shifted by 8 bytes, as long as the input data “00” corresponding to the blank portion continues, the count value CNT of the data D0 only increases by one, and the blank portion data. For storing the data D1 to D7. For this reason, it is possible to efficiently perform the data compression of the margin part. In the embodiment of FIG. 17, only 5 bits are prepared for storing the count value CNT. Therefore, when the count value CNT is 32 or more, the count value CNT cannot be incremented any more, so the next data D1 It is necessary to store the margin data in the area of D7. However, the compression effect is 32 times as much as the case of using the LZ code.
[0041]
FIG. 18 is a block diagram showing a configuration example of a comparator of a data compression apparatus according to the third embodiment of the present invention. This comparator is for checking whether or not all the current 8-byte input data strings match the last input data in the past. In FIG. 18, the
[0042]
FIG. 19 is a block diagram showing a configuration example of the output circuit of the data compression apparatus according to the third embodiment of the present invention. 19, the
[0043]
The
[0044]
On the other hand, when Rep-Flag = 1 when Sel_Repin = 0, the
[0045]
Next, when Rep-Flag is 1 when the put signal is output from the
[0046]
FIG. 20 is a flowchart showing the operation of the sequencer 71 'of the output circuit 14' of FIG. In FIG. 20, Sel_Repin = 0 is set (step S61), and n = 0 is set (step S62). Next, when a put signal is output from the sequencer 15 (step S63), it is determined whether Rep-Flag = 1 (step S64). If Rep-Flag = 0, F (7-n) and LDn are set. Output (step S65). The above processing is performed on 8-bit Match_Flag and 8-byte compressed data D0 to D7 (steps S63 to S67), and 8-bit Match_Flag is stored in the
[0047]
On the other hand, if Rep-Flag = 1 in step S64, Sel_Repin = 0 is set (step S72), and F (7-n) and LDn are output (step S73). Next, when the put signal is output from the sequencer 15 (step S74), it is determined whether Rep-Flag = 1 and CNT of Dn is smaller than 32 (step S75). If Rep-Flag = 1 and CNT of Dn is smaller than 32, Sel_D = n and Sel_Repin = 1 are set (step S76). By setting Sel_D = n and Sel_Repin = 1, Dn among D0 to D7 stored in the latches 74a ′ to 74c ′ is selected by the
[0048]
Next, when the
[0049]
In the above-described embodiment, data compression has been described. However, it may be applied to data expansion. In the above-described embodiment, an example in which 8-bit data is processed in units of 8 bytes has been described. In the above-described embodiment, the case where the current 8-byte data is compared with the past 32-byte data is shown, but other data may be used. For example, the current 16 bytes of data may be compared with the past 64 bytes of data.
[0050]
【The invention's effect】
As described above, according to the present invention, the comparison between the current input data and the past input data is performed in the past by providing the comparison means corresponding to all the appearance positions of the past input data to be compared. It is possible to perform simultaneously on all appearance positions of the input data, and the longest match length and the longest match position in the LZ code can be obtained by a single comparison operation between the past data string and the current input data string. Therefore, data compression using the LZ code can be performed at high speed.
[0051]
Also, according to one aspect of the present invention, the raw data and the LZ code are mixed on the same data format by matching the bit length of the area storing the match length and the appearance position with the bit length of the input data. Output, and data compression can be performed efficiently.
[0052]
Further, according to one aspect of the present invention, the past input data string and the current input data string are matched by performing a shift corresponding to the matching length of the past data string and the current input data string by using the barrel shifter. A long shift can be performed at a time, and data compression by the LZ code can be performed at high speed.
[0053]
Also, according to one aspect of the present invention, it is possible to efficiently compress the data in the blank portion during printing by outputting the number of repetitions of the same input data string as the code of the input data string.
[Brief description of the drawings]
FIG. 1 is a diagram for explaining a data compression method according to a first embodiment of the present invention.
FIG. 2 is a block diagram showing a system configuration of a data compression apparatus according to an embodiment of the present invention.
FIG. 3 is a flowchart showing a data input sequence of the data compression apparatus of FIG. 2;
4 is a flowchart showing a data output sequence of the data compression apparatus of FIG. 2;
FIG. 5 is a block diagram showing a configuration of a compression circuit of the data compression apparatus according to the first embodiment of the present invention.
6 is a block diagram illustrating a configuration example of an input FIFO of the compression circuit in FIG. 5;
7 is a block diagram illustrating a configuration example of a slide FIFO of the compression circuit of FIG. 5;
8 is a block diagram illustrating a configuration example of a search circuit of the compression circuit of FIG. 5;
9 is a block diagram illustrating a configuration example of a comparison unit of the compression circuit of FIG. 5;
10 is a block diagram illustrating a configuration example of a comparator of the comparison unit in FIG. 9;
11 is a diagram illustrating an example of output data of the comparator in FIG. 10;
12 is a block diagram illustrating a configuration example of a priority encoder of the search circuit in FIG. 8. FIG.
13 is a block diagram illustrating a configuration example of an
14 is a flowchart showing the operation of the
15 is a flowchart showing the operation of the
FIG. 16 is a block diagram showing a configuration example of a barrel shifter of a data compression apparatus according to a second embodiment of the present invention.
FIG. 17 is a diagram for explaining a data compression method according to a third embodiment of the present invention.
FIG. 18 is a block diagram illustrating a configuration example of a comparator of a data compression apparatus according to a third embodiment of the present invention.
FIG. 19 is a block diagram showing a configuration example of an output circuit of a data compression apparatus according to a third embodiment of the present invention.
20 is a flowchart showing the operation of the sequencer 71 'of the output circuit 14' of FIG.
[Explanation of symbols]
1 CPU
2 programs
3 RAM
4, 5 I / O port
6 Compression circuit
11 input FIFO
12 slide FIFO
13 Search circuit
14, 14 'output circuit
15, 71 Sequencer
21a-21c, 31a-31c, 81a-81d flip-flop
22a, 22b, 72, 82, 72 ', 101-103 selector
41 comparison part
42 priority encoder
51a to 51c, 62, 91, 105 comparator
61 Maximum match length calculator
73, 74a-74c, 73 ', 74a'-74c' Latch
104 adder
106 Inverter
107 AND circuit
Claims (3)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP14850199A JP3610381B2 (en) | 1999-05-27 | 1999-05-27 | Data compression device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP14850199A JP3610381B2 (en) | 1999-05-27 | 1999-05-27 | Data compression device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2000339138A JP2000339138A (en) | 2000-12-08 |
JP3610381B2 true JP3610381B2 (en) | 2005-01-12 |
Family
ID=15454182
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP14850199A Expired - Fee Related JP3610381B2 (en) | 1999-05-27 | 1999-05-27 | Data compression device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3610381B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8134483B2 (en) | 2009-09-15 | 2012-03-13 | Ricoh Company, Ltd. | Data processing apparatus and method |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012134929A (en) * | 2010-12-24 | 2012-07-12 | Ricoh Co Ltd | Image processing system and image processing method |
-
1999
- 1999-05-27 JP JP14850199A patent/JP3610381B2/en not_active Expired - Fee Related
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8134483B2 (en) | 2009-09-15 | 2012-03-13 | Ricoh Company, Ltd. | Data processing apparatus and method |
Also Published As
Publication number | Publication date |
---|---|
JP2000339138A (en) | 2000-12-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5103451A (en) | Parallel cyclic redundancy check circuit | |
JP5251799B2 (en) | Data processing apparatus and data processing method | |
EP0688104A2 (en) | Data compression method and apparatus | |
KR100426712B1 (en) | Viterbi decoder | |
JP2746109B2 (en) | Huffman code decoding circuit | |
US5081608A (en) | Apparatus for processing record-structured data by inserting replacement data of arbitrary length into selected data fields | |
JPS632464A (en) | Coupling output circuit for variable length data | |
US4570221A (en) | Apparatus for sorting data words on the basis of the values of associated parameters | |
JP3610381B2 (en) | Data compression device | |
JPH07170200A (en) | Cyclic redundancy check synchronizer | |
JP6613019B2 (en) | Device for searching for patterns | |
US7528748B2 (en) | Serial data receiving circuit and serial data receiving method | |
JP3271120B2 (en) | Device for fast multiplication of binary numbers | |
JP4057876B2 (en) | Control method of Galois field multiplier | |
CN110798223A (en) | Minimum run length switching point mark coding compression method and device | |
JPH04225627A (en) | Method and device for sequentially decoding digital stream coded by convolution error correction code | |
JP3917357B2 (en) | Non-linear conversion method, computer-readable recording medium storing program, and non-linear conversion device | |
JP2005175940A (en) | Data compressor | |
JPH11102284A (en) | Method and circuit for selection | |
JPH0653845A (en) | Viterbi decoder | |
JP2002217874A (en) | Device and method for detecting error and synchronism | |
JPH0738447A (en) | Run length extract method in huffman coding and huffman code conversion method and mh code processing method | |
JPH08340342A (en) | Method for verifying checksum in received data block and implementing method therefor | |
JP2690175B2 (en) | Unequal length code decoding circuit | |
JP3482820B2 (en) | Data encoding method, data encoding device, data decoding method, and data decoding device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040203 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040405 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20040914 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040927 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20071029 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081029 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091029 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091029 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101029 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101029 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111029 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111029 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121029 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121029 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131029 Year of fee payment: 9 |
|
LAPS | Cancellation because of no payment of annual fees |