Package-level declarations

Types

Link copied to clipboard

Provides binary (base-1024) data size constants, following IEC standards (e.g., KiB, MiB). This is typically used for memory-related calculations, such as RAM or certain software contexts.

Link copied to clipboard
interface DataSizeInBytes

Defines standard data size units in bytes, providing constants for common storage measurements. Implementations of this interface specify whether the units follow binary (base-1024) or decimal (base-1000) conventions. These constants are useful for calculations involving file sizes, memory, or network data.

Link copied to clipboard

Provides decimal (base-1000) data size constants, following SI standards (e.g., KB, MB). This is typically used for file systems, network speeds, and other contexts where base-1000 units are standard.

Properties

Link copied to clipboard

Converts a Double to exabytes (EB, 1000^6 bytes).

val Int.eb: Long

Converts an Int to exabytes (EB, 1000^6 bytes).

val Long.eb: Long

Converts a Long to exabytes (EB, 1000^6 bytes).

Link copied to clipboard

Safely converts a Double to exabytes (EB, 1000^6 bytes) using BigDecimal.

Safely converts an Int to exabytes (EB, 1000^6 bytes) using BigInteger.

Safely converts a Long to exabytes (EB, 1000^6 bytes) using BigInteger.

Link copied to clipboard

Converts a Double to exbibytes (EiB, 1024^6 bytes).

val Int.eib: Long

Converts an Int to exbibytes (EiB, 1024^6 bytes).

Converts a Long to exbibytes (EiB, 1024^6 bytes).

Link copied to clipboard

Safely converts a Double to exbibytes (EiB, 1024^6 bytes) using BigDecimal.

Safely converts an Int to exbibytes (EiB, 1024^6 bytes) using BigInteger.

Safely converts a Long to exbibytes (EiB, 1024^6 bytes) using BigInteger.

Link copied to clipboard

Converts a Double to gigabytes (GB, 1000^3 bytes).

val Int.gb: Long

Converts an Int to gigabytes (GB, 1000^3 bytes).

val Long.gb: Long

Converts a Long to gigabytes (GB, 1000^3 bytes).

Link copied to clipboard

Converts a Double to gibibytes (GiB, 1024^3 bytes).

val Int.gib: Long

Converts an Int to gibibytes (GiB, 1024^3 bytes).

Converts a Long to gibibytes (GiB, 1024^3 bytes).

Link copied to clipboard

Converts a Double to kilobytes (KB, 1000 bytes).

val Int.kb: Long

Converts an Int to kilobytes (KB, 1000 bytes).

val Long.kb: Long

Converts a Long to kilobytes (KB, 1000 bytes).

Link copied to clipboard

Converts a Double to kibibytes (KiB, 1024 bytes).

val Int.kib: Long

Converts an Int to kibibytes (KiB, 1024 bytes).

Converts a Long to kibibytes (KiB, 1024 bytes).

Link copied to clipboard

Converts a Double to megabytes (MB, 1000^2 bytes).

val Int.mb: Long

Converts an Int to megabytes (MB, 1000^2 bytes).

val Long.mb: Long

Converts a Long to megabytes (MB, 1000^2 bytes).

Link copied to clipboard

Converts a Double to mebibytes (MiB, 1024^2 bytes).

val Int.mib: Long

Converts an Int to mebibytes (MiB, 1024^2 bytes).

Converts a Long to mebibytes (MiB, 1024^2 bytes).

Link copied to clipboard

Converts a Double to petabytes (PB, 1000^5 bytes).

val Int.pb: Long

Converts an Int to petabytes (PB, 1000^5 bytes).

val Long.pb: Long

Converts a Long to petabytes (PB, 1000^5 bytes).

Link copied to clipboard

Safely converts a Double to petabytes (PB, 1000^5 bytes) using BigDecimal.

Safely converts an Int to petabytes (PB, 1000^5 bytes) using BigInteger.

Safely converts a Long to petabytes (PB, 1000^5 bytes) using BigInteger.

Link copied to clipboard

Converts a Double to pebibytes (PiB, 1024^5 bytes).

val Int.pib: Long

Converts an Int to pebibytes (PiB, 1024^5 bytes).

Converts a Long to pebibytes (PiB, 1024^5 bytes).

Link copied to clipboard

Safely converts a Double to pebibytes (PiB, 1024^5 bytes) using BigDecimal.

Safely converts an Int to pebibytes (PiB, 1024^5 bytes) using BigInteger.

Safely converts a Long to pebibytes (PiB, 1024^5 bytes) using BigInteger.

Link copied to clipboard

Converts a Double to terabytes (TB, 1000^4 bytes).

val Int.tb: Long

Converts an Int to terabytes (TB, 1000^4 bytes).

val Long.tb: Long

Converts a Long to terabytes (TB, 1000^4 bytes).

Link copied to clipboard

Converts a Double to tebibytes (TiB, 1024^4 bytes).

val Int.tib: Long

Converts an Int to tebibytes (TiB, 1024^4 bytes).

Converts a Long to tebibytes (TiB, 1024^4 bytes).