Class PreLh1Decoder

java.lang.Object
jp.gr.java_conf.dangan.util.lha.PreLh1Decoder
All Implemented Interfaces:
PreLzssDecoder

public class PreLh1Decoder extends Object implements PreLzssDecoder
-lh1- ?????p?? PreLzssDecoder?B
 -- revision history --
 $Log: PreLh1Decoder.java,v $
 Revision 1.1  2002/12/01 00:00:00  dangan
 [maintenance]
     ?\?[?X????

 Revision 1.0  2002/08/05 00:00:00  dangan
 add to version control
 [bug fix]
     available ???v?Z???????????????C???B
 [maintenance]
     ?\?[?X????

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

    Fields
    Modifier and Type
    Field
    Description
    (package private) DynamicHuffman
    code???????p?????I?n?t?}????
    (package private) BitInputStream
    -lh1- ?????k?f?[?^?????????? BitInputStream
    (package private) DynamicHuffman
    huffman ???o?b?N?A?b?v?p
    (package private) int[]
    ?I?t?Z?b?g????????6bit?????p ?n?t?}???????????X?g?B
    (package private) short[]
    ?I?t?Z?b?g????????6bit?????p?e?[?u???B
    (package private) int
    ?I?t?Z?b?g????????6bit?????p?e?[?u?????????????K?v??bit???B
  • Constructor Summary

    Constructors
    Constructor
    Description
    -lh1- ?????p PreLzssDecoder ???\?z?????B
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    ?u???b?N???????????o???}?????o?????????o?C?g?????????B
    InputStream ?? available() ??????A ?}???????o?C?g?????K?????????????????????????????????}???B
    void
    ?}???X?g???[????????A?g?p????????S???????????????????B
    int
    -lh1-?`????LZSS???????T?C?Y???????B
    int
    -lh1-?`????LZSS?????????v?????????B
    int
    -lh1-?`????LZSS?????k?A?????k?????l???????B
    void
    mark(int readLimit)
    ???}???????????X?g???[???????????u???}?[?N?????????A reset() ???\?b?h???}?[?N???????_?? ???????????u?? ?????????????????B
    InputStream ?? mark() ??????AreadLimit ?????????? ???E?o?C?g???????O???}?[?N???u???????????????\???? ?????????????????}???B
    boolean
    ???}???????????X?g???[???? mark() ?? reset() ???T?|?[?g?????????????B
    int
    -lh1- ?????k?????? 1byte ??LZSS????k???f?[?^?A ???????????k?R?[?h?????????v?????????????B
    int
    -lh1- ?????k?????? LZSS???k?R?[?h?????????v???u???????????B
    void
    ???}???????????X?g???[???????????????u???????? mark() ???\?b?h???????o???????????????u???????????B

    Methods inherited from class java.lang.Object

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

    • in

      -lh1- ?????k?f?[?^?????????? BitInputStream
    • huffman

      code???????p?????I?n?t?}????
    • offHiLen

      int[] offHiLen
      ?I?t?Z?b?g????????6bit?????p ?n?t?}???????????X?g?B
    • offHiTable

      short[] offHiTable
      ?I?t?Z?b?g????????6bit?????p?e?[?u???B
    • offHiTableBits

      int offHiTableBits
      ?I?t?Z?b?g????????6bit?????p?e?[?u?????????????K?v??bit???B
    • markHuffman

      DynamicHuffman markHuffman
      huffman ???o?b?N?A?b?v?p
  • Constructor Details

    • PreLh1Decoder

      public PreLh1Decoder(InputStream in)
      -lh1- ?????p PreLzssDecoder ???\?z?????B
      Parameters:
      in - -lh1- ?????k???????f?[?^???????????????X?g???[??
  • Method Details

    • readCode

      public int readCode() throws IOException
      -lh1- ?????k?????? 1byte ??LZSS????k???f?[?^?A ???????????k?R?[?h?????????v?????????????B
      Specified by:
      readCode in interface PreLzssDecoder
      Returns:
      1byte ?? ????k???f?[?^?????????A ???k?????????k?R?[?h?????????v??
      Throws:
      IOException - ???o???G???[?????????????
      EOFException - EndOfStream???B????????
    • readOffset

      public int readOffset() throws IOException
      -lh1- ?????k?????? LZSS???k?R?[?h?????????v???u???????????B
      Specified by:
      readOffset in interface PreLzssDecoder
      Returns:
      -lh1- ?????k?????????k?R?[?h?????????v???u
      Throws:
      IOException - ???o???G???[??????????????B
      EOFException - ?f?[?^???r????????????????? ?\?????? EndOfStream ?????B?????????B
      BitDataBrokenException - ?f?[?^???r????????????????? ?\?????? EndOfStream ?????B???????A ???????o???G???[??????????B
      NotEnoughBitsException - ?f?[?^???r????????????????? ?\?????? EndOfStream ?????B???????A ???????o???G???[??????????B
    • mark

      public void mark(int readLimit)
      ???}???????????X?g???[???????????u???}?[?N?????????A reset() ???\?b?h???}?[?N???????_?? ???????????u?? ?????????????????B
      InputStream ?? mark() ??????AreadLimit ?????????? ???E?o?C?g???????O???}?[?N???u???????????????\???? ?????????????????}???B
      Specified by:
      mark in interface PreLzssDecoder
      Parameters:
      readLimit - ?}?[?N???u???????????E???o?C?g???B ?}???o?C?g?????L?????f?[?^?????? ?????????? reset()?????????????? ?\?????????B
      See Also:
    • reset

      public void reset() throws IOException
      ???}???????????X?g???[???????????????u???????? mark() ???\?b?h???????o???????????????u???????????B
      Specified by:
      reset in interface PreLzssDecoder
      Throws:
      IOException - ???o???G???[?????????????
    • markSupported

      public boolean markSupported()
      ???}???????????X?g???[???? mark() ?? reset() ???T?|?[?g?????????????B
      Specified by:
      markSupported in interface PreLzssDecoder
      Returns:
      ?X?g???[???? mark() ?? reset() ?? ?T?|?[?g?????????? true?B
      ?T?|?[?g??????????? false?B
    • available

      public int available() throws IOException
      ?u???b?N???????????o???}?????o?????????o?C?g?????????B
      InputStream ?? available() ??????A ?}???????o?C?g?????K?????????????????????????????????}???B
      Specified by:
      available in interface PreLzssDecoder
      Returns:
      ?u???b?N????????????o?????????o?C?g???B
      Throws:
      IOException - ???o???G???[?????????????
      See Also:
    • close

      public void close() throws IOException
      ?}???X?g???[????????A?g?p????????S???????????????????B
      Specified by:
      close in interface PreLzssDecoder
      Throws:
      IOException - ???o???G???[?????????????
    • getDictionarySize

      public int getDictionarySize()
      -lh1-?`????LZSS???????T?C?Y???????B
      Specified by:
      getDictionarySize in interface PreLzssDecoder
      Returns:
      -lh1-?`????LZSS???????T?C?Y
    • getMaxMatch

      public int getMaxMatch()
      -lh1-?`????LZSS?????????v?????????B
      Specified by:
      getMaxMatch in interface PreLzssDecoder
      Returns:
      -lh1-?`????LZSS?????????v??
    • getThreshold

      public int getThreshold()
      -lh1-?`????LZSS?????k?A?????k?????l???????B
      Specified by:
      getThreshold in interface PreLzssDecoder
      Returns:
      -lh1-?`????LZSS?????k?A?????k?????l