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
|
use type Ada.Streams.Stream_Element_Offset;
function Dict_Entry
(Dict : in Dictionary;
Index : in Ada.Streams.Stream_Element)
return String
with Pre => Index <= Dict.Dict_Last;
procedure Find_Entry
(Dict : in Dictionary;
Template : in String;
Index : out Ada.Streams.Stream_Element;
Length : out Natural);
function To_String (Data : in Ada.Streams.Stream_Element_Array)
return String;
function Verbatim_Size (Dict : Dictionary; Original_Size : Natural)
return Ada.Streams.Stream_Element_Count;
------------------------------
-- Local Helper Subprograms --
------------------------------
function Dict_Entry
|
>
>
>
>
>
>
|
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
|
use type Ada.Streams.Stream_Element_Offset;
function Dict_Entry
(Dict : in Dictionary;
Index : in Ada.Streams.Stream_Element)
return String
with Pre => Index <= Dict.Dict_Last;
-- Return the string for at the given Index in Dict
procedure Find_Entry
(Dict : in Dictionary;
Template : in String;
Index : out Ada.Streams.Stream_Element;
Length : out Natural);
-- Try to find the longest entry in Dict that is a prefix of Template,
-- setting Length to 0 when no such entry exists.
function To_String (Data : in Ada.Streams.Stream_Element_Array)
return String;
-- Convert a stream element array into a string
function Verbatim_Size (Dict : Dictionary; Original_Size : Natural)
return Ada.Streams.Stream_Element_Count;
-- Return the number of bytes needed by the verbatim encoding
-- of Original_Size bytes.
------------------------------
-- Local Helper Subprograms --
------------------------------
function Dict_Entry
|