Class BinaryTreeSearch

java.lang.Object
jp.gr.java_conf.dangan.util.lha.BinaryTreeSearch
All Implemented Interfaces:
LzssSearchMethod

public class BinaryTreeSearch extends 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

    Modifier and Type
    Method
    Description
    void
    put(int position)
    position ?????n?????f?[?^?p?^?????????????o?^?????B
    int
    put() ?????? searchAndPut() ???g?p???? ?f?[?^?p?^?????????????o?^???????? ?K?v???????f?[?^?????????B
    ?????????o?^???????f?[?^?p?^?????\????? ?S??(MaxMatch?o?C?g)???f?[?^???K?v???????B
    int
    search(int position, int lastPutPos)
    ?????????o?^???????f?[?^?p?^?????????? position ?????n?????f?[?^?p?^???? ?????????v?????????????????B
    TextBuffer.length invalid input: '&lt' position + MaxMatch ???????????? position ?????A ???????????S????????????????? ???????v??????????????????????B
    int
    searchAndPut(int position)
    ?????????o?^???????f?[?^?p?^?????? position ?????n?????f?[?^?p?^???? ?????????v???????????????????A ?????? position ?????n?????f?[?^?p?^???? ?????????o?^?????B
    void
    TextBuffer????position???????f?[?^???O???????????????A ??????????? ?????????\??????f?[?^?? TextBuffer?????f?[?^??????????????????O???????????????????s???B

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BinaryTreeSearch

      public BinaryTreeSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer)
      ?????????g?p???? LzssSearchMethod ???\?z?????B
      Parameters:
      DictionarySize - ?????T?C?Y
      MaxMatch - ???????v??
      Threshold - ???k?A?????k?????l
      TextBuffer - LZSS???k???{?????????o?b?t?@
  • Method Details

    • put

      public void put(int position)
      position ?????n?????f?[?^?p?^?????????????o?^?????B
      Specified by:
      put in interface LzssSearchMethod
      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:
      searchAndPut in interface LzssSearchMethod
      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)
      ?????????o?^???????f?[?^?p?^?????????? position ?????n?????f?[?^?p?^???? ?????????v?????????????????B
      TextBuffer.length invalid input: '&lt' position + MaxMatch ???????????? position ?????A ???????????S????????????????? ???????v??????????????????????B
      Specified by:
      search in interface LzssSearchMethod
      Parameters:
      position - TextBuffer?????f?[?^?p?^?????J?n???u?B
      lastPutPos - ???????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 ??????????? ?????????\??????f?[?^?? TextBuffer?????f?[?^??????????????????O???????????????????s???B
      Specified by:
      slide in interface LzssSearchMethod
      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:
      putRequires in interface LzssSearchMethod
      Returns:
      ?R???X?g???N?^???^???? MaxMatch