Class HashAndChainedListSearch

  • All Implemented Interfaces:
    LzssSearchMethod

    public class HashAndChainedListSearch
    extends java.lang.Object
    implements LzssSearchMethod
    ?n?b?V?????P?????A?????X?g???g??????????????? LzssSearchMethod?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

      Constructors 
      Constructor Description
      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
      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
      HashAndChainedListSearch​(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, java.lang.String HashMethodClassName)
      ?n?b?V?????A?????X?g???g?p???? LzssSearchMethod ???\?z?????B
      ?T?????s???????????l?????f?t?H???g?????????g?p???????B
      HashAndChainedListSearch​(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, java.lang.String HashMethodClassName, int SearchLimitCount)
      ?n?b?V?????A?????X?g???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?????A?????X?g????????????@?\???o?^?????B
      int putRequires()
      put() ?? LzssSearchMethod???f?[?^?? ?o?^???????????g?p???????f?[?^?????????B HashAndChainedListSearch ?????A ???????g?p??????? HashMethod ???????? hash() ?????????K?v???????f?[?^?? ( HashMethod.hashRequires() ???????l ) ???????B
      int search​(int position, int lastPutPos)
      ?n?b?V?????A?????X?g???g?p?????????@?\???o?^?????? ?f?[?^?p?^?????????? position ?????n?????f?[?^?p?^???? ?????????v?????????????????B
      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
      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
      void slide()
      TextBuffer????position???????f?[?^?? ?O???????????????A??????????? SearchMethod???? ?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

      • 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?Y
        MaxMatch - ???????v??
        Threshold - ???k?A?????k?????l
        TextBuffer - 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?Y
        MaxMatch - ???????v??
        Threshold - ???k?A?????k?????l
        TextBuffer - LZSS???k???{?????????o?b?t?@
        SearchLimitCount - ?T?????s??????????
        Throws:
        java.lang.IllegalArgumentException - SearchLimitCount ??0??????????
      • HashAndChainedListSearch

        public HashAndChainedListSearch​(int DictionarySize,
                                        int MaxMatch,
                                        int Threshold,
                                        byte[] TextBuffer,
                                        java.lang.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?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[] )?????????????
      • HashAndChainedListSearch

        public HashAndChainedListSearch​(int DictionarySize,
                                        int MaxMatch,
                                        int Threshold,
                                        byte[] TextBuffer,
                                        java.lang.String HashMethodClassName,
                                        int SearchLimitCount)
        ?n?b?V?????A?????X?g???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??
        SearchLimitCount - ?T?????s??????????
        Throws:
        java.lang.IllegalArgumentException - SearchLimitCount ??0??????????
        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?????A?????X?g????????????@?\???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?????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 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?????A?????X?g???g?p?????????@?\???o?^?????? ?f?[?^?p?^?????????? position ?????n?????f?[?^?p?^???? ?????????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??????????? SearchMethod???? ?f?[?^?? TextBuffer?????f?[?^????????????????? ?O???????????????????s???B
        Specified by:
        slide in interface LzssSearchMethod
      • 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 interface LzssSearchMethod
        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???u
        matchposs - ???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