|
LHA Library for Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp.gr.java_conf.dangan.util.lha.SimpleSearch
public class SimpleSearch
特別な検索機構を用いない
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 Summary | |
---|---|
SimpleSearch(int DictionarySize,
int MaxMatch,
int Threshold,
byte[] TextBuffer)
特別な検索機構を用いないシンプルな LzssSearchMethod を構築する。 |
Method Summary | |
---|---|
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 だけ移動させる際に検索機構内のデータを それらと矛盾無く移動させる処理を行う。 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer)
DictionarySize
- 辞書サイズMaxMatch
- 最大一致長Threshold
- 圧縮、非圧縮の閾値TextBuffer
- LZSS圧縮を施すためのバッファMethod Detail |
---|
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
|
LHA Library for Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |