phobos ~master (2023-10-10T16:11:09Z)

- DoubleRepalias DoubleRep =
`FloatingPointRepresentation!double` Allows manipulating the fraction, exponent, and sign parts of a

`double`separately. The definition is:- FloatRepalias FloatRep =
`FloatingPointRepresentation!float` Allows manipulating the fraction, exponent, and sign parts of a

`float`separately. The definition is:

- Endian (from std.system)enum Endian via public
`import std.system : Endian;` Byte order endianness.

- append
`void`append(R range, T value) Takes an integral value, converts it to the given endianness, and appends it to the given range of

`ubyte`s (using`put`) as a sequence of`T.sizeof``ubyte`s starting at index.`hasSlicing!R`must be`true`.- bigEndianToNative
`T`bigEndianToNative(ubyte[n] val) Converts the given value from big endian to the native endianness and returns it. The value is given as a

`ubyte[n]`where`n`is the size of the target type. You must give the target type as a template argument, because there are multiple types with the same size and so the type of the argument is not enough to determine the return type.- bitfields
`string`bitfields() Allows creating

`bitfields`inside`structs`,`classes`and`unions`.- bitsSetauto bitsSet(T value)
Range that iterates the indices of the set bits in

`value`. Index 0 corresponds to the least significant bit. For signed integers, the highest index corresponds to the sign bit.- littleEndianToNative
`T`littleEndianToNative(ubyte[n] val) Converts the given value from little endian to the native endianness and returns it. The value is given as a

`ubyte[n]`where`n`is the size of the target type. You must give the target type as a template argument, because there are multiple types with the same size and so the type of the argument is not enough to determine the return type.- nativeToBigEndianauto nativeToBigEndian(T val)
Converts the given value from the native endianness to big endian and returns it as a

`ubyte[n]`where`n`is the size of the given type.- nativeToLittleEndianauto nativeToLittleEndian(T val)
Converts the given value from the native endianness to little endian and returns it as a

`ubyte[n]`where`n`is the size of the given type.- peek
`T`peek(R range) `T`peek(R range, size_t index)`T`peek(R range, size_t* index)Takes a range of

`ubyte`s and converts the first`T.sizeof`bytes to`T`. The value returned is converted from the given endianness to the native endianness. The range is not consumed.- read
`T`read(R range) Takes a range of

`ubyte`s and converts the first`T.sizeof`bytes to`T`. The value returned is converted from the given endianness to the native endianness. The`T.sizeof`bytes which are read are consumed from the range.- swapEndian
`T`swapEndian(T val) Swaps the endianness of the given integral value or character.

- write
`void`write(R range, T value, size_t index) `void`write(R range, T value, size_t* index)Takes an integral value, converts it to the given endianness, and writes it to the given range of

`ubyte`s as a sequence of`T.sizeof``ubyte`s starting at index.`hasSlicing!R`must be`true`.

- BitArraystruct BitArray

- taggedClassReftemplate taggedClassRef(T, string name, Ts...)
This string mixin generator allows one to create tagged class reference inside

`struct`s and`class`es.- taggedPointertemplate taggedPointer(T : T*, string name, Ts...)
This string mixin generator allows one to create tagged pointers inside

`struct`s and`class`es.

Bit-level manipulation facilities.