jp.gr.java_conf.dangan.util.lha

Class PreLz5Decoder

Implemented Interfaces:
PreLzssDecoder

public class PreLz5Decoder
extends Object
implements PreLzssDecoder

-lz5- 解凍用 PreLzssDecoder。
 -- revision history --
 $Log: PreLz5Decoder.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
 [maintenance]
     ソース整備
     タブ廃止
     ライセンス文の修正

 
Version:
$Revision: 1.1 $
Author:
$Author: dangan $

Constructor Summary

PreLz5Decoder(InputStream in)
-lz5- 解凍用 PreLzssDecoder を構築する。

Method Summary

int
available()
ブロックせずに読み出すことの出来る最低バイト数を得る。
この値は保証される。
void
close()
このストリームを閉じ、使用していた全ての資源を解放する。
int
getDictionarySize()
-lz5-形式の LZSS辞書のサイズを得る。
int
getMaxMatch()
-lz5-形式の LZSSの最大一致長を得る。
int
getThreshold()
-lz5-形式の LZSSの圧縮、非圧縮の閾値を得る。
void
mark(int readLimit)
接続された入力ストリームの現在位置にマークを設定し、 reset() メソッドでマークした時点の 読み込み位置に 戻れるようにする。
boolean
markSupported()
接続されたストリームが mark() と reset() をサポートするかを返す。
int
readCode()
-lz5- で圧縮された 1byte の LZSS未圧縮のデータ、 もしくは圧縮コードのうち一致長を読み込む。
int
readOffset()
-lz5- で圧縮された 圧縮コードのうち一致位置を読み込む。
void
reset()
接続された入力ストリームの読み込み位置を最後に mark() メソッドが呼び出されたときの位置に設定する。

Constructor Details

PreLz5Decoder

public PreLz5Decoder(InputStream in)
-lz5- 解凍用 PreLzssDecoder を構築する。
Parameters:
in - 圧縮データを供給する入力ストリーム

Method Details

available

public int available()
            throws IOException
ブロックせずに読み出すことの出来る最低バイト数を得る。
この値は保証される。
Specified by:
available in interface PreLzssDecoder
Returns:
ブロックしないで読み出せる最低バイト数。

close

public void close()
            throws IOException
このストリームを閉じ、使用していた全ての資源を解放する。
Specified by:
close in interface PreLzssDecoder

getDictionarySize

public int getDictionarySize()
-lz5-形式の LZSS辞書のサイズを得る。
Specified by:
getDictionarySize in interface PreLzssDecoder
Returns:
-lz5-形式の LZSS辞書のサイズ

getMaxMatch

public int getMaxMatch()
-lz5-形式の LZSSの最大一致長を得る。
Specified by:
getMaxMatch in interface PreLzssDecoder
Returns:
-lz5-形式の LZSSの最大一致長

getThreshold

public int getThreshold()
-lz5-形式の LZSSの圧縮、非圧縮の閾値を得る。
Specified by:
getThreshold in interface PreLzssDecoder
Returns:
-lz5-形式の LZSSの圧縮、非圧縮の閾値

mark

public void mark(int readLimit)
接続された入力ストリームの現在位置にマークを設定し、 reset() メソッドでマークした時点の 読み込み位置に 戻れるようにする。
Specified by:
mark in interface PreLzssDecoder
Parameters:
readLimit - マーク位置に戻れる限界のバイト数。 このバイト数を超えてデータを読み 込んだ場合 reset()できなくなる可 能性がある。

markSupported

public boolean markSupported()
接続されたストリームが mark() と reset() をサポートするかを返す。
Specified by:
markSupported in interface PreLzssDecoder
Returns:
接続されたストリームが mark,reset をサポートするならtrue, サポートしないなら false

readCode

public int readCode()
            throws IOException
-lz5- で圧縮された 1byte の LZSS未圧縮のデータ、 もしくは圧縮コードのうち一致長を読み込む。
Specified by:
readCode in interface PreLzssDecoder
Returns:
1byte の 未圧縮のデータもしくは、 圧縮された圧縮コードのうち一致長

readOffset

public int readOffset()
            throws IOException
-lz5- で圧縮された 圧縮コードのうち一致位置を読み込む。
Specified by:
readOffset in interface PreLzssDecoder
Returns:
-lz5- で圧縮された圧縮コードのうち一致位置

reset

public void reset()
            throws IOException
接続された入力ストリームの読み込み位置を最後に mark() メソッドが呼び出されたときの位置に設定する。
Specified by:
reset 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.