public class StaticHuffman
extends java.lang.Object
-- revision history -- $Log: StaticHuffman.java,v $ Revision 1.0 2002/07/24 00:00:00 dangan add to version control [maintenance] ソース整備 タブ廃止 ライセンス文の修正
Modifier and Type | Field and Description |
---|---|
static int |
LimitLen
LHAがDOSの16bitモードを使用して作られたことによる
ハフマン符号長の制限。
|
Modifier and Type | Method and Description |
---|---|
static short[] |
createTable(int[] LenList)
LenList から、ハフマン復号用のテーブルを生成する。
|
static short[][] |
createTableAndTree(int[] LenList,
int TableBits)
LenList から、ハフマン復号用のテーブルと木を生成する。
テーブルは TableBits の大きさを持ち、それ以上の部分は木に格納される。
戻り値は new short[][]{ Table, Tree[0], Tree[1] } となる。 テーブルを引いた結果もしくは木を走査した際、負の値を得た場合、 それは復号化されたコードを全ビット反転したものである。 正の値であればそれは 木を走査するための index であり、 Tree[bit][index] のように使用する。 |
static int[] |
FreqListToLenList(int[] FreqList)
頻度表から ハフマン符号のビット長の表を作成する。
|
static int[] |
FreqListToLenListOriginal(int[] FreqList)
頻度表から ハフマン符号のビット長の表を作成する。
オリジナルのLHAと同じコードを出力する。
|
static int[] |
LenListToCodeList(int[] LenList)
ハフマン符号長のリストから ハフマン符号表を作成する。
|
public static final int LimitLen
public static int[] FreqListToLenList(int[] FreqList)
FreqList
- 頻度表public static int[] FreqListToLenListOriginal(int[] FreqList)
FreqList
- 頻度表public static int[] LenListToCodeList(int[] LenList) throws BadHuffmanTableException
LenList
- ハフマン符号長のリストBadHuffmanTableException
- LenListが不正なため、
ハフマン符号表が生成出来ない場合public static short[] createTable(int[] LenList) throws BadHuffmanTableException
LenList
- ハフマン符号長の表BadHuffmanTableException
- LenListが不正なため、
ハフマン符号表が生成出来ない場合public static short[][] createTableAndTree(int[] LenList, int TableBits) throws BadHuffmanTableException
LenList
- ハフマン符号長の表TableBits
- ハフマン復号用テーブルの大きさ。BadHuffmanTableException
- LenListが不正なため、
ハフマン符号表が生成出来ない場合
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.