diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 33 |
1 files changed, 30 insertions, 3 deletions
@@ -93,9 +93,9 @@ If `<USERDIR>/.cargo/bin` is part of the `PATH` environment variable, `hx` shoul ## features -### output arrays in `rust`, `c` or `golang` +### output arrays in `rust`, `c`, `golang`, `python`, `kotlin`, or `java` -`hx` has a feature which can output the input file bytes as source code arrays. +`hx` has a feature which can output the input file bytes as source code arrays. For example: @@ -126,6 +126,33 @@ a := [3]byte{ } ``` +#### python array: -ap + +```sh +$ hx -ap -c8 tests/files/tiny.txt +a = [ + 0x69, 0x6c, 0x0a +] +``` + +#### kotlin array: -ak + +```sh +$ hx -ak -c8 tests/files/tiny.txt +val a = byteArrayOf( + 0x69, 0x6c, 0x0a +) +``` + +#### java array: -aj + +```sh +$ hx -aj -c8 tests/files/tiny.txt +byte[] a = new byte[]{ + 0x69, 0x6c, 0x0a +}; +``` + ## manual ```txt @@ -141,7 +168,7 @@ FLAGS: -V, --version Prints version information OPTIONS: - -a, --array <array_format> Set source code format output: rust (r), C (c), golang (g) [possible values: r, c, g] + -a, --array <array_format> Set source code format output: rust (r), C (c), golang (g), python (p), kotlin (k), java (j) [possible values: r, c, g, p, k, j] -t, --color <color> Set color tint terminal output. 0 to disable, 1 to enable [possible values: 0, 1] -c, --cols <columns> Set column length -f, --format <format> Set format of octet: Octal (o), LowerHex (x), UpperHex (X), Binary (b) [possible |