51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
package Tools_64 is new Natools.Smaz_64.Tools;
package Methods renames Natools.Smaz_Tools.Methods;
package Actions is
type Enum is
(Nothing,
Decode,
Encode,
Evaluate);
end Actions;
package Algorithms is
type Enum is
|
>
|
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
package Tools_64 is new Natools.Smaz_64.Tools;
package Methods renames Natools.Smaz_Tools.Methods;
package Actions is
type Enum is
(Nothing,
Adjust_Dictionary,
Decode,
Encode,
Evaluate);
end Actions;
package Algorithms is
type Enum is
|
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
|
for I in Dictionary_Entry'First .. Last_Code (Dict) loop
Sx_Output.Append_String (Dict_Entry (Dict, I));
end loop;
Sx_Output.Close_List;
end if;
case Handler.Action is
when Actions.Nothing => null;
when Actions.Decode =>
if Handler.Sx_Output then
Sx_Output.Open_List;
for S of Data_List loop
Sx_Output.Append_String (Decompress (Dict, To_SEA (S)));
end loop;
|
|
|
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
|
for I in Dictionary_Entry'First .. Last_Code (Dict) loop
Sx_Output.Append_String (Dict_Entry (Dict, I));
end loop;
Sx_Output.Close_List;
end if;
case Handler.Action is
when Actions.Nothing | Actions.Adjust_Dictionary => null;
when Actions.Decode =>
if Handler.Sx_Output then
Sx_Output.Open_List;
for S of Data_List loop
Sx_Output.Append_String (Decompress (Dict, To_SEA (S)));
end loop;
|
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
|
when Options.Check_Roundtrip =>
Handler.Check_Roundtrip := True;
when Options.Force_Word =>
if Argument'Length > 0 then
Handler.Need_Dictionary := True;
Handler.Forced_Words.Append (Argument);
end if;
end case;
end Option;
function Activate_Dictionary (Dict : in Natools.Smaz_256.Dictionary)
return Natools.Smaz_256.Dictionary
|
>
>
>
>
|
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
|
when Options.Check_Roundtrip =>
Handler.Check_Roundtrip := True;
when Options.Force_Word =>
if Argument'Length > 0 then
Handler.Need_Dictionary := True;
Handler.Forced_Words.Append (Argument);
if Handler.Action in Actions.Nothing then
Handler.Action := Actions.Adjust_Dictionary;
end if;
end if;
end case;
end Option;
function Activate_Dictionary (Dict : in Natools.Smaz_256.Dictionary)
return Natools.Smaz_256.Dictionary
|