Class HashAndBinaryTreeSearch

  • All Implemented Interfaces:
    LzssSearchMethod

    public class HashAndBinaryTreeSearch
    extends java.lang.Object
    implements LzssSearchMethod
    ?n?b?V?????????????g???? 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: 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

      Constructors 
      Constructor Description
      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
      HashAndBinaryTreeSearch​(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, java.lang.String HashMethodClassName)
      ?n?b?V?????????????g?p???? LzssSearchMethod ???\?z?????B
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void put​(int position)
      position ?????n?????f?[?^?p?^???? ?n?b?V?????????????g?p?????????@?\???o?^?????B
      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
      int search​(int position, int lastPutPos)
      ?n?b?V?????????????g?p?????????@?\???o?^???????f?[?^?p?^?????????? position ?????n?????f?[?^?p?^?????????????v?????????????????B
      TextBuffer.length < position + MaxMatch ???????????? position ?????A ???????????S??????????????????????v??????????????????????B
      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
      void slide()
      TextBuffer???? position ???????f?[?^???O???????????????A ??????????? ?n?b?V?????????????g?p?????????@?\???\??????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 Detail

      • 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?Y
        MaxMatch - ???????v??
        Threshold - ???k?A?????k?????l
        TextBuffer - LZSS???k???{?????????o?b?t?@
      • HashAndBinaryTreeSearch

        public HashAndBinaryTreeSearch​(int DictionarySize,
                                       int MaxMatch,
                                       int Threshold,
                                       byte[] TextBuffer,
                                       java.lang.String HashMethodClassName)
        ?n?b?V?????????????g?p???? LzssSearchMethod ???\?z?????B
        Parameters:
        DictionarySize - ?????T?C?Y
        MaxMatch - ???????v??
        Threshold - ???k?A?????k?????l
        TextBuffer - LZSS???k???{?????????o?b?t?@
        HashMethodClassName - Hash???????????????N???X??
        Throws:
        java.lang.NoClassDefFoundError - HashMethodClassName ???^?????????N???X?? ????????????????B
        java.lang.InstantiationError - HashMethodClassName ???^?????????N???X?? abstract class ???????????C???X?^???X????????????????B
        java.lang.NoSuchMethodError - HashMethodClassName ???^?????????N???X?? ?R???X?g???N?^ HashMethod( byte[] ) ?????????????
    • Method Detail

      • put

        public void put​(int position)
        position ?????n?????f?[?^?p?^???? ?n?b?V?????????????g?p?????????@?\???o?^?????B
        Specified by:
        put in interface LzssSearchMethod
        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 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:
        LzssOutputStream.createSearchReturn(int,int), LzssOutputStream.NOMATCH
      • search

        public int search​(int position,
                          int lastPutPos)
        ?n?b?V?????????????g?p?????????@?\???o?^???????f?[?^?p?^?????????? position ?????n?????f?[?^?p?^?????????????v?????????????????B
        TextBuffer.length < 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:
        LzssOutputStream.createSearchReturn(int,int), LzssOutputStream.NOMATCH
      • slide

        public void slide()
        TextBuffer???? position ???????f?[?^???O???????????????A ??????????? ?n?b?V?????????????g?p?????????@?\???\??????f?[?^?? TextBuffer?????f?[?^??????????????????O???????????????????s???B
        Specified by:
        slide in interface LzssSearchMethod
      • 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