|
LHA Library for Java | ||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectjp.gr.java_conf.dangan.util.lha.HashAndChainedListSearch
ハッシュと単方向連結リストを使って高速化された LzssSearchMethod。
検索を打ち切ることによる高速化も行っているため、
必ず最長一致を見つけることが出来るとは限らない。
-- revision history -- $Log: HashAndChainedListSearch.java,v $ Revision 1.0 2002/08/05 00:00:00 dangan add to version control [change] LzssSearchMethod のインタフェイス変更にあわせてインタフェイス変更 [improvement] ar940528 の TEST5相当 の実装に変更。 [maintenance] ソース整備 タブ廃止 ライセンス文の修正
コンストラクタの概要 | |
HashAndChainedListSearch(int DictionarySize,
int MaxMatch,
int Threshold,
byte[] TextBuffer)
ハッシュと連結リストを使用した LzssSearchMethod を構築する。 |
|
HashAndChainedListSearch(int DictionarySize,
int MaxMatch,
int Threshold,
byte[] TextBuffer,
int SearchLimitCount)
ハッシュと連結リストを使用した LzssSearchMethod を構築する。 |
|
HashAndChainedListSearch(int DictionarySize,
int MaxMatch,
int Threshold,
byte[] TextBuffer,
String HashMethodClassName)
ハッシュと連結リストを使用した LzssSearchMethod を構築する。 |
|
HashAndChainedListSearch(int DictionarySize,
int MaxMatch,
int Threshold,
byte[] TextBuffer,
String HashMethodClassName,
int SearchLimitCount)
ハッシュと連結リストを使用した LzssSearchMethod を構築する。 |
メソッドの概要 | |
void |
put(int position)
position から始まるデータパタンを ハッシュと連結リストから成る検索機構に登録する。 |
int |
putRequires()
put() で LzssSearchMethodにデータを 登録するときに使用されるデータ量を得る。 |
int |
search(int position,
int lastPutPos)
ハッシュと連結リストを使用した検索機構に登録された データパタンを検索し position から始まるデータパタンと 最長の一致を持つものを得る。 |
int |
searchAndPut(int position)
ハッシュと連結リストから成る検索機構に登録された データパタンから position から始まるデータパタンと 最長の一致を持つものを検索し、 同時に position から始まるデータパタンを ハッシュと連結リストから成る検索機構に登録する。 |
int |
searchAndPut(int position,
int[] matchposs)
より良い LZSS 圧縮のための選択肢を提供する searchAndPut()。 |
void |
slide()
TextBuffer内のpositionまでのデータを 前方へ移動する際、それに応じて SearchMethod内の データも TextBuffer内のデータと矛盾しないように 前方へ移動する処理を行う。 |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
public HashAndChainedListSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer)
DictionarySize
- 辞書サイズMaxMatch
- 最長一致長Threshold
- 圧縮、非圧縮の閾値TextBuffer
- LZSS圧縮を施すためのバッファpublic HashAndChainedListSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, int SearchLimitCount)
DictionarySize
- 辞書サイズMaxMatch
- 最長一致長Threshold
- 圧縮、非圧縮の閾値TextBuffer
- LZSS圧縮を施すためのバッファSearchLimitCount
- 探索試行回数の上限
IllegalArgumentException
- SearchLimitCount が0以下の場合public HashAndChainedListSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, String HashMethodClassName)
DictionarySize
- 辞書サイズMaxMatch
- 最長一致長Threshold
- 圧縮、非圧縮の閾値TextBuffer
- LZSS圧縮を施すためのバッファHashMethodClassName
- Hash関数を提供するクラス名
NoClassDefFoundError
- HashMethodClassName で与えられたクラスが
見つからない場合。
InstantiationError
- HashMethodClassName で与えられたクラスが
abstract class であるためインスタンスを生成できない場合。
NoSuchMethodError
- HashMethodClassName で与えられたクラスが
コンストラクタ HashMethod( byte[] )を持たない場合public HashAndChainedListSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, String HashMethodClassName, int SearchLimitCount)
DictionarySize
- 辞書サイズMaxMatch
- 最長一致長Threshold
- 圧縮、非圧縮の閾値TextBuffer
- LZSS圧縮を施すためのバッファHashMethodClassName
- Hash関数を提供するクラス名SearchLimitCount
- 探索試行回数の上限
IllegalArgumentException
- SearchLimitCount が0以下の場合
NoClassDefFoundError
- HashMethodClassName で与えられたクラスが
見つからない場合。
InstantiationError
- HashMethodClassName で与えられたクラスが
abstract class であるためインスタンスを生成できない場合。
NoSuchMethodError
- HashMethodClassName で与えられたクラスが
コンストラクタ HashMethod( byte[] )を持たない場合メソッドの詳細 |
public void put(int position)
LzssSearchMethod
内の put
position
- TextBuffer内のデータパタンの開始位置public int searchAndPut(int position)
LzssSearchMethod
内の searchAndPut
position
- TextBuffer内のデータパタンの開始位置。
LzssOutputStream.createSearchReturn(int,int)
,
LzssOutputStream.NOMATCH
public int search(int position, int lastPutPos)
LzssSearchMethod
内の search
position
- TextBuffer内のデータパタンの開始位置。lastPutPos
- 最後に登録したデータパタンの開始位置。
LzssOutputStream.createSearchReturn(int,int)
,
LzssOutputStream.NOMATCH
public void slide()
LzssSearchMethod
内の slide
public int putRequires()
LzssSearchMethod
内の putRequires
public int searchAndPut(int position, int[] matchposs)
position
- 検索対象のデータパタンの開始位置matchposs
- 一致位置の列挙を格納して返すための配列
|
LHA Library for Java | ||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |