PsInt64 class final
Represents a 64-bit signed integer in the PackStream format.
INT_64 uses 9 bytes total:
- Marker byte:
0xCB - Value bytes: 64-bit signed integer in big-endian format
This representation is automatically chosen by PsInt.compact for values that don't fit in smaller integer representations, specifically values outside the range -2,147,483,648 to 2,147,483,647.
This covers the full range of Dart integers on 64-bit platforms: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
Example:
final int64 = PsInt64(9223372036854775807);
print(int64.toBytes()); // [0xCB, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]
- Inheritance
-
- Object
- PsDataType<
int, int> - PsInt
- PsInt64
Constructors
- PsInt64(int value)
- Creates a new PackStream 64-bit integer.
- PsInt64.fromPackStreamBytes(ByteData bytes)
-
Creates a PsInt64 from PackStream bytes.
factory
Properties
- dartValue → int
-
Returns the integer value.
no setteroverride
- hashCode → int
-
Returns the hash code for this 64-bit integer value.
no setteroverride
- marker → int
-
Returns the marker byte for 64-bit integers (0xCB).
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → int
-
The 64-bit signed integer value.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toByteData(
) → ByteData -
Converts this 64-bit integer to its PackStream byte representation.
override
-
toBytes(
) → Uint8List -
Converts this PackStream data type to a byte array.
inherited
-
toString(
) → String -
Returns a string representation of this 64-bit integer.
override
Operators
-
operator ==(
Object other) → bool -
Checks if this 64-bit integer equals another object.
override