public class HashDefault extends java.lang.Object implements HashMethod
-- revision history -- $Log: HashDefault.java,v $ Revision 1.0 2002/08/05 00:00:00 dangan add to version control [change] HashMethod のインタフェイス変更にあわせてインテフェイス変更。 コンストラクタで引数チェックを削除。 [maintanance] ソース整備 タブ廃止 ライセンス文の修正
Constructor and Description |
---|
HashDefault(byte[] TextBuffer)
ar940528 や LHa for Unix で使用されているハッシュ関数を構築する。
|
Modifier and Type | Method and Description |
---|---|
int |
hash(int position)
ハッシュ関数。
コンストラクタで渡された TextBuffer の position からの データパタンの hash値を生成する。 |
int |
hashRequires()
ハッシュ関数がハッシュ値を生成するために使用するバイト数を得る。
このハッシュ関数は 3バイトのデータから シフトとXORを使用してハッシュ値を生成するため、 このメソッドは常に 3 を返す。 |
int |
tableSize()
ハッシュテーブルのサイズを得る。
このハッシュ関数は 0x0000 〜 0x7FFF のハッシュ値を生成するため、 このメソッドは常に 0x8000(32768) を返す。 |
public HashDefault(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.