Package jp.gr.java_conf.dangan.util.lha
Class HashAndChainedListSearch
java.lang.Object
jp.gr.java_conf.dangan.util.lha.HashAndChainedListSearch
- All Implemented Interfaces:
LzssSearchMethod
?n?b?V?????P?????A?????X?g???g??????????????? LzssSearchMethod?B
???????????????}????????????????s????????????A ?K?????????v???????????}?????o????????????????B
???????????????}????????????????s????????????A ?K?????????v???????????}?????o????????????????B
-- revision history -- $Log: HashAndChainedListSearch.java,v $ Revision 1.0 2002/08/05 00:00:00 dangan add to version control [change] LzssSearchMethod ???C???^?t?F?C?X???X???????????C???^?t?F?C?X???X [improvement] ar940528 ?? TEST5???? ???????????X?B [maintenance] ?\?[?X???? ?^?u?p?~ ???C?Z???X????C??
- Version:
- $Revision: 1.0 $
- Author:
- $Author: dangan $
-
Constructor Summary
ConstructorsConstructorDescriptionHashAndChainedListSearch
(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer) ?n?b?V?????A?????X?g???g?p???? LzssSearchMethod ???\?z?????B
?n?b?V?????????T?????s???????????l?????f?t?H???g?????????g?p???????BHashAndChainedListSearch
(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, int SearchLimitCount) ?n?b?V?????A?????X?g???g?p???? LzssSearchMethod ???\?z?????B
?n?b?V???????????f?t?H???g?????????g?p???????BHashAndChainedListSearch
(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, String HashMethodClassName) ?n?b?V?????A?????X?g???g?p???? LzssSearchMethod ???\?z?????B
?T?????s???????????l?????f?t?H???g?????????g?p???????BHashAndChainedListSearch
(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, String HashMethodClassName, int SearchLimitCount) ?n?b?V?????A?????X?g???g?p???? LzssSearchMethod ???\?z?????B -
Method Summary
Modifier and TypeMethodDescriptionvoid
put
(int position) position ?????n?????f?[?^?p?^???? ?n?b?V?????A?????X?g????????????@?\???o?^?????Bint
put() ?? LzssSearchMethod???f?[?^?? ?o?^???????????g?p???????f?[?^?????????B HashAndChainedListSearch ?????A ???????g?p??????? HashMethod ???????? hash() ?????????K?v???????f?[?^?? ( HashMethod.hashRequires() ???????l ) ???????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) ?n?b?V?????A?????X?g????????????@?\???o?^?????? ?f?[?^?p?^?????? position ?????n?????f?[?^?p?^???? ?????????v???????????????????A ?????? position ?????n?????f?[?^?p?^???? ?n?b?V?????A?????X?g????????????@?\???o?^?????Bint
searchAndPut
(int position, int[] matchposs) ??????? LZSS ???k?????????I?????????????? searchAndPut()?B ?????????v?? 3, ???v???u 4 ?? ???v?? 4, ???v???u 1024 ???? ???v?? 3, ???v???u 4 + ?????k1??? ???????o???r?b?g???? ???????????????????B???????????????????????????????v?????? position????????????v???u???????????Bvoid
slide()
TextBuffer????position???????f?[?^?? ?O???????????????A??????????? SearchMethod???? ?f?[?^?? TextBuffer?????f?[?^????????????????? ?O???????????????????s???B
-
Constructor Details
-
HashAndChainedListSearch
public HashAndChainedListSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer) ?n?b?V?????A?????X?g???g?p???? LzssSearchMethod ???\?z?????B
?n?b?V?????????T?????s???????????l?????f?t?H???g?????????g?p???????B- Parameters:
DictionarySize
- ?????T?C?YMaxMatch
- ???????v??Threshold
- ???k?A?????k?????lTextBuffer
- LZSS???k???{?????????o?b?t?@
-
HashAndChainedListSearch
public HashAndChainedListSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, int SearchLimitCount) ?n?b?V?????A?????X?g???g?p???? LzssSearchMethod ???\?z?????B
?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?@SearchLimitCount
- ?T?????s??????????- Throws:
IllegalArgumentException
- SearchLimitCount ??0??????????
-
HashAndChainedListSearch
public HashAndChainedListSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, String HashMethodClassName) ?n?b?V?????A?????X?g???g?p???? LzssSearchMethod ???\?z?????B
?T?????s???????????l?????f?t?H???g?????????g?p???????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[] )?????????????
-
HashAndChainedListSearch
public HashAndChainedListSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, String HashMethodClassName, int SearchLimitCount) ?n?b?V?????A?????X?g???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??SearchLimitCount
- ?T?????s??????????- Throws:
IllegalArgumentException
- SearchLimitCount ??0??????????NoClassDefFoundError
- HashMethodClassName ???^?????????N???X?? ????????????????BInstantiationError
- HashMethodClassName ???^?????????N???X?? abstract class ???????????C???X?^???X????????????????BNoSuchMethodError
- HashMethodClassName ???^?????????N???X?? ?R???X?g???N?^ HashMethod( byte[] )?????????????
-
-
Method Details
-
put
public void put(int position) position ?????n?????f?[?^?p?^???? ?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) ?n?b?V?????A?????X?g????????????@?\???o?^?????? ?f?[?^?p?^?????? position ?????n?????f?[?^?p?^???? ?????????v???????????????????A ?????? position ?????n?????f?[?^?p?^???? ?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 HashAndChainedListSearch ?????A ???????g?p??????? HashMethod ???????? hash() ?????????K?v???????f?[?^?? ( HashMethod.hashRequires() ???????l ) ???????B- Specified by:
putRequires
in interfaceLzssSearchMethod
- Returns:
- ???????g?p??????? HashMethod ???????? hash() ?????????K?v???????f?[?^??
-
searchAndPut
public int searchAndPut(int position, int[] matchposs) ??????? LZSS ???k?????????I?????????????? searchAndPut()?B ?????????v?? 3, ???v???u 4 ?? ???v?? 4, ???v???u 1024 ???? ???v?? 3, ???v???u 4 + ?????k1??? ???????o???r?b?g???? ???????????????????B???????????????????????????????v?????? position????????????v???u???????????B- Parameters:
position
- ???????????f?[?^?p?^?????J?n???umatchposs
- ???v???u?????????i?[???????????????z??
matchpos[0] ???? ???v???? Threshold ?????v???u???A
matchpos[1] ???? ???v???? Threshold + 1 ?????v???u???i?[???????B
???v?????????????????????????? LzssOutputStream.NOMATCH ???i?[???????B- Returns:
- ???v??????????????????
LzssOutputStream.createSearchReturn ?????????? SearchReturn ???????????B
???v??????????????????? LzssOutputStream.NOMATCH ???????????B
-