public class SimpleSearch extends java.lang.Object implements LzssSearchMethod
-- revision history -- $Log: SimpleSearch.java,v $ Revision 1.0 2002/08/05 00:00:00 dangan add to version control [change] LzssSearchMethod のインタフェイス変更にあわせてインタフェイス変更。 [maintenance] ソース整備 タブ廃止 ライセンス文の修正
Constructor and Description |
---|
SimpleSearch(int DictionarySize,
int MaxMatch,
int Threshold,
byte[] TextBuffer)
特別な検索機構を用いないシンプルな
LzssSearchMethod を構築する。
|
Modifier and Type | Method and Description |
---|---|
void |
put(int position)
SimpleSearch は検索機構を使用しないため
このメソッドは何もしない。
|
int |
putRequires()
SimpleSearch は検索機構を使用しないため常に 0 を返す。
|
int |
search(int position,
int lastPutPos)
TextBuffer 内の辞書領域にあるデータパタンから
position から始まるデータパタンと
最長の一致を持つものを検索する。
|
int |
searchAndPut(int position)
TextBuffer 内の辞書領域にあるデータパタンから
position から始まるデータパタンと
最長の一致を持つものを検索する。
|
void |
slide()
LzssOutputStream が slide() でTextBuffer内のデータを
DictionarySize だけ移動させる際に検索機構内のデータを
それらと矛盾無く移動させる処理を行う。
|
public SimpleSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer)
DictionarySize
- 辞書サイズMaxMatch
- 最大一致長Threshold
- 圧縮、非圧縮の閾値TextBuffer
- LZSS圧縮を施すためのバッファpublic void put(int position)
put
in interface LzssSearchMethod
position
- TextBuffer内のデータパタンの開始位置public int searchAndPut(int position)
searchAndPut
in interface LzssSearchMethod
position
- TextBuffer内のデータパタンの開始位置。LzssOutputStream.createSearchReturn(int,int)
,
LzssOutputStream.NOMATCH
public int search(int position, int lastPutPos)
search
in interface LzssSearchMethod
position
- TextBuffer内のデータパタンの開始位置。lastPutPos
- 最後に登録したデータパタンの開始位置。LzssOutputStream.createSearchReturn(int,int)
,
LzssOutputStream.NOMATCH
public void slide()
slide
in interface LzssSearchMethod
public int putRequires()
putRequires
in interface LzssSearchMethod
When you found typographical errors or omissions, Please mail to cqw10305@nifty.com
The company name and product name which are used in this document, it is the trademark or registered trademark of each company generally.
Copyright © 2001-2002 Michel Ishizuka. All Rights Reserved.