Class TwoLevelHashSearch

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

public class TwoLevelHashSearch extends Object implements LzssSearchMethod
???i?K?n?b?V?????P?????A?????X?g???g??????????????? LzssSearchMethod?B
?????????_? ???Q?l???????B
 -- revision history --
 $Log: TwoLevelHashSearch.java,v $
 Revision 1.1  2002/12/10 22:06:40  dangan
 [bug fix]
     searchAndPut() ???????????????v???????????????o?O???C???B

 Revision 1.0  2002/12/03 00:00:00  dangan
 first edition
 add to version control

 
Version:
$Revision: 1.1 $
Author:
$Author: dangan $
  • Constructor Summary

    Constructors
    Constructor
    Description
    TwoLevelHashSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer)
    ???i?K?n?b?V?????g?p???? LzssSearchMethod ???\?z?????B
    ???i?????n?b?V?????????? ?f?t?H???g?????????g?p???????B
    TwoLevelHashSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, String HashMethodClassName)
    ???i?K?n?b?V?????g?p???? LzssSearchMethod ???\?z?????B
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    put(int position)
    position ?????n?????f?[?^?p?^???? ???i?K?n?b?V?????A?????X?g????????????@?\???o?^?????B
    int
    put() ?? LzssSearchMethod???f?[?^?? ?o?^???????????g?p???????f?[?^?????????B TwoLevelHashSearch ?????A???????g?p??????? HashMethod ???????? hash() ?????????K?v???????f?[?^??( HashMethod.hashRequires() ???????l ) ?? ???i?????n?b?V?????K?v?????????o?C?g?????????????????????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)
    ???i?K?n?b?V?????A?????X?g????????????@?\???o?^?????? ?f?[?^?p?^?????? position ?????n?????f?[?^?p?^???? ?????????v???????????????????A ?????? position ?????n?????f?[?^?p?^???? ???i?K?n?b?V?????A?????X?g????????????@?\???o?^?????B
    void
    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 Details

    • TwoLevelHashSearch

      public TwoLevelHashSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer)
      ???i?K?n?b?V?????g?p???? LzssSearchMethod ???\?z?????B
      ???i?????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?@
    • TwoLevelHashSearch

      public TwoLevelHashSearch(int DictionarySize, int MaxMatch, int Threshold, byte[] TextBuffer, String HashMethodClassName)
      ???i?K?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:
      NoClassDefFoundError - HashMethodClassName ???^?????????N???X??????????????????B
      InstantiationError - HashMethodClassName ???^?????????N???X?? abstract class ???????????C???X?^???X????????????????B
      NoSuchMethodError - HashMethodClassName ???^?????????N???X?? ?R???X?g???N?^ HashMethod( byte[] )??????????????B
  • Method Details

    • put

      public void put(int position)
      position ?????n?????f?[?^?p?^???? ???i?K?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)
      ???i?K?n?b?V?????A?????X?g????????????@?\???o?^?????? ?f?[?^?p?^?????? position ?????n?????f?[?^?p?^???? ?????????v???????????????????A ?????? position ?????n?????f?[?^?p?^???? ???i?K?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:
    • 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:
    • 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 TwoLevelHashSearch ?????A???????g?p??????? HashMethod ???????? hash() ?????????K?v???????f?[?^??( HashMethod.hashRequires() ???????l ) ?? ???i?????n?b?V?????K?v?????????o?C?g?????????????????????B
      Specified by:
      putRequires in interface LzssSearchMethod
      Returns:
      ???i???????i?????n?b?V?????K?v???o?C?g???????????????B