File: LzssSearchMethod.java

package info (click to toggle)
libjlha-java 0.0.20050504-9
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,448 kB
  • ctags: 1,411
  • sloc: java: 10,791; xml: 156; makefile: 11
file content (177 lines) | stat: -rw-r--r-- 6,129 bytes parent folder | download | duplicates (6)
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
//start of LzssSearchMethod.java
//TEXT_STYLE:CODE=Shift_JIS(Japanese):RET_CODE=CRLF

/**
 * LzssSearchMethod.java
 * 
 * Copyright (C) 2002  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̈⎸A֐i
 * 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


/**
 * LzssOutputStream Ŏgp
 * Œv񋟂C^[tFCXB<br> 
 * 
 * <br>
 * RXgN^̌`
 * <pre>
 * LzssSearchMethod( int    DictionarySize,
 *                   int    MaxMatch,
 *                   int    Threshold,
 *                   byte[] TextBuffer )
 * 
 * <strong>p[^:</strong>
 *   DictionarySize - LZSS̎TCY
 *   MaxMatch       - LZSS̍őv
 *   Threshold      - LZSS̈k/񈳏k臒l
 *   TextBuffer     - LZSSk{f[^̓obt@
 * </pre>
 * ̂悤Ȍ`ɑ邱ƁB<br>
 * ܂Alj̈Ƃ肽ꍇ
 * <pre>
 * LzssSearchMethod( int    DictionarySize,
 *                   int    MaxMatch,
 *                   int    Threshold,
 *                   byte[] TextBuffer,
 *                   Object ExtraArgument1,
 *                   Object ExtraArgument2 )
 * </pre>
 * ̂悤Ȍ`pB<br>
 * ȂARXgN^̈`FbN͒lj̈ꍇɂ‚čs΂悢B
 * <br>
 * 
 * <pre>
 * -- revision history --
 * $Log: LzssSearchMethod.java,v $
 * Revision 1.1  2002/12/04 00:00:00  dangan
 * [maintenance]
 *     \[X
 *
 * Revision 1.0  2002/07/24 00:00:00  dangan
 * add to version control
 * [change]
 *     slide() ň炸 
 *     XCh DictionarySize Ƃ悤ɕύXB
 *     putLength  putRequires ɕύX
 * [maintenance]
 *     ^up~
 *     CZX̏C
 *
 * </pre>
 * 
 * @author  $Author: dangan $
 * @version $Revision: 1.1 $
 */
public interface LzssSearchMethod{

    //------------------------------------------------------------------
    //  original method
    //------------------------------------------------------------------
    //  public abstract void put( int position )
    //  public abstract int searchAndPut( int position )
    //  public abstract int search( int position, int lastPutPos )
    //  public abstract void slide()
    //  public abstract int putRequires()
    //------------------------------------------------------------------
    /**
     * position n܂f[^p^ 
     * LzssSearchMethod ̎Œ@\ɓo^B<br>
     * LzssOutputStream  `ɁAdA
     * put ܂ searchAndPut ĂяoB<br>
     * 
     * @param position TextBuffer̃f[^p^̊Jnʒu
     */
    public abstract void put( int position );

    /**
     * @\ɓo^ꂽf[^p^
     * position n܂f[^p^
     * Œ̈v‚̂A
     *  position n܂f[^p^ 
     * LzssSearchMethod ̎Œ@\ɓo^B<br>
     * LzssOutputStream  `ɁAdA
     * put ܂ searchAndPut ĂяoB<br>
     * 
     * @param position TextBuffer̃f[^p^̊Jnʒu
     * 
     * @return v‚ꍇ
     *         LzssOutputStream.createSearchReturn 
     *         ɂĐꂽvʒuƈv̏’lA
     *         v‚Ȃꍇ
     *         LzssOutputStream.NOMATCHB
     * 
     * @see LzssOutputStream#createSearchReturn(int,int)
     * @see LzssOutputStream#NOMATCH
     */
    public abstract int searchAndPut( int position );

    /**
     * @\ɓo^ꂽf[^p^
     * position n܂f[^p^
     * Œ̈v‚̂B<br>
     * ̃\bh LzssOutputStream  
     * flush() 邽߂ɒ񋟂B<br>
     * TextBuffer.length &lt position + MaxMatch ƂȂ悤 
     * position ɂΉ邱ƁB
     * 
     * @param position   TextBuffer̃f[^p^̊Jnʒu
     * @param lastPutPos Ōɓo^f[^p^̊Jnʒu
     * 
     * @return v‚ꍇ
     *         LzssOutputStream.createSearchReturn 
     *         ɂĐꂽvʒuƈv̏’lA
     *         v‚Ȃꍇ
     *         LzssOutputStream.NOMATCHB
     * 
     * @see LzssOutputStream#createSearchReturn(int,int)
     * @see LzssOutputStream#NOMATCH
     */
    public abstract int search( int position, int lastPutPos );

    /**
     * LzssOutputStream  slide() TextBuffer̃f[^
     * DictionarySize ړۂɌ@\̃f[^
     * Ɩړ鏈sB
     */
    public abstract void slide();

    /**
     * put() ܂ searchAndPut() gp
     * f[^p^@\ɓo^鎞
     * KvƂf[^ʂ𓾂B<br>
     * 
     * @return put() ܂ searchAndPut() 
     *         @\ɓo^f[^
     */
    public abstract int putRequires();

}
//end of LzssSearchMethod.java