Package jp.gr.java_conf.dangan.util.lha
Class BinaryTreeSearch
- java.lang.Object
-
- jp.gr.java_conf.dangan.util.lha.BinaryTreeSearch
-
- All Implemented Interfaces:
LzssSearchMethod
public class BinaryTreeSearch extends java.lang.Object implements LzssSearchMethod
?????????g?p???? LzssSearchMethod ???????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: BinaryTreeSearch.java,v $ Revision 1.0 2002/08/06 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
Constructors Constructor Description BinaryTreeSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer)?????????g?p???? LzssSearchMethod ???\?z?????B
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidput(int position)position ?????n?????f?[?^?p?^?????????????o?^?????BintputRequires()put() ?????? searchAndPut() ???g?p???? ?f?[?^?p?^?????????????o?^???????? ?K?v???????f?[?^?????????B
?????????o?^???????f?[?^?p?^?????\????? ?S??(MaxMatch?o?C?g)???f?[?^???K?v???????Bintsearch(int position, int lastPutPos)?????????o?^???????f?[?^?p?^?????????? position ?????n?????f?[?^?p?^???? ?????????v?????????????????B
TextBuffer.length < position + MaxMatch ???????????? position ?????A ???????????S????????????????? ???????v??????????????????????BintsearchAndPut(int position)?????????o?^???????f?[?^?p?^?????? position ?????n?????f?[?^?p?^???? ?????????v???????????????????A ?????? position ?????n?????f?[?^?p?^???? ?????????o?^?????Bvoidslide()TextBuffer????position???????f?[?^???O???????????????A ??????????? ?????????\??????f?[?^?? TextBuffer?????f?[?^??????????????????O???????????????????s???B
-
-
-
Constructor Detail
-
BinaryTreeSearch
public BinaryTreeSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer)?????????g?p???? LzssSearchMethod ???\?z?????B- Parameters:
DictionarySize- ?????T?C?YMaxMatch- ???????v??Threshold- ???k?A?????k?????lTextBuffer- LZSS???k???{?????????o?b?t?@
-
-
Method Detail
-
put
public void put(int position)
position ?????n?????f?[?^?p?^?????????????o?^?????B- Specified by:
putin interfaceLzssSearchMethod- Parameters:
position- TextBuffer?????f?[?^?p?^?????J?n???u
-
searchAndPut
public int searchAndPut(int position)
?????????o?^???????f?[?^?p?^?????? position ?????n?????f?[?^?p?^???? ?????????v???????????????????A ?????? position ?????n?????f?[?^?p?^???? ?????????o?^?????B- Specified by:
searchAndPutin 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:
LzssOutputStream.createSearchReturn(int,int),LzssOutputStream.NOMATCH
-
search
public int search(int position, int lastPutPos)?????????o?^???????f?[?^?p?^?????????? position ?????n?????f?[?^?p?^???? ?????????v?????????????????B
TextBuffer.length < position + MaxMatch ???????????? position ?????A ???????????S????????????????? ???????v??????????????????????B- Specified by:
searchin 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:
LzssOutputStream.createSearchReturn(int,int),LzssOutputStream.NOMATCH
-
slide
public void slide()
TextBuffer????position???????f?[?^???O???????????????A ??????????? ?????????\??????f?[?^?? TextBuffer?????f?[?^??????????????????O???????????????????s???B- Specified by:
slidein interfaceLzssSearchMethod- Parameters:
slideWidth- ????????slideEnd- ???????f?[?^???I?[ + 1(?f?[?^?]????)
-
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:
putRequiresin interfaceLzssSearchMethod- Returns:
- ?R???X?g???N?^???^???? MaxMatch
-
-