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