/** * Parses a human-readable data size string into bytes. * Supports various units: B, KB, MB, GB, TB, PB, EB, ZB, YB. * * @param input - The data size string to parse (e.g., "5KB", "10 MB", "1.5GB"). * @param binary - Whether to use binary (1024) or decimal (1000) multiplier (default: true). * @returns The size in bytes. * * @throws {Error} If input is empty. * @throws {Error} If input format is invalid. * @throws {Error} If the numeric value is negative or NaN. * @throws {Error} If the unit is not recognized. * * @example * // Basic usage * parseDataSize("5KB"); // Returns 5120 (binary) * * @example * // With decimal multiplier * parseDataSize("5KB", false); // Returns 5000 * * @example * // With spaces * parseDataSize("10 MB"); // Returns 10485760 * * @example * // Fractional values * parseDataSize("1.5GB"); // Returns 1610612736 * * @example * // Case insensitive * parseDataSize("2kb"); // Returns 2048 * * @note Units are case-insensitive. Whitespace between number and unit is optional. * Binary mode (default) uses 1024 multiplier, decimal mode uses 1000. * * @complexity Time: O(1), Space: O(1) */ export declare function parseDataSize(input: string, binary?: boolean): number; //# sourceMappingURL=parseDataSize.d.ts.map