Package jp.gr.java_conf.dangan.util.lha
Class TwoLevelHashSearch
java.lang.Object
jp.gr.java_conf.dangan.util.lha.TwoLevelHashSearch
- All Implemented Interfaces:
LzssSearchMethod
???i?K?n?b?V?????P?????A?????X?g???g??????????????? LzssSearchMethod?B
?????????_? ???Q?l???????B
?????????_? ???Q?l???????B
-- revision history -- $Log: TwoLevelHashSearch.java,v $ Revision 1.1 2002/12/10 22:06:40 dangan [bug fix] searchAndPut() ???????????????v???????????????o?O???C???B Revision 1.0 2002/12/03 00:00:00 dangan first edition add to version control
- Version:
- $Revision: 1.1 $
- Author:
- $Author: dangan $
-
Constructor Summary
ConstructorsConstructorDescriptionTwoLevelHashSearch
(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer) ???i?K?n?b?V?????g?p???? LzssSearchMethod ???\?z?????B
???i?????n?b?V?????????? ?f?t?H???g?????????g?p???????BTwoLevelHashSearch
(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, String HashMethodClassName) ???i?K?n?b?V?????g?p???? LzssSearchMethod ???\?z?????B -
Method Summary
Modifier and TypeMethodDescriptionvoid
put
(int position) position ?????n?????f?[?^?p?^???? ???i?K?n?b?V?????A?????X?g????????????@?\???o?^?????Bint
put() ?? LzssSearchMethod???f?[?^?? ?o?^???????????g?p???????f?[?^?????????B TwoLevelHashSearch ?????A???????g?p??????? HashMethod ???????? hash() ?????????K?v???????f?[?^??( HashMethod.hashRequires() ???????l ) ?? ???i?????n?b?V?????K?v?????????o?C?g?????????????????????Bint
search
(int position, int lastPutPos) ?n?b?V?????A?????X?g???g?p?????????@?\???o?^?????? ?f?[?^?p?^?????????? position ?????n?????f?[?^?p?^???? ?????????v?????????????????Bint
searchAndPut
(int position) ???i?K?n?b?V?????A?????X?g????????????@?\???o?^?????? ?f?[?^?p?^?????? position ?????n?????f?[?^?p?^???? ?????????v???????????????????A ?????? position ?????n?????f?[?^?p?^???? ???i?K?n?b?V?????A?????X?g????????????@?\???o?^?????Bvoid
slide()
TextBuffer????position???????f?[?^?? ?O???????????????A??????????? SearchMethod???? ?f?[?^?? TextBuffer?????f?[?^????????????????? ?O???????????????????s???B
-
Constructor Details
-
TwoLevelHashSearch
public TwoLevelHashSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer) ???i?K?n?b?V?????g?p???? LzssSearchMethod ???\?z?????B
???i?????n?b?V?????????? ?f?t?H???g?????????g?p???????B- Parameters:
DictionarySize
- ?????T?C?YMaxMatch
- ???????v??Threshold
- ???k?A?????k?????lTextBuffer
- LZSS???k???{?????????o?b?t?@
-
TwoLevelHashSearch
public TwoLevelHashSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, String HashMethodClassName) ???i?K?n?b?V?????g?p???? LzssSearchMethod ???\?z?????B- Parameters:
DictionarySize
- ?????T?C?YMaxMatch
- ???????v??Threshold
- ???k?A?????k?????lTextBuffer
- LZSS???k???{?????????o?b?t?@HashMethodClassName
- Hash???????????????N???X??- Throws:
NoClassDefFoundError
- HashMethodClassName ???^?????????N???X??????????????????BInstantiationError
- HashMethodClassName ???^?????????N???X?? abstract class ???????????C???X?^???X????????????????BNoSuchMethodError
- HashMethodClassName ???^?????????N???X?? ?R???X?g???N?^ HashMethod( byte[] )??????????????B
-
-
Method Details
-
put
public void put(int position) position ?????n?????f?[?^?p?^???? ???i?K?n?b?V?????A?????X?g????????????@?\???o?^?????B- Specified by:
put
in interfaceLzssSearchMethod
- Parameters:
position
- TextBuffer?????f?[?^?p?^?????J?n???u
-
searchAndPut
public int searchAndPut(int position) ???i?K?n?b?V?????A?????X?g????????????@?\???o?^?????? ?f?[?^?p?^?????? position ?????n?????f?[?^?p?^???? ?????????v???????????????????A ?????? position ?????n?????f?[?^?p?^???? ???i?K?n?b?V?????A?????X?g????????????@?\???o?^?????B- Specified by:
searchAndPut
in interfaceLzssSearchMethod
- Parameters:
position
- TextBuffer?????f?[?^?p?^?????J?n???u?B- Returns:
- ???v?????????????????? LzssOutputStream.createSearchReturn ???????????????????v???u?????v???????????????l?A ???v???????????????????????? LzssOutputStream.NOMATCH?B
- See Also:
-
search
public int search(int position, int lastPutPos) ?n?b?V?????A?????X?g???g?p?????????@?\???o?^?????? ?f?[?^?p?^?????????? position ?????n?????f?[?^?p?^???? ?????????v?????????????????B- Specified by:
search
in interfaceLzssSearchMethod
- Parameters:
position
- TextBuffer?????f?[?^?p?^?????J?n???u?BlastPutPos
- ???????o?^?????f?[?^?p?^?????J?n???u?B- Returns:
- ???v?????????????????? LzssOutputStream.createSearchReturn ???????????????????v???u?????v???????????????l?A ???v???????????????????????? LzssOutputStream.NOMATCH?B
- See Also:
-
slide
public void slide()TextBuffer????position???????f?[?^?? ?O???????????????A??????????? SearchMethod???? ?f?[?^?? TextBuffer?????f?[?^????????????????? ?O???????????????????s???B- Specified by:
slide
in interfaceLzssSearchMethod
-
putRequires
public int putRequires()put() ?? LzssSearchMethod???f?[?^?? ?o?^???????????g?p???????f?[?^?????????B TwoLevelHashSearch ?????A???????g?p??????? HashMethod ???????? hash() ?????????K?v???????f?[?^??( HashMethod.hashRequires() ???????l ) ?? ???i?????n?b?V?????K?v?????????o?C?g?????????????????????B- Specified by:
putRequires
in interfaceLzssSearchMethod
- Returns:
- ???i???????i?????n?b?V?????K?v???o?C?g???????????????B
-