public class PreLh1Decoder extends java.lang.Object implements PreLzssDecoder
-- revision history --
$Log: PreLh1Decoder.java,v $
Revision 1.1 2002/12/01 00:00:00 dangan
[maintenance]
ソース整備
Revision 1.0 2002/08/05 00:00:00 dangan
add to version control
[bug fix]
available の計算が甘かったのを修正。
[maintenance]
ソース整備
| Modifier and Type | Field and Description |
|---|---|
(package private) DynamicHuffman |
huffman
code部復号用の動的ハフマン木
|
(package private) BitInputStream |
in
-lh1- の圧縮データを供給する BitInputStream
|
(package private) DynamicHuffman |
markHuffman
huffman のバックアップ用
|
(package private) int[] |
offHiLen
オフセット部の上位6bit復号用
ハフマン符号長リスト。
|
(package private) short[] |
offHiTable
オフセット部の上位6bit復号用テーブル。
|
(package private) int |
offHiTableBits
オフセット部の上位6bit復号用テーブルを引くのに必要なbit数。
|
| Constructor and Description |
|---|
PreLh1Decoder(java.io.InputStream in)
-lh1- 解凍用 PreLzssDecoder を構築する。
|
| Modifier and Type | Method and Description |
|---|---|
int |
available()
ブロックせずに読み出すことの出来る最低バイト数を得る。
InputStream の available() と違い、 この最低バイト数は必ずしも保障されていない事に注意すること。 |
void |
close()
このストリームを閉じ、使用していた全ての資源を解放する。
|
int |
getDictionarySize()
-lh1-形式のLZSS辞書のサイズを得る。
|
int |
getMaxMatch()
-lh1-形式のLZSSの最大一致長を得る。
|
int |
getThreshold()
-lh1-形式のLZSSの圧縮、非圧縮の閾値を得る。
|
void |
mark(int readLimit)
接続された入力ストリームの現在位置にマークを設定し、
reset() メソッドでマークした時点の 読み込み位置に
戻れるようにする。
InputStream の mark() と違い、readLimit で設定した 限界バイト数より前にマーク位置が無効になる可能性が ある事に注意すること。 |
boolean |
markSupported()
接続された入力ストリームが mark() と reset() をサポートするかを得る。
|
int |
readCode()
-lh1- で圧縮された
1byte のLZSS未圧縮のデータ、
もしくは圧縮コードのうち一致長を読み込む。
|
int |
readOffset()
-lh1- で圧縮された
LZSS圧縮コードのうち一致位置を読み込む。
|
void |
reset()
接続された入力ストリームの読み込み位置を最後に
mark() メソッドが呼び出されたときの位置に設定する。
|
BitInputStream in
DynamicHuffman huffman
int[] offHiLen
short[] offHiTable
int offHiTableBits
DynamicHuffman markHuffman
public PreLh1Decoder(java.io.InputStream in)
in - -lh1- で圧縮されたデータを供給する入力ストリームpublic int readCode()
throws java.io.IOException
readCode in interface PreLzssDecoderjava.io.IOException - 入出力エラーが発生した場合java.io.EOFException - EndOfStreamに達した場合public int readOffset()
throws java.io.IOException
readOffset in interface PreLzssDecoderjava.io.IOException - 入出力エラーが発生した場合。java.io.EOFException - データが途中までしかないため
予期せぬ EndOfStream に到達した場合。BitDataBrokenException - データが途中までしかないため
予期せぬ EndOfStream に到達したか、
他の入出力エラーが発生した。NotEnoughBitsException - データが途中までしかないため
予期せぬ EndOfStream に到達したか、
他の入出力エラーが発生した。public void mark(int readLimit)
mark in interface PreLzssDecoderreadLimit - マーク位置に戻れる限界のバイト数。
このバイト数を超えてデータを読み
込んだ場合 reset()できなくなる可
能性がある。PreLzssDecoder.mark(int)public void reset()
throws java.io.IOException
reset in interface PreLzssDecoderjava.io.IOException - 入出力エラーが発生した場合public boolean markSupported()
markSupported in interface PreLzssDecoderpublic int available()
throws java.io.IOException
available in interface PreLzssDecoderjava.io.IOException - 入出力エラーが発生した場合PreLzssDecoder.available()public void close()
throws java.io.IOException
close in interface PreLzssDecoderjava.io.IOException - 入出力エラーが発生した場合public int getDictionarySize()
getDictionarySize in interface PreLzssDecoderpublic int getMaxMatch()
getMaxMatch in interface PreLzssDecoderpublic int getThreshold()
getThreshold in interface PreLzssDecoder
When you found typographical errors or omissions, Please mail to cqw10305@nifty.com
The company name and product name which are used in this document, it is the trademark or registered trademark of each company generally.
Copyright © 2001-2002 Michel Ishizuka. All Rights Reserved.