Comments (8)
It is similar to -g
and -e
in xxd
, yes, but I'm not a huge fan of their nomenclature and their rather bizarre default assumptions. (Like the bizarre assumption that "normal" is big-endian, which hasn't been "normal" for decades now.) I can understand, perhaps, that you might want to keep it compatible for easier transition for users, though, so I'm only going to express a mild preference for breaking free from it.
from hexyl.
Thank you for the feedback.
It's not entirely clear to me what the output would look like.
Say I choose --word-size=2
(uint16_t) and the input contains 0xAB 0xCD 0x12 0x34
. Would you like to see
CDAB 3412
for --little-endian
and
ABCD 1234
for --big-endian
?
from hexyl.
That's pretty much exactly what I was picturing, yes.
from hexyl.
This looks similar to xxd
s -groupsize
option if I am not mistaking:
-g bytes | -groupsize bytes
Separate the output of every <bytes> bytes (two hex characters or eight
bit-digits each) by a whitespace. Specify -g 0 to suppress grouping.
<Bytes> defaults to 2 in normal mode, 4 in little-endian mode and 1 in
bits mode. Grouping does not apply to postscript or include style.
I recently came across this when reading this blog post which makes use of -g
to inspect ELF64 executables.
from hexyl.
@RinHizakura If you find the time, could you maybe summarize what is and what is not possible with your new option in #170? (released today)
from hexyl.
The new option --group-bytes
will provide the functionality to group multiple octets as a unit, which means that several bytes will be shown together without whitespace. It is quite similar to the option -groupsize
in xxd
, however, the possible group size should only be 1, 2, 4, or 8 currently.
On the other hand, this could only be shown in the big-endian format. The little-endian dump is not supported now.
from hexyl.
The new option
--group-bytes
will provide the functionality to group multiple octets as a unit, which means that several bytes will be shown together without whitespace. It is quite similar to the option-groupsize
inxxd
, however, the possible group size should only be 1, 2, 4, or 8 currently.
I think this limitation fine for now. 16 would probably be nice, but I understand that it probably interferes with --panels
.
On the other hand, this could only be shown in the big-endian format. The little-endian dump is not supported now.
Right. I agree with @ACleverDisguise that this would be a really nice feature to have. So let's keep this ticket open for now.
from hexyl.
I think the main functionality requested in this ticket is now supported with #189 by @RinHizakura now also merged.
from hexyl.
Related Issues (20)
- Add option to disable printing 0 bytes as ascii 0. HOT 1
- `--no-characters` causes output artifacts when squeezing lines HOT 5
- Is there a cheat sheet anywhere telling what color correlates to category of byte? HOT 3
- Add support for the NO_COLOR environment variable HOT 4
- Regression: broken pipe error
- Make --panels=auto the new default? HOT 3
- hexyl should not fail if `--panels=auto` is used and output is not a TTY
- Identical lines not squeezed HOT 3
- hexyl -C does the inverse of hexdump -C HOT 1
- Request: publish source tar with generated manpage HOT 3
- Support for different code pages / character tables
- Incorrect output when reading from terminal HOT 2
- Feature request: Ship as a crate HOT 3
- `hexyl /dev/zero` hangs HOT 6
- Display some non-printable characters like `bat --show-all` HOT 5
- Feature request: Comodore prg mode HOT 1
- CI artifact names conflict HOT 2
- Provide Statically Compiled Binaries for (aarch64|arm64) Linux
- Support raw output HOT 2
- Customize colors
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hexyl.