Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | smaz_generic-tools: use Dict_Entry_Length when possible |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
b6557bf0ac639997edcfa6e22b915486 |
| User & Date: | nat 2017-05-26 20:02:20.050 |
Context
|
2017-06-12
| ||
| 19:15 | string_slices: use an immutable reference to protect from overwriting check-in: 74bf50894a user: nat tags: trunk | |
|
2017-05-26
| ||
| 20:02 | smaz_generic-tools: use Dict_Entry_Length when possible check-in: b6557bf0ac user: nat tags: trunk | |
|
2017-05-25
| ||
| 21:11 | tools/smaz: allow Optimization_Round to increase dictionary size check-in: 44c74c875f user: nat tags: trunk | |
Changes
Changes to src/natools-smaz_generic-tools.adb.
| ︙ | ︙ | |||
305 306 307 308 309 310 311 |
New_Max_Word_Length : Positive := Dict.Max_Word_Length;
begin
if Removed_Length = Dict.Max_Word_Length then
New_Max_Word_Length := 1;
for I in Dict.Offsets'Range loop
if I /= Index
| | | | 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
New_Max_Word_Length : Positive := Dict.Max_Word_Length;
begin
if Removed_Length = Dict.Max_Word_Length then
New_Max_Word_Length := 1;
for I in Dict.Offsets'Range loop
if I /= Index
and then Dict_Entry_Length (Dict, I) > New_Max_Word_Length
then
New_Max_Word_Length := Dict_Entry_Length (Dict, I);
end if;
end loop;
end if;
return Dictionary'
(Last_Code => Dictionary_Code'Pred (Dict.Last_Code),
Values_Last => Dict.Values_Last - Removed_Length,
|
| ︙ | ︙ |