Class PatriciaTrieSearch

  • All Implemented Interfaces:
    LzssSearchMethod

    public class PatriciaTrieSearch
    extends java.lang.Object
    implements LzssSearchMethod
    PATRICIA Trie ???g?p???? LzssSearchMethod ???????B
     -- revision history --
     $Log: PatriciaTrieSearch.java,v $
     Revision 1.2  2002/12/10 22:28:55  dangan
     [bug fix]
         put( DictionarySize * 2 )
         searchAndPut( DictionarySize * 2 ) ????????????????????????C???B
    
     Revision 1.1  2002/12/04 00:00:00  dangan
     [change]
         LzssSearchMethod ???C???^?t?F?C?X???X???????????C???^?t?F?C?X???X?B
     [maintenance]
         ?\?[?X????
    
     Revision 1.0  2002/08/15 00:00:00  dangan
     add to version control
     [bug fix]
         contractNode ?? hashtable ???????A?????X?g???q???????Y????????C???B
         ?z?? ?? PatriciaTrieSearch.ROOT_NODE(-1) ???A?N?Z?X????????????C???B
     [maintenance]
         ?\?[?X????
         ?^?u?p?~
         ???C?Z???X????C??
    
     
    Version:
    $Revision: 1.2 $
    Author:
    $Author: dangan $
    • Constructor Summary

      Constructors 
      Constructor Description
      PatriciaTrieSearch​(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer)
      ?R???X?g???N?^?B PATRICIA Trie ???g?p?????????@?\???\?z?????B
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void put​(int position)
      position ?????n?????f?[?^?p?^???? PATRICIA Trie ???o?^?????B
      int putRequires()
      put() ?? LzssSearchMethod???f?[?^?? ?o?^???????????g?p???????f?[?^?????????B PatriciaTrieSearch ?????A???? MaxMatch ???????B
      int search​(int position, int lastPutPos)
      PATRICIA Trie ???o?^???????f?[?^?p?^?????????? position ?????n?????f?[?^?p?^???? ?????????v?????????????????B
      int searchAndPut​(int position)
      PATRICIA Trie ???o?^???????f?[?^?p?^?????? position ?????n?????f?[?^?p?^???? ?????????v???????????????????A ?????? position ?????n?????f?[?^?p?^???? PATRICIA Trie ???o?^?????B
      void slide()
      TextBuffer????position???????f?[?^?? ?O???????????????A??????????? LzssSearchMethod ?????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

      • PatriciaTrieSearch

        public PatriciaTrieSearch​(int DictionarySize,
                                  int MaxMatch,
                                  int Threshold,
                                  byte[] TextBuffer)
        ?R???X?g???N?^?B PATRICIA Trie ???g?p?????????@?\???\?z?????B
        Parameters:
        DictionarySize - ?????T?C?Y
        MaxMatch - ???????v??
        Threshold - ???k?A?????k?????l
        TextBuffer - LZSS???k???{?????????o?b?t?@
    • Method Detail

      • put

        public void put​(int position)
        position ?????n?????f?[?^?p?^???? PATRICIA Trie ???o?^?????B
        Specified by:
        put in interface LzssSearchMethod
        Parameters:
        position - TextBuffer?????f?[?^?p?^?????J?n???u
      • searchAndPut

        public int searchAndPut​(int position)
        PATRICIA Trie ???o?^???????f?[?^?p?^?????? position ?????n?????f?[?^?p?^???? ?????????v???????????????????A ?????? position ?????n?????f?[?^?p?^???? PATRICIA Trie ???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)
        PATRICIA Trie ???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??????????? LzssSearchMethod ?????f?[?^?? TextBuffer?????f?[?^????????????? ?????O???????????????????s???B
        Specified by:
        slide in interface LzssSearchMethod
      • putRequires

        public int putRequires()
        put() ?? LzssSearchMethod???f?[?^?? ?o?^???????????g?p???????f?[?^?????????B PatriciaTrieSearch ?????A???? MaxMatch ???????B
        Specified by:
        putRequires in interface LzssSearchMethod
        Returns:
        ???? MaxMatch