jp.gr.java_conf.dangan.util.lha

Class PostLh3Encoder

Implemented Interfaces:
PostLzssEncoder

public class PostLh3Encoder
extends Object
implements PostLzssEncoder

-lh3- 圧縮用 PostLzssEncoder。
 $Log: PostLh3Encoder.java,v $
 Revision 1.2  2002/12/06 00:00:00  dangan
 [maintenance]
     ソース整備

 Revision 1.1  2002/12/01 00:00:00  dangan
 [change]
     flush() されないかぎり 
     接続された OutputStream をflush() しないように変更。
 [maintenance]
     ソース整備。

 Revision 1.0  2002/07/31 00:00:00  dangan
 add to version control
 [maintenance]
     ソース整備
     タブ廃止
     ライセンス文の修正

 
Version:
$Revision: 1.2 $
Author:
$Author: dangan $

Constructor Summary

PostLh3Encoder(OutputStream out)
-lh3- 圧縮用 PostLzssEncoderを構築する。
バッファサイズにはデフォルト値が使用される。
PostLh3Encoder(OutputStream out, int BufferSize)
-lh3- 圧縮用 PostLzssEncoderを構築する。

Method Summary

void
close()
この出力ストリームと、接続された出力ストリームを閉じ、 使用していたリソースを開放する。
void
flush()
この PostLzssEncoder にバッファリングされている全ての 8ビット単位のデータを出力先の OutputStream に出力し、 出力先の OutputStream を flush() する。
このメソッドは圧縮率を変化させる。
int
getDictionarySize()
-lh3-形式の LZSS辞書のサイズを得る。
int
getMaxMatch()
-lh3-形式の LZSSの最大一致長を得る。
int
getThreshold()
-lh3-形式の LZSSの圧縮、非圧縮の閾値を得る。
void
writeCode(int code)
1byte の LZSS未圧縮のデータもしくは、 LZSS で圧縮された圧縮コードのうち一致長を書きこむ。
void
writeOffset(int offset)
LZSS で圧縮された圧縮コードのうち一致位置を書きこむ。

Constructor Details

PostLh3Encoder

public PostLh3Encoder(OutputStream out)
-lh3- 圧縮用 PostLzssEncoderを構築する。
バッファサイズにはデフォルト値が使用される。
Parameters:
out - 圧縮データを受け取る出力ストリーム

PostLh3Encoder

public PostLh3Encoder(OutputStream out,
                      int BufferSize)
-lh3- 圧縮用 PostLzssEncoderを構築する。
Parameters:
out - 圧縮データを受け取る出力ストリーム
BufferSize - 静的ハフマン圧縮用のバッファサイズ

Method Details

close

public void close()
            throws IOException
この出力ストリームと、接続された出力ストリームを閉じ、 使用していたリソースを開放する。
Specified by:
close in interface PostLzssEncoder

flush

public void flush()
            throws IOException
この PostLzssEncoder にバッファリングされている全ての 8ビット単位のデータを出力先の OutputStream に出力し、 出力先の OutputStream を flush() する。
このメソッドは圧縮率を変化させる。
Specified by:
flush in interface PostLzssEncoder

getDictionarySize

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

getMaxMatch

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

getThreshold

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

writeCode

public void writeCode(int code)
            throws IOException
1byte の LZSS未圧縮のデータもしくは、 LZSS で圧縮された圧縮コードのうち一致長を書きこむ。
Specified by:
writeCode in interface PostLzssEncoder
Parameters:
code - 1byte の LZSS未圧縮のデータもしくは、 LZSS で圧縮された圧縮コードのうち一致長

writeOffset

public void writeOffset(int offset)
LZSS で圧縮された圧縮コードのうち一致位置を書きこむ。
Specified by:
writeOffset in interface PostLzssEncoder
Parameters:
offset - LZSS で圧縮された圧縮コードのうち一致位置

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.