A decoder specifies how data is arriving arrives from a source. There are two basic types of decoders:
...
The decoder may contain one or several in-maps, depending on whether it manages a single or multiple (mixed) record type. For multiple maps, the corresponding external records except the last one must support identification. The decoder will try tries each in_map
in the specified order. The first one, for which the identification criteria are met, will be is used.
How the record identification is specified depends on the actual external record type. For example, sequential external records must use the identified_by
option while BER encoded records support identification by the standard tagging scheme.
...
Info | ||
---|---|---|
| ||
|
This decoder starts by reading the next byte and evaluates if it equals 0x00. Should it be 0x00, it will jump jumps to the next even boundary of 2048 and repeat repeats this procedure. If it is not 0x00, it will evaluate evaluates the identification for both of the externals specified in Map1
and Map2
(in that order).
Constructed Decoders
A constructed decoder is defined in terms of a number of other simple or constructed decoders. They are used to specify the decoders to be used in sequence, for example to specify separate decoders managing header, trailer, and record information. For instance, three external record types (Rheader
, Rudr
, Rtrailer
), with corresponding in_map
s (Mheader
, Mudr
, and Mtrailer
) and decoder
s (Dheader
, Dudr
, and Dtrailer
).
...
The asterisk after Dudr
indicates that zero or more entries can occur before a terminating trailer record. For such a sub-decoder, the constructed decoder will switch switches to the next decoder when the sub-decoder cannot handle the input (as deduced by the identification criteria of the in_map
s in the sub-decoder). In this case this it means that the Dudr
decoder must support identification logic, or the Dtrailer
decoder will is never be reached (and the decoder will abort aborts with an "Unexpected EOF" error).
...
Info | ||
---|---|---|
| ||
|
The difference is that the order of header, UDR, and trailer would not be enforced for the simple decoder. The simple decoder will also does not work if, for instance, the header does not support identification.
Scroll pagebreak