Package jp.gr.java_conf.dangan.util.lha
Class HashAndBinaryTreeSearch
java.lang.Object
jp.gr.java_conf.dangan.util.lha.HashAndBinaryTreeSearch
- All Implemented Interfaces:
LzssSearchMethod
?n?b?V?????????????g???? LzssSearchMethod ???????B
???????????A???????v???????????}?????????????A ??????????v??????????????????????????????A LZSS?? ???v???u??????????????????? ???p?????????? -lh5- ???????????k?@?????A ???k????????????????????B
?f?[?^???k?n???h?u?b?N[??????????] M.?l???\??/J.-L.?Q?B???[ ?? ???L???u?E?R???p ?? ISBN4-8101-8605-9 5728?~(??????,???????w???????????i)???Q?l???????B
???????????A???????v???????????}?????????????A ??????????v??????????????????????????????A LZSS?? ???v???u??????????????????? ???p?????????? -lh5- ???????????k?@?????A ???k????????????????????B
-- revision history -- $Log: HashAndBinaryTreeSearch.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 [maintenance] ?\?[?X???? ?^?u?p?~ ???C?Z???X????C??
- Version:
- $Revision: 1.0 $
- Author:
- $Author: dangan $
-
Constructor Summary
ConstructorsConstructorDescriptionHashAndBinaryTreeSearch
(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer) ?n?b?V?????????????g?p?????????@?\???\?z?????B
?n?b?V?????????f?t?H???g?????????g?p?????BHashAndBinaryTreeSearch
(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, String HashMethodClassName) ?n?b?V?????????????g?p???? LzssSearchMethod ???\?z?????B -
Method Summary
Modifier and TypeMethodDescriptionvoid
put
(int position) position ?????n?????f?[?^?p?^???? ?n?b?V?????????????g?p?????????@?\???o?^?????Bint
put() ?????? searchAndPut() ???g?p???? ?f?[?^?p?^?????????????o?^???????? ?K?v???????f?[?^?????????B
?????????o?^???????f?[?^?p?^?????\????? ?S??(MaxMatch?o?C?g)???f?[?^???K?v???????Bint
search
(int position, int lastPutPos) ?n?b?V?????????????g?p?????????@?\???o?^???????f?[?^?p?^?????????? position ?????n?????f?[?^?p?^?????????????v?????????????????B
TextBuffer.length invalid input: '<' position + MaxMatch ???????????? position ?????A ???????????S??????????????????????v??????????????????????Bint
searchAndPut
(int position) ?n?b?V?????????????g?p?????????@?\???o?^?????? ?f?[?^?p?^?????? position ?????n?????f?[?^?p?^???? ?????????v???????????????????A ?????? position ?????n?????f?[?^?p?^???? ?n?b?V?????????????g?p?????????@?\???o?^?????Bvoid
slide()
TextBuffer???? position ???????f?[?^???O???????????????A ??????????? ?n?b?V?????????????g?p?????????@?\???\??????f?[?^?? TextBuffer?????f?[?^??????????????????O???????????????????s???B
-
Constructor Details
-
HashAndBinaryTreeSearch
public HashAndBinaryTreeSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer) ?n?b?V?????????????g?p?????????@?\???\?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?@
-
HashAndBinaryTreeSearch
public HashAndBinaryTreeSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, String HashMethodClassName) ?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[] ) ?????????????
-
-
Method Details
-
put
public void put(int position) position ?????n?????f?[?^?p?^???? ?n?b?V?????????????g?p?????????@?\???o?^?????B- Specified by:
put
in interfaceLzssSearchMethod
- Parameters:
position
- TextBuffer?????f?[?^?p?^?????J?n???u
-
searchAndPut
public int searchAndPut(int position) ?n?b?V?????????????g?p?????????@?\???o?^?????? ?f?[?^?p?^?????? position ?????n?????f?[?^?p?^???? ?????????v???????????????????A ?????? position ?????n?????f?[?^?p?^???? ?n?b?V?????????????g?p?????????@?\???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?????????????g?p?????????@?\???o?^???????f?[?^?p?^?????????? position ?????n?????f?[?^?p?^?????????????v?????????????????B
TextBuffer.length invalid input: '<' position + MaxMatch ???????????? position ?????A ???????????S??????????????????????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 ??????????? ?n?b?V?????????????g?p?????????@?\???\??????f?[?^?? TextBuffer?????f?[?^??????????????????O???????????????????s???B- Specified by:
slide
in interfaceLzssSearchMethod
-
putRequires
public int putRequires()put() ?????? searchAndPut() ???g?p???? ?f?[?^?p?^?????????????o?^???????? ?K?v???????f?[?^?????????B
?????????o?^???????f?[?^?p?^?????\????? ?S??(MaxMatch?o?C?g)???f?[?^???K?v???????B- Specified by:
putRequires
in interfaceLzssSearchMethod
- Returns:
- ?R???X?g???N?^???^???? MaxMatch
-