byte_converter library
Provides a simple interface for conversion of Digital values such as Bytes, KiloBytes etc.
This is the core export containing essential classes for most use cases.
Import Options:
// Core functionality (this import)
import 'package:byte_converter/byte_converter.dart';
// Full library with BigInt, statistics, streaming
import 'package:byte_converter/byte_converter_full.dart';
// Localization support (includes intl package)
import 'package:byte_converter/byte_converter_intl.dart';
// Lightweight (no intl dependency)
import 'package:byte_converter/byte_converter_lite.dart';
Classes
- BandwidthAccumulator
- Accumulates byte values over time for streaming scenarios.
- BigBitOperations
- Provides bit-level operations for BigByteConverter.
- BigByteConverter
- High-performance byte unit converter using BigInt for arbitrary precision.
- BigDataRate
- BigInt-precision data rate stored as bits per second.
- BitOperations
- Provides bit-level operations and conversions for byte values.
- ByteAccessibility
- Provides accessibility-friendly output formats for byte values.
- ByteComparison
- Provides comparison and relationship utilities for byte values.
- ByteConstants
- Named constants for common byte sizes.
- ByteConverter
- High-performance byte unit converter with caching.
- ByteDelta
- Represents a signed change in bytes with arbitrary precision.
- ByteDisplayOptions
- Provides alternative display formats for byte values.
- ByteDistribution
- Represents a distribution result showing how bytes are allocated across parts.
- ByteDivisionNamespace
- Division namespace providing chunking and distribution utilities.
- ByteFormatOptions
- Reusable formatter options for humanizing sizes and transfer rates.
- ByteOrdinal
- Ordinal number formatting utilities.
- ByteOutputFormats
- Provides structured output formats for programmatic use.
- BytePluralization
- Smart pluralization utilities for byte-related terms.
- ByteRange
- Inclusive-exclusive byte range [start, end) backed by BigInt.
- ByteRounding
- Extended rounding strategies for byte value formatting.
- ByteValidation
- Input validation utilities for byte values.
- ChunkDivision
- Represents a division result showing how bytes are split into chunks.
- CompoundFormatOptions
- Options controlling compound mixed-unit formatting, e.g. "1 GiB 234 MiB 12 KiB".
- DataRate
- Represents a network/data rate. Internally stored as bits per second.
- NaturalTimeDelta
- Human-friendly time descriptions for durations.
- NegativeByteFormatter
- Utilities for formatting negative byte values.
- NegativeValueOptions
- Configuration for negative value formatting.
- NetworkOverhead
- Network overhead estimation utilities.
- NetworkRate
- Network rate utilities providing bits/bytes per second conversions and transfer time calculations.
- ParseError
- Structured error information produced by parse helpers.
-
ParseResult<
T> - Result wrapper for non-throwing parse helpers.
- PluralizationOptions
- Configuration for pluralization behavior.
- RateWindow
- Represents a window of rate over a time span, for planning variable schedules.
- RelativeTime
- Relative time formatting utilities.
- RelativeTimeOptions
- Configuration options for relative time formatting.
- SINumber
- SI (International System of Units) number formatting utilities.
- SizeDelta
- Represents a change in byte size with direction awareness.
- StorageAlignment
- Describes a single alignment class within a StorageProfile.
- StorageNamespace
- Storage alignment utilities providing sector, block, page, and word calculations along with rounding and alignment checks.
- StorageProfile
- Defines storage alignment preferences used by byte converters when rounding to device-specific bucket sizes such as sectors, blocks, or pages.
- TransferPlan
- Simple transfer planning model for estimating ETAs and progress.
- ValidationResult
- Result of a validation operation.
Enums
- BigSizeUnit
- Size units for BigByteConverter with support for larger SI magnitudes.
- ByteRoundingMode
- Rounding mode enumeration for byte formatting.
- ByteStandard
- Unit standards/prefix systems used for formatting and parsing.
- DeltaDirection
- Modes for byte delta direction.
- NegativeDisplayMode
- Modes for displaying negative byte values.
- PluralizationRule
- Pluralization rules for different locales.
- RoundingMode
- Rounding modes for converting fractional values to integers.
- SizeUnit
- Byte size units for standard precision conversions (up to PB).
Extensions
- BigBitOperationsExtension on BigByteConverter
- Extension providing bit operations accessor for BigByteConverter.
- BigByteConverterNamespaces on BigByteConverter
- Extension providing namespace accessors for BigByteConverter.
- BigDataRatePlanning on BigDataRate
- Planning helpers for computing transferable bytes over a duration at a given BigDataRate. Methods avoid rounding drift by using integer math.
- BigIntByteConverterExtension on BigInt
- Extensions for BigInt to create BigByteConverter instances.
- BitOperationsExtension on ByteConverter
- Extension providing bit operations accessor for ByteConverter.
- ByteConverterNamespaces on ByteConverter
- Extension providing namespace accessors for ByteConverter.
- ByteConverterTransfer on ByteConverter
- ByteConverter helpers for transfer planning.
- ByteDivisionExtension on ByteConverter
- Extension providing division utilities on ByteConverter.
- ByteRoundingExtension on double
- Provides convenience methods for rounding byte values.
- ByteValidationExtension on ByteConverter
- Extension to add validation methods to ByteConverter.
- DataRatePlanning on DataRate
- DataRate helpers for planning.
- DoubleByteConverterExtension on double
- Extensions for double to create ByteConverter instances.
- DoublePluralizationExtension on double
- Extension on double for quick pluralization.
- IntByteConverterExtension on int
- Extensions for int to create ByteConverter instances.
- IntPluralizationExtension on int
- Extension on int for quick pluralization.
- NaturalTimeDeltaExtension on Duration
- Extension to add natural time formatting to Duration.
- NegativeBigByteConverterExtension on BigByteConverter
- Extension on BigByteConverter for negative value support.
- NegativeByteConverterExtension on ByteConverter
- Extension on ByteConverter for negative value support.
- NegativeBytesDoubleExtension on double
- Extension on double for negative byte formatting.
- OrdinalExtension on int
- Extension for ordinal formatting on integers.
- RelativeDateTimeExtension on DateTime
- Extension on DateTime for relative time formatting.
- RelativeDurationExtension on Duration
- Extension on Duration for relative time formatting.
- SINumberExtension on num
- Extension for SI number formatting on num types.
- TransferPlanAdvanced on TransferPlan
- Advanced controls: schedules, pause/resume, and throttling.
- TransferPlanOverhead on TransferPlan
- Overhead-aware duration estimations.