jp.gr.java_conf.dangan.util.lha
Class HashShort
- HashMethod
データパタンの先頭2バイトから
0 〜 4095 のハッシュ値を生成するハッシュ関数。
-- revision history --
$Log: HashShort.java,v $
Revision 1.0 2002/08/05 00:00:00 dangan
add to version control
[change]
HashMethod のインタフェイス変更にあわせてインテフェイス変更。
[maintanance]
ソース整備
タブ廃止
ライセンス文の修正
HashShort(byte[] TextBuffer) - データパタンの先頭2バイトから 0x000 〜 0xFFF までの値を生成する
ハッシュ関数を構築する。
|
int | hash(int position) - ハッシュ関数。
コンストラクタで渡された TextBuffer の position からの
データパタンの hash値を生成する。
|
int | hashRequires() - ハッシュ関数がハッシュ値を生成するために使用するバイト数を得る。
このハッシュ関数はデータパタンの先頭 2 バイトのデータから
ハッシュ値を生成するため、このメソッドは常に 2 を返す。
|
int | tableSize() - ハッシュテーブルのサイズを得る。
このハッシュ関数は 0x000 〜 0xFFF までのハッシュ値を生成するため
このメソッドは常に 0x1000(4096) を返す。
|
HashShort
public HashShort(byte[] TextBuffer)
データパタンの先頭2バイトから 0x000 〜 0xFFF までの値を生成する
ハッシュ関数を構築する。
TextBuffer
- LZSS圧縮用のバッファ。
Hash値生成のため読み込み用に使用する。
hash
public int hash(int position)
ハッシュ関数。
コンストラクタで渡された TextBuffer の position からの
データパタンの hash値を生成する。
- hash in interface HashMethod
hashRequires
public int hashRequires()
ハッシュ関数がハッシュ値を生成するために使用するバイト数を得る。
このハッシュ関数はデータパタンの先頭 2 バイトのデータから
ハッシュ値を生成するため、このメソッドは常に 2 を返す。
- hashRequires in interface HashMethod
tableSize
public int tableSize()
ハッシュテーブルのサイズを得る。
このハッシュ関数は 0x000 〜 0xFFF までのハッシュ値を生成するため
このメソッドは常に 0x1000(4096) を返す。
- tableSize in interface HashMethod
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.