Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard

Represents standard data capacity units, providing multiplier values for both the metric (base-10 / SI) and binary (base-2 / IEC) measurement systems.

Properties

Link copied to clipboard

Converts this Double value into a Kapacity representing Bytes.

Converts this Float value into a Kapacity representing Bytes.

Converts this Int value into a Kapacity representing Bytes.

Converts this Long value into a Kapacity representing Bytes.

Converts this ULong value into a Kapacity representing Bytes.

Link copied to clipboard

Converts this Double value into a Kapacity representing metric Exabytes (EB).

Converts this Float value into a Kapacity representing metric Exabytes (EB).

Converts this Int value into a Kapacity representing metric Exabytes (EB).

Converts this Long value into a Kapacity representing metric Exabytes (EB).

Converts this ULong value into a Kapacity representing metric Exabytes (EB).

Link copied to clipboard

Converts this Double value into a Kapacity representing binary Exbibytes (EiB).

Converts this Float value into a Kapacity representing binary Exbibytes (EiB).

Converts this Int value into a Kapacity representing binary Exbibytes (EiB).

Converts this Long value into a Kapacity representing binary Exbibytes (EiB).

Converts this ULong value into a Kapacity representing binary Exbibytes (EiB).

Link copied to clipboard

Converts this Double value into a Kapacity representing binary Gibibytes (GiB).

Converts this Float value into a Kapacity representing binary Gibibytes (GiB).

Converts this Int value into a Kapacity representing binary Gibibytes (GiB).

Converts this Long value into a Kapacity representing binary Gibibytes (GiB).

Converts this ULong value into a Kapacity representing binary Gibibytes (GiB).

Link copied to clipboard

Converts this Double value into a Kapacity representing metric Gigabytes (GB).

Converts this Float value into a Kapacity representing metric Gigabytes (GB).

Converts this Int value into a Kapacity representing metric Gigabytes (GB).

Converts this Long value into a Kapacity representing metric Gigabytes (GB).

Converts this ULong value into a Kapacity representing metric Gigabytes (GB).

Link copied to clipboard

Returns the Kapacity of this boxed Array, calculated directly from its size.

Returns the Kapacity of this primitive ByteArray, calculated directly from its size.

Returns the Kapacity of this unsigned UByteArray, calculated directly from its size.

Returns the Kapacity of this Collection of bytes, calculated directly from its size.

Link copied to clipboard

Converts this Double value into a Kapacity representing binary Kibibytes (KiB).

Converts this Float value into a Kapacity representing binary Kibibytes (KiB).

Converts this Int value into a Kapacity representing binary Kibibytes (KiB).

Converts this Long value into a Kapacity representing binary Kibibytes (KiB).

Converts this ULong value into a Kapacity representing binary Kibibytes (KiB).

Link copied to clipboard

Converts this Double value into a Kapacity representing metric Kilobytes (KB).

Converts this Float value into a Kapacity representing metric Kilobytes (KB).

Converts this Int value into a Kapacity representing metric Kilobytes (KB).

Converts this Long value into a Kapacity representing metric Kilobytes (KB).

Converts this ULong value into a Kapacity representing metric Kilobytes (KB).

Link copied to clipboard

Converts this Double value into a Kapacity representing binary Mebibytes (MiB).

Converts this Float value into a Kapacity representing binary Mebibytes (MiB).

Converts this Int value into a Kapacity representing binary Mebibytes (MiB).

Converts this Long value into a Kapacity representing binary Mebibytes (MiB).

Converts this ULong value into a Kapacity representing binary Mebibytes (MiB).

Link copied to clipboard

Converts this Double value into a Kapacity representing metric Megabytes (MB).

Converts this Float value into a Kapacity representing metric Megabytes (MB).

Converts this Int value into a Kapacity representing metric Megabytes (MB).

Converts this Long value into a Kapacity representing metric Megabytes (MB).

Converts this ULong value into a Kapacity representing metric Megabytes (MB).

Link copied to clipboard

Converts this Double value into a Kapacity representing binary Pebibytes (PiB).

Converts this Float value into a Kapacity representing binary Pebibytes (PiB).

Converts this Int value into a Kapacity representing binary Pebibytes (PiB).

Converts this Long value into a Kapacity representing binary Pebibytes (PiB).

Converts this ULong value into a Kapacity representing binary Pebibytes (PiB).

Link copied to clipboard

Converts this Double value into a Kapacity representing metric Petabytes (PB).

Converts this Float value into a Kapacity representing metric Petabytes (PB).

Converts this Int value into a Kapacity representing metric Petabytes (PB).

Converts this Long value into a Kapacity representing metric Petabytes (PB).

Converts this ULong value into a Kapacity representing metric Petabytes (PB).

Link copied to clipboard

Converts this Double value into a Kapacity representing binary Tebibytes (TiB).

Converts this Float value into a Kapacity representing binary Tebibytes (TiB).

Converts this Int value into a Kapacity representing binary Tebibytes (TiB).

Converts this Long value into a Kapacity representing binary Tebibytes (TiB).

Converts this ULong value into a Kapacity representing binary Tebibytes (TiB).

Link copied to clipboard

Converts this Double value into a Kapacity representing metric Terabytes (TB).

Converts this Float value into a Kapacity representing metric Terabytes (TB).

Converts this Int value into a Kapacity representing metric Terabytes (TB).

Converts this Long value into a Kapacity representing metric Terabytes (TB).

Converts this ULong value into a Kapacity representing metric Terabytes (TB).

Functions

Link copied to clipboard
fun Array<Byte>.copyInto(destination: Array<Byte>, destinationOffset: Int = 0, startIndex: Int = 0, kapacity: Kapacity): Array<Byte>
fun Array<UByte>.copyInto(destination: Array<UByte>, destinationOffset: Int = 0, startIndex: Int = 0, kapacity: Kapacity): Array<UByte>
fun ByteArray.copyInto(destination: ByteArray, destinationOffset: Int = 0, startIndex: Int = 0, kapacity: Kapacity): ByteArray
fun UByteArray.copyInto(destination: UByteArray, destinationOffset: Int = 0, startIndex: Int = 0, kapacity: Kapacity): UByteArray

Copies up to the specified kapacity of bytes from this array into the destination array.

Link copied to clipboard
fun Kapacity.toArray(init: (Int) -> Byte = { 0 }): Array<Byte>

Allocates a new boxed Array of Byte with a size equal to this capacity.

Link copied to clipboard
fun Kapacity.toArrayUnsigned(init: (Int) -> UByte = { 0U }): Array<UByte>

Allocates a new boxed Array of UByte with a size equal to this capacity.

Link copied to clipboard

Allocates a new primitive ByteArray with a size equal to this capacity.

Link copied to clipboard
fun Double.toKapacity(unit: KapacityUnit, useMetric: Boolean = true): Kapacity

Converts this double-precision fractional value into a Kapacity instance based on the specified unit and standard.

fun Float.toKapacity(unit: KapacityUnit, useMetric: Boolean = true): Kapacity

Converts this single-precision fractional value into a Kapacity instance based on the specified unit and standard.

fun Long.toKapacity(unit: KapacityUnit, useMetric: Boolean = true): Kapacity

Converts this numerical value into a Kapacity instance based on the specified unit and standard.

fun ULong.toKapacity(unit: KapacityUnit, useMetric: Boolean = true): Kapacity

Converts this unsigned numerical value into a Kapacity instance based on the specified unit and standard.

Link copied to clipboard

Allocates a new primitive UByteArray with a size equal to this capacity.