LHA Library for Java

jp.gr.java_conf.dangan.util.lha
Class PostLh1Encoder

java.lang.Object
  extended by jp.gr.java_conf.dangan.util.lha.PostLh1Encoder
All Implemented Interfaces:
PostLzssEncoder

public class PostLh1Encoder
extends java.lang.Object
implements PostLzssEncoder

-lh1- 圧縮用の PostLzssEncoder。

 -- revision history --
 $Log: PostLh1Encoder.java,v $
 Revision 1.1  2002/12/01 00:00:00  dangan
 [maintenance]
     ソース整備

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

 

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

Constructor Summary
PostLh1Encoder(java.io.OutputStream out)
          -lh1- 圧縮用 PostLzssEncoder を構築する。
 
Method Summary
 void close()
          この出力ストリームと、接続された出力ストリームを閉じ、 使用していたリソースを解放する。
 void flush()
          この PostLzssEncoder にバッファリングされている 全ての 8ビット単位のデータを出力先の OutputStream に出力し、 出力先の OutputStream を flush() する。
このメソッドは圧縮率を変化させない。
 int getDictionarySize()
          -lh1-形式の LZSS辞書のサイズを得る。
 int getMaxMatch()
          -lh1-形式の LZSSの最大一致長を得る。
 int getThreshold()
          -lh1-形式の LZSSの圧縮、非圧縮の閾値を得る。
 void writeCode(int code)
          1byte の LZSS未圧縮のデータもしくは、 LZSS で圧縮された圧縮コードのうち一致長を書きこむ。
 void writeOffset(int offset)
          LZSS で圧縮された圧縮コードのうち一致位置を書きこむ。
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostLh1Encoder

public PostLh1Encoder(java.io.OutputStream out)
-lh1- 圧縮用 PostLzssEncoder を構築する。

Parameters:
out - 圧縮データを受け取る出力ストリーム
Method Detail

writeCode

public void writeCode(int code)
               throws java.io.IOException
1byte の LZSS未圧縮のデータもしくは、 LZSS で圧縮された圧縮コードのうち一致長を書きこむ。

Specified by:
writeCode in interface PostLzssEncoder
Parameters:
code - 1byte の LZSS未圧縮のデータもしくは、 LZSS で圧縮された圧縮コードのうち一致長
Throws:
java.io.IOException - 入出力エラーが発生した場合

writeOffset

public void writeOffset(int offset)
                 throws java.io.IOException
LZSS で圧縮された圧縮コードのうち一致位置を書きこむ。

Specified by:
writeOffset in interface PostLzssEncoder
Parameters:
offset - LZSS で圧縮された圧縮コードのうち一致位置
Throws:
java.io.IOException - 入出力エラーが発生した場合

flush

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

Specified by:
flush in interface PostLzssEncoder
Throws:
java.io.IOException - 入出力エラーが発生した場合
See Also:
PostLzssEncoder.flush(), BitOutputStream.flush()

close

public void close()
           throws java.io.IOException
この出力ストリームと、接続された出力ストリームを閉じ、 使用していたリソースを解放する。

Specified by:
close in interface PostLzssEncoder
Throws:
java.io.IOException - 入出力エラーが発生した場合

getDictionarySize

public int getDictionarySize()
-lh1-形式の LZSS辞書のサイズを得る。

Specified by:
getDictionarySize in interface PostLzssEncoder
Returns:
-lh1-形式の LZSS辞書のサイズ

getMaxMatch

public int getMaxMatch()
-lh1-形式の LZSSの最大一致長を得る。

Specified by:
getMaxMatch in interface PostLzssEncoder
Returns:
-lz5-形式の LZSSの最大一致長

getThreshold

public int getThreshold()
-lh1-形式の LZSSの圧縮、非圧縮の閾値を得る。

Specified by:
getThreshold in interface PostLzssEncoder
Returns:
-lh1-形式の LZSSの圧縮、非圧縮の閾値

LHA Library for Java

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.