A BinaryReader that can do bit wise manipulation when backed by a
NetworkBuffer
Inheritance#
System.Dynamic.ExpandoObject
System.Dynamic.ExpandoObject
System.Dynamic.ExpandoObject
Inherited Members#
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Namespace: System.Dynamic.ExpandoObject#
Assembly: MLAPI.dll#
Syntax#
Constructors#
NetworkReader(Stream)#
Creates a new NetworkReader backed by a given stream
Declaration#
Parameters#
Type | Name | Description |
---|
System.IO.Stream | stream | The stream to read from |
Methods#
CreateArraySegment(Int32, Int32)#
CreateArraySegment Creates an array segment from the size and offset
values passed in. If none are passed in, then it creates an array
segment of the entire buffer.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Int32 | sizeToCopy | size to copy |
System.Int32 | offset | offset within the stream buffer to start copying |
Returns#
Type | Description |
---|
System.ArraySegment<System.Byte> | ArraySegment<byte> |
ReadBit()#
Declaration#
Returns#
Type | Description |
---|
System.Boolean | The bit read |
ReadBits(Int32)#
Read a certain amount of bits from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Int32 | bitCount | How many bits to read. Minimum 0, maximum 8. |
Returns#
Type | Description |
---|
System.UInt64 | The bits that were read |
ReadBool()#
Declaration#
Returns#
Type | Description |
---|
System.Boolean | The bit read |
ReadByte()#
Declaration#
Returns#
Type | Description |
---|
System.Int32 | The byte read as an integer |
ReadByteArray(Byte[], Int64)#
Read byte array into an optional buffer from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Byte[] | readTo | The array to read into. If the array is not large enough or if it's null. A new array is created. |
System.Int64 | knownLength | The length of the array if it's known. Otherwise -1 |
Returns#
Type | Description |
---|
System.Byte[] | The byte array that has been read. |
ReadByteArrayDiff(Byte[], Int64)#
Read byte array diff into an optional buffer from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Byte[] | readTo | The buffer containing the old version or null. |
System.Int64 | knownLength | The length of the array if it's known. Otherwise -1 |
Returns#
Type | Description |
---|
System.Byte[] | The byte array created from the diff and original. |
ReadByteBits(Int32)#
Read a certain amount of bits from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Int32 | bitCount | How many bits to read. Minimum 0, maximum 64. |
Returns#
Type | Description |
---|
System.Byte | The bits that were read |
ReadByteDirect()#
Declaration#
Returns#
Type | Description |
---|
System.Byte | The byte read |
ReadChar()#
Read a single character from the stream
Declaration#
Returns#
Type | Description |
---|
System.Char | Value read from stream. |
ReadCharPacked()#
Read a varint two-byte character from the stream.
Declaration#
Returns#
Type | Description |
---|
System.Char | Un-varinted value. |
ReadColor()#
Read a Color from the stream.
Declaration#
Returns#
Type | Description |
---|
UnityEngine.Color | The Color read from the stream. |
ReadColor32()#
Read a Color32 from the stream.
Declaration#
Returns#
Type | Description |
---|
UnityEngine.Color32 | The Color32 read from the stream. |
ReadColorPacked()#
Read a Color from the stream.
Declaration#
Returns#
Type | Description |
---|
UnityEngine.Color | The Color read from the stream. |
ReadDouble()#
Read a double-precision floating point value from the stream.
Declaration#
Returns#
Type | Description |
---|
System.Double | The read value |
ReadDoubleArray(Double[], Int64)#
Read double array from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Double[] | readTo | The buffer to read into or null to create a new array |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Double[] | The array read from the stream. |
ReadDoubleArrayDiff(Double[], Int64)#
Read double array diff from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Double[] | readTo | The buffer containing the old version or null. |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Double[] | The array created from the diff and the current version. |
ReadDoubleArrayPacked(Double[], Int64)#
Read double array in a packed format from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Double[] | readTo | The buffer to read into or null to create a new array |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Double[] | The array read from the stream. |
ReadDoubleArrayPackedDiff(Double[], Int64)#
Read double array diff in a packed format from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Double[] | readTo | The buffer containing the old version or null. |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Double[] | The array created from the diff and the current version. |
ReadDoublePacked()#
Read a double-precision floating point value from the stream as a varint
Declaration#
Returns#
Type | Description |
---|
System.Double | The read value |
ReadFloatArray(Single[], Int64)#
Read float array from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Single[] | readTo | The buffer to read into or null to create a new array |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Single[] | The array read from the stream. |
ReadFloatArrayDiff(Single[], Int64)#
Read float array diff from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Single[] | readTo | The buffer containing the old version or null. |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Single[] | The array created from the diff and the current version. |
ReadFloatArrayPacked(Single[], Int64)#
Read float array in a packed format from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Single[] | readTo | The buffer to read into or null to create a new array |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Single[] | The array read from the stream. |
ReadFloatArrayPackedDiff(Single[], Int64)#
Read float array diff in a packed format from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Single[] | readTo | The buffer containing the old version or null. |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Single[] | The array created from the diff and the current version. |
ReadInt16()#
Read a signed short (Int16) from the stream.
Declaration#
Returns#
Type | Description |
---|
System.Int16 | Value read from stream. |
ReadInt16Packed()#
Read a ZigZag encoded varint signed short (Int16) from the stream.
Declaration#
Returns#
Type | Description |
---|
System.Int16 | Decoded un-varinted value. |
ReadInt32()#
Read a signed int (Int32) from the stream.
Declaration#
Returns#
Type | Description |
---|
System.Int32 | Value read from stream. |
ReadInt32Packed()#
Read a ZigZag encoded varint signed int (Int32) from the stream.
Declaration#
Returns#
Type | Description |
---|
System.Int32 | Decoded un-varinted value. |
ReadInt64()#
Read a signed long (Int64) from the stream.
Declaration#
Returns#
Type | Description |
---|
System.Int64 | Value read from stream. |
ReadInt64Packed()#
Read a ZigZag encoded varint signed long(Int64) from the stream.
Declaration#
Returns#
Type | Description |
---|
System.Int64 | Decoded un-varinted value. |
ReadIntArray(Int32[], Int64)#
Read int array from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Int32[] | readTo | The buffer to read into or null to create a new array |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Int32[] | The array read from the stream. |
ReadIntArrayDiff(Int32[], Int64)#
Read int array diff from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Int32[] | readTo | The buffer containing the old version or null. |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Int32[] | The array created from the diff and the current version. |
ReadIntArrayPacked(Int32[], Int64)#
Read int array in a packed format from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Int32[] | readTo | The buffer to read into or null to create a new array |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Int32[] | The array read from the stream. |
ReadIntArrayPackedDiff(Int32[], Int64)#
Read int array diff in a packed format from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Int32[] | readTo | The buffer containing the old version or null. |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Int32[] | The array created from the diff and the current version. |
ReadLongArray(Int64[], Int64)#
Read long array from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Int64[] | readTo | The buffer to read into or null to create a new array |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Int64[] | The array read from the stream. |
ReadLongArrayDiff(Int64[], Int64)#
Read long array diff from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Int64[] | readTo | The buffer containing the old version or null. |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Int64[] | The array created from the diff and the current version. |
ReadLongArrayPacked(Int64[], Int64)#
Read long array in a packed format from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Int64[] | readTo | The buffer to read into or null to create a new array |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Int64[] | The array read from the stream. |
ReadLongArrayPackedDiff(Int64[], Int64)#
Read long array diff in a packed format from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Int64[] | readTo | The buffer containing the old version or null. |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Int64[] | The array created from the diff and the current version. |
ReadNibble()#
Read a nibble (4 bits) from the stream.
Declaration#
Returns#
Type | Description |
---|
System.Byte | The nibble that was read |
ReadNibble(Boolean)#
Read a nibble (4 bits) from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Boolean | asUpper | Whether or not the nibble should be left-shifted by 4 bits |
Returns#
Type | Description |
---|
System.Byte | The nibble that was read |
ReadObjectPacked(Type)#
Reads a single boxed object of a given type in a packed format
Declaration#
Parameters#
Type | Name | Description |
---|
System.Type | type | The type to read |
Returns#
Type | Description |
---|
System.Object | Returns the boxed read object |
ReadRangedDouble(Double, Double, Int32)#
read a double-precision floating point value from the stream. The value
is between (inclusive) the minValue and maxValue.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Double | minValue | Minimum value that this value could be |
System.Double | maxValue | Maximum possible value that this could be |
System.Int32 | bytes | How many bytes the compressed value occupies. Must be between 1 and 8 (inclusive) |
Returns#
Type | Description |
---|
System.Double | The read value |
ReadRangedSingle(Single, Single, Int32)#
Read a single-precision floating point value from the stream. The value
is between (inclusive) the minValue and maxValue.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Single | minValue | Minimum value that this value could be |
System.Single | maxValue | Maximum possible value that this could be |
System.Int32 | bytes | How many bytes the compressed value occupies. Must be between 1 and 4 (inclusive) |
Returns#
Type | Description |
---|
System.Single | The read value |
ReadRay()#
Read a Ray from the stream.
Declaration#
Returns#
Type | Description |
---|
UnityEngine.Ray | The Ray read from the stream. |
ReadRay2D()#
Read a Ray2D from the stream.
Declaration#
Returns#
Type | Description |
---|
UnityEngine.Ray2D | The Ray2D read from the stream. |
ReadRay2DPacked()#
Read a Ray2D from the stream.
Declaration#
Returns#
Type | Description |
---|
UnityEngine.Ray2D | The Ray2D read from the stream. |
ReadRayPacked()#
Read a Ray from the stream.
Declaration#
Returns#
Type | Description |
---|
UnityEngine.Ray | The Ray read from the stream. |
ReadRotation()#
Reads the rotation from the stream
Declaration#
Returns#
Type | Description |
---|
UnityEngine.Quaternion | The rotation read from the stream |
ReadRotationPacked()#
Reads the rotation from the stream
Declaration#
Returns#
Type | Description |
---|
UnityEngine.Quaternion | The rotation read from the stream |
ReadSByte()#
Declaration#
Returns#
Type | Description |
---|
System.SByte | Value read from stream. |
ReadShortArray(Int16[], Int64)#
Read short array from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Int16[] | readTo | The buffer to read into or null to create a new array |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Int16[] | The array read from the stream. |
ReadShortArrayDiff(Int16[], Int64)#
Read short array diff from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Int16[] | readTo | The buffer containing the old version or null. |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Int16[] | The array created from the diff and the current version. |
ReadShortArrayPacked(Int16[], Int64)#
Read short array in a packed format from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Int16[] | readTo | The buffer to read into or null to create a new array |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Int16[] | The array read from the stream. |
ReadShortArrayPackedDiff(Int16[], Int64)#
Read short array diff in a packed format from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Int16[] | readTo | The buffer containing the old version or null. |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.Int16[] | The array created from the diff and the current version. |
ReadSingle()#
Read a single-precision floating point value from the stream.
Declaration#
Returns#
Type | Description |
---|
System.Single | The read value |
ReadSinglePacked()#
Read a single-precision floating point value from the stream from a
varint
Declaration#
Returns#
Type | Description |
---|
System.Single | The read value |
ReadString(Boolean)#
Read a string from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Boolean | oneByteChars | If set to true one byte chars are used and only ASCII is supported. |
Returns#
Type | Description |
---|
System.Text.StringBuilder | The string that was read. |
ReadString(StringBuilder, Boolean)#
Read a string from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Text.StringBuilder | builder | The builder to read the values into or null to use a new builder. |
System.Boolean | oneByteChars | If set to true one byte chars are used and only ASCII is supported. |
Returns#
Type | Description |
---|
System.Text.StringBuilder | The string that was read. |
ReadStringDiff(String, Boolean)#
Read string diff from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.String | compare | The version to compare the diff to. |
System.Boolean | oneByteChars | If set to true one byte chars are used and only ASCII is supported. |
Returns#
Type | Description |
---|
System.Text.StringBuilder | The string based on the diff and the old version. |
ReadStringDiff(StringBuilder, Boolean)#
Read string diff from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Text.StringBuilder | compareAndBuffer | The builder containing the current version and that will also be used as the output buffer. |
System.Boolean | oneByteChars | If set to true one byte chars will be used and only ASCII will be supported. |
Returns#
Type | Description |
---|
System.Text.StringBuilder | The string based on the diff and the old version. |
ReadStringDiff(StringBuilder, String, Boolean)#
Read string diff from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Text.StringBuilder | builder | The builder to read the string into or null to use a new builder. |
System.String | compare | The version to compare the diff to. |
System.Boolean | oneByteChars | If set to true one byte chars are used and only ASCII is supported. |
Returns#
Type | Description |
---|
System.Text.StringBuilder | The string based on the diff and the old version |
ReadStringPacked(StringBuilder)#
Read string encoded as a varint from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Text.StringBuilder | builder | The builder to read the string into or null to use a new builder |
Returns#
Type | Description |
---|
System.String | The string that was read. |
ReadStringPackedDiff(String)#
Read string diff encoded as varints from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.String | compare | The version to compare the diff to. |
Returns#
Type | Description |
---|
System.Text.StringBuilder | The string based on the diff and the old version. |
ReadStringPackedDiff(StringBuilder)#
Read string diff encoded as varints from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Text.StringBuilder | compareAndBuffer | The builder containing the current version and that will also be used as the output buffer. |
Returns#
Type | Description |
---|
System.Text.StringBuilder | The string based on the diff and the old version. |
ReadStringPackedDiff(StringBuilder, String)#
Read string diff encoded as varints from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.Text.StringBuilder | builder | The builder to read the string into or null to use a new builder. |
System.String | compare | The version to compare the diff to. |
Returns#
Type | Description |
---|
System.Text.StringBuilder | The string based on the diff and the old version |
ReadUInt16()#
Read an unsigned short (UInt16) from the stream.
Declaration#
Returns#
Type | Description |
---|
System.UInt16 | Value read from stream. |
ReadUInt16Packed()#
Read a varint unsigned short (UInt16) from the stream.
Declaration#
Returns#
Type | Description |
---|
System.UInt16 | Un-varinted value. |
ReadUInt32()#
Read an unsigned int (UInt32) from the stream.
Declaration#
Returns#
Type | Description |
---|
System.UInt32 | Value read from stream. |
ReadUInt32Packed()#
Read a varint unsigned int (UInt32) from the stream.
Declaration#
Returns#
Type | Description |
---|
System.UInt32 | Un-varinted value. |
ReadUInt64()#
Read an unsigned long (UInt64) from the stream.
Declaration#
Returns#
Type | Description |
---|
System.UInt64 | Value read from stream. |
ReadUInt64Packed()#
Read a varint unsigned long (UInt64) from the stream.
Declaration#
Returns#
Type | Description |
---|
System.UInt64 | Un-varinted value. |
ReadUIntArray(UInt32[], Int64)#
Read uint array from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.UInt32[] | readTo | The buffer to read into or null to create a new array |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.UInt32[] | The array read from the stream. |
ReadUIntArrayDiff(UInt32[], Int64)#
Read uint array diff from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.UInt32[] | readTo | The buffer containing the old version or null. |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.UInt32[] | The array created from the diff and the current version. |
ReadUIntArrayPacked(UInt32[], Int64)#
Read uint array in a packed format from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.UInt32[] | readTo | The buffer to read into or null to create a new array |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.UInt32[] | The array read from the stream. |
ReadULongArray(UInt64[], Int64)#
Read ulong array from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.UInt64[] | readTo | The buffer to read into or null to create a new array |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.UInt64[] | The array read from the stream. |
ReadULongArrayDiff(UInt64[], Int64)#
Read ulong array diff from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.UInt64[] | readTo | The buffer containing the old version or null. |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.UInt64[] | The array created from the diff and the current version. |
ReadULongArrayPacked(UInt64[], Int64)#
Read ulong array in a packed format from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.UInt64[] | readTo | The buffer to read into or null to create a new array |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.UInt64[] | The array read from the stream. |
ReadULongArrayPackedDiff(UInt64[], Int64)#
Read ulong array diff in a packed format from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.UInt64[] | readTo | The buffer containing the old version or null. |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.UInt64[] | The array created from the diff and the current version. |
ReadUShortArray(UInt16[], Int64)#
Read ushort array from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.UInt16[] | readTo | The buffer to read into or null to create a new array |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.UInt16[] | The array read from the stream. |
ReadUShortArrayDiff(UInt16[], Int64)#
Read ushort array diff from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.UInt16[] | readTo | The buffer containing the old version or null. |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.UInt16[] | The array created from the diff and the current version. |
ReadUShortArrayPacked(UInt16[], Int64)#
Read ushort array in a packed format from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.UInt16[] | readTo | The buffer to read into or null to create a new array |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.UInt16[] | The array read from the stream. |
ReadUShortArrayPackedDiff(UInt16[], Int64)#
Read ushort array diff in a packed format from the stream.
Declaration#
Parameters#
Type | Name | Description |
---|
System.UInt16[] | readTo | The buffer containing the old version or null. |
System.Int64 | knownLength | The known length or -1 if unknown |
Returns#
Type | Description |
---|
System.UInt16[] | The array created from the diff and the current version. |
ReadVector2()#
Read a Vector2 from the stream.
Declaration#
Returns#
Type | Description |
---|
UnityEngine.Vector2 | The Vector2 read from the stream. |
ReadVector2Packed()#
Read a Vector2 from the stream.
Declaration#
Returns#
Type | Description |
---|
UnityEngine.Vector2 | The Vector2 read from the stream. |
ReadVector3()#
Read a Vector3 from the stream.
Declaration#
Returns#
Type | Description |
---|
UnityEngine.Vector3 | The Vector3 read from the stream. |
ReadVector3Packed()#
Read a Vector3 from the stream.
Declaration#
Returns#
Type | Description |
---|
UnityEngine.Vector3 | The Vector3 read from the stream. |
ReadVector4()#
Read a Vector4 from the stream.
Declaration#
Returns#
Type | Description |
---|
UnityEngine.Vector4 | The Vector4 read from the stream. |
ReadVector4Packed()#
Read a Vector4 from the stream.
Declaration#
Returns#
Type | Description |
---|
UnityEngine.Vector4 | The Vector4 read from the stream. |
SetStream(Stream)#
Changes the underlying stream the reader is reading from
Declaration#
Parameters#
Type | Name | Description |
---|
System.IO.Stream | stream | The stream to read from |
SkipPadBits()#
Skips pad bits and aligns the position to the next byte
Declaration#