121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
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
|
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
|
Corpus_Entry : in String;
Compressed_Size : in out Ada.Streams.Stream_Element_Count;
Counts : in out Dictionary_Counts);
-- Compress all strings of Corpus, returning the total number of
-- compressed bytes and the number of uses for each dictionary
-- element.
function Worst_Index
(Dict : in Dictionary;
Counts : in Dictionary_Counts;
Method : in Smaz_Tools.Methods.Enum;
First, Last : in Dictionary_Code)
return Dictionary_Code
with Pre => Last in First .. Dict.Last_Code;
-- Return the element from the given interval with worst score
function Worst_Index
(Dict : in Dictionary;
Counts : in Dictionary_Counts;
Method : in Smaz_Tools.Methods.Enum)
return Dictionary_Code;
-- Return the element with worst score
return Dictionary_Code
is (Worst_Index (Dict, Counts, Method,
Dictionary_Code'First, Dict.Last_Code));
-- Return the element with worst score in the whole directionary
function Score_Encoded
(Dict : in Dictionary;
Counts : in Dictionary_Counts;
E : in Dictionary_Code)
return Smaz_Tools.Score_Value
|