"If not specified, the value of Stream_Size for an elementary type should be the number of bits that corresponds to the minimum number of stream elements required by the first subtype of the type, rounded up to the nearest factor or multiple of the word size that is also a multiple of the stream element size."
Followed, except that the number of stream elements is a power of 2. The Stream_Size may be used to override the default choice.
However, such an implementation is based on direct binary
representations and is therefore target- and endianness-dependent. To
address this issue, GNAT also supplies an alternate implementation of
the stream attributes
Write, which uses the
target-independent XDR standard representation for scalar types.
The XDR implementation is provided as an alternative body of the
System.Stream_Attributes package, in the file
s-stratt-xdr.adb in the GNAT library.
There is no
In order to install the XDR implementation, do the following:
System.Stream_Attributespackage with the XDR implementation. For example on a Unix platform issue the commands:
$ mv s-stratt.adb s-stratt-default.adb $ mv s-stratt-xdr.adb s-stratt.adb