|
LHA Library for Java | ||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
java.lang.Objectjp.gr.java_conf.dangan.util.lha.HashAndBinaryTreeSearch
ハッシュと二分木を使った LzssSearchMethod の実装。
データ圧縮ハンドブック[改定第二版]
M.ネルソン/J.-L.ゲィリー 著
萩原剛志・山口英 訳
ISBN4-8101-8605-9
5728円(税抜き,当方の購入当時の価格)
を参考にした。
-- revision history --
$Log: HashAndBinaryTreeSearch.java,v $
Revision 1.0 2002/08/05 00:00:00 dangan
add to version control
[change]
LzssSearchMethod のインタフェイス変更にあわせてインタフェイス変更
[maintenance]
ソース整備
タブ廃止
ライセンス文の修正
| コンストラクタの概要 | |
HashAndBinaryTreeSearch(int DictionarySize,
int MaxMatch,
int Threshold,
byte[] TextBuffer)
ハッシュと二分木を使用した検索機構を構築する。 |
|
HashAndBinaryTreeSearch(int DictionarySize,
int MaxMatch,
int Threshold,
byte[] TextBuffer,
String HashMethodClassName)
ハッシュと二分木を使用した LzssSearchMethod を構築する。 |
|
| メソッドの概要 | |
void |
put(int position)
position から始まるデータパタンを ハッシュと二分木を使用した検索機構に登録する。 |
int |
putRequires()
put() または searchAndPut() を使用して データパタンを二分木に登録する際に 必要とするデータ量を得る。 |
int |
search(int position,
int lastPutPos)
ハッシュと二分木を使用した検索機構に登録されたデータパタンを検索し position から始まるデータパタンと最長の一致を持つものを得る。 |
int |
searchAndPut(int position)
ハッシュと二分木を使用した検索機構に登録された データパタンから position から始まるデータパタンと 最長の一致を持つものを検索し、 同時に position から始まるデータパタンを ハッシュと二分木を使用した検索機構に登録する。 |
void |
slide()
TextBuffer内の position までのデータを前方へ移動する際、 それに応じて ハッシュと二分木を使用した検索機構を構成するデータも TextBuffer内のデータと矛盾しないように前方へ移動する処理を行う。 |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
public HashAndBinaryTreeSearch(int DictionarySize,
int MaxMatch,
int Threshold,
byte[] TextBuffer)
DictionarySize - 辞書サイズMaxMatch - 最長一致長Threshold - 圧縮、非圧縮の閾値TextBuffer - LZSS圧縮を施すためのバッファ
public HashAndBinaryTreeSearch(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 void put(int position)
LzssSearchMethod 内の putposition - TextBuffer内のデータパタンの開始位置public int searchAndPut(int position)
LzssSearchMethod 内の searchAndPutposition - TextBuffer内のデータパタンの開始位置。
LzssOutputStream.createSearchReturn(int,int),
LzssOutputStream.NOMATCH
public int search(int position,
int lastPutPos)
LzssSearchMethod 内の searchposition - TextBuffer内のデータパタンの開始位置。lastPutPos - 最後に登録したデータパタンの開始位置。
LzssOutputStream.createSearchReturn(int,int),
LzssOutputStream.NOMATCHpublic void slide()
LzssSearchMethod 内の slidepublic int putRequires()
LzssSearchMethod 内の putRequires
|
LHA Library for Java | ||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||