Skip to content

Commit

Permalink
Data encoder CLI: print input size
Browse files Browse the repository at this point in the history
  • Loading branch information
simonesestito committed Dec 12, 2023
1 parent 8a51254 commit cc2aeef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data_encoder/example/data_encoder_cli.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ void main(List<String> args) {

switch (action) {
case 'encode':
print('Input length: ${data.length}');
final resultBytes = encoder.encode(data);
print('Result bytes (hex): ${hex.encode(resultBytes)}');
print('Result length: ${resultBytes.length}');
print('Result length (bytes): ${resultBytes.length}');
break;
case 'decode':
print('Input length (bytes): ${data.length ~/ 2}');
final result = encoder.decode(requireHex(data));
print('Result: $result');
print('Result length: ${result.length}');
Expand Down

0 comments on commit cc2aeef

Please sign in to comment.