1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
|
//start of PreLzssDecoder.java
//TEXT_STYLE:CODE=Shift_JIS(Japanese):RET_CODE=CRLF
/**
* PreLzssDecoder.java
*
* Copyright (C) 2001 Michel Ishizuka All rights reserved.
*
* ȉ̏ɓӂȂ\[XƃoCi`̍ĔzzƎgp
* ύX̗Lɂ炸B
*
* PD\[XR[h̍ĔzzɂĒ쌠\ ̏̃Xg
* щL̐ێȂĂ͂ȂȂB
*
* QDoCi`̍ĔzzɂĒ쌠\ ̏̃Xg
* щL̐gp ̑̔zz
* ܂ގɋLqȂȂȂB
*
* ̃\tgEFA͐Β˔ڂɂĖۏŒA̖
* IBłƂۏAilLƂۏɂƂǂ܂炸A
* Ȃ閾IшÎIȕۏȂB
* Β˔ڂ ̃\tgEFA̎gpɂ钼ړIAԐړIA
* IAȁAT^IȁA邢͕KRIȑQ(gpɂf[^
* AƖ̒f〈܂Ăv̈⎸Ai
* T[rX̓l邪AĂꂾɌ肳Ȃ
* Q)ɑāAȂ鎖Ԃ̌ƂȂƂĂA_̐
* C△ߎӔC܂ ȂӔC낤ƂAƂꂪs
* ŝׂ߂łƂĂA܂͂̂悤ȑQ̉\
* ĂƂĂ̐ӔCȂ̂ƂB
*/
package jp.gr.java_conf.dangan.util.lha;
//import classes and interfaces
//import exceptions
import java.io.IOException;
import java.io.EOFException;
/**
* LZSSkR[hC^[tFCXB
*
* <pre>
* -- revision history --
* $Log: PreLzssDecoder.java,v $
* Revision 1.0 2002/07/25 00:00:00 dangan
* add to version control
* [maintenance]
* \[X
* ^up~
* CZX̏C
*
* </pre>
*
* @author $Author: dangan $
* @version $Revision: 1.0 $
*/
public interface PreLzssDecoder{
//------------------------------------------------------------------
// original method ( on the model of java.io.InputStream )
//------------------------------------------------------------------
// mark/reset
//------------------------------------------------------------------
// public abstract void mark( int readLimit )
// public abstract void reset()
// public abstract boolean markSupported()
//------------------------------------------------------------------
/**
* ڑꂽ̓Xg[݈̌ʒuɃ}[Nݒ肵A
* reset() \bhŃ}[N_̓ǂݍ݈ʒuɖ߂悤ɂB<br>
* InputStream mark() ƈႢA readLimit Őݒ肵
* EoCgOɃ}[NʒuɂȂĂ܂ȂB
* AreadLimit Ė reset() \
* InputStream ƐڑĂꍇ readLimit ɂǂ̂悤Ȓlݒ肳Ă
* reset() ŕK}[NʒuɕłȂȂȂB<br>
*
* @param readLimit }[Nʒuɖ߂ẼoCgB
* ̃oCgăf[^ǂݍꍇ
* reset()łȂȂ\B<br>
*/
public abstract void mark( int readLimit );
/**
* ڑꂽ̓Xg[̓ǂݍ݈ʒuŌ
* mark() \bhĂяoꂽƂ̈ʒuɐݒ肷B<br>
*
* @exception IOException o̓G[ꍇ
*/
public abstract void reset() throws IOException;
/**
* ڑꂽ̓Xg[ mark() reset()
* T|[g邩B<br>
*
* @return Xg[ mark() reset()
* T|[gꍇ trueB<br>
* T|[gȂꍇ falseB<br>
*/
public abstract boolean markSupported();
//------------------------------------------------------------------
// original method ( on the model of java.io.InputStream )
//------------------------------------------------------------------
// other method
//------------------------------------------------------------------
// public abstract int available()
// public abstract void close()
//------------------------------------------------------------------
/**
* ڑꂽ̓Xg[ubNȂ
* ǂݍނƂ̂łŒoCgB<br>
* ̐l͊Sł鎖ۏႵȂĂ悢B
* ͌̈ӂɍ쐬ꂽf[^ł̓ubN
* ǂݍގ̏oŒoCgɂ
* ۂɓǂݍł݂ȊOɕ@Ȃ߂łB
*
* @return ubNȂœǂݏoŒoCgB<br>
*
* @exception IOException o̓G[ꍇ
*/
public abstract int available() throws IOException;
/**
* ̓̓Xg[AgpĂ
* SẴ\[XJB<br>
*
* @exception IOException o̓G[ꍇ
*/
public abstract void close() throws IOException;
//------------------------------------------------------------------
// original method
//------------------------------------------------------------------
// read
//------------------------------------------------------------------
// public abstract int readCode()
// public abstract int readOffset()
//------------------------------------------------------------------
/**
* 1byte LZSSk̃f[^́A
* LZSS ňkꂽkR[ĥvǂݍށB<br>
* kf[^ 0`255A
* LZSSkR[h(v) 256`511 ̒lȂȂȂB<br>
*
* @return 1byte LZSSk̃f[^́A
* LZSS ňkꂽkR[ĥv
*
* @exception IOException o̓G[ꍇ
* @exception EOFException EndOfStreamɒBꍇ<br>
*/
public abstract int readCode() throws IOException;
/**
* LZSS ňkꂽkR[ĥvʒuǂݍށB<br>
*
* @return LZSS ňkꂽkR[ĥvʒu
*
* @exception IOException o̓G[ꍇ
*/
public abstract int readOffset() throws IOException;
//------------------------------------------------------------------
// original method
//------------------------------------------------------------------
// get LZSS parameter
//------------------------------------------------------------------
// public abstract int getDictionarySize()
// public abstract int getMaxMatch()
// public abstract int getThreshold()
//------------------------------------------------------------------
/**
* PreLzssDecoderLZSS̃TCYB
*
* @return LZSS̃TCY
*/
public abstract int getDictionarySize();
/**
* PreLzssDecoderŒvB
*
* @return Œv
*/
public abstract int getMaxMatch();
/**
* PreLzssDecoder鈳kAk臒lB
*
* @return LZSS臒l
*/
public abstract int getThreshold();
}
//end of PreLzssDecoder.java
|