diff --git a/src/Toon.php b/src/Toon.php index 8cba62f..bc8e09a 100644 --- a/src/Toon.php +++ b/src/Toon.php @@ -85,11 +85,13 @@ public static function estimateTokens(string $toon): int /** * Compare TOON vs JSON token usage. * + * Uses compact format to showcase TOON's token savings benefits. + * * @return array{toon: string, json: string, toon_tokens: int, json_tokens: int, savings_percent: float} */ - public static function compare(mixed $value, ?EncodeOptions $options = null): array + public static function compare(mixed $value): array { - $toon = self::encode($value, $options); + $toon = self::compact($value); $json = json_encode($value, JSON_THROW_ON_ERROR); $toonTokens = self::estimateTokens($toon);