Commands specifically made for finding and manipulating binary data. Since naming is hard, we may end up changing the name. :)
- https://docs.rs/bytes/latest/bytes/
- https://github.com/cronosun/abin/
- https://github.com/Mackirac/binary_byte
- https://github.com/gmantaos/file-utils
-
bytes
query the bytes of a buffer -
bytes at
maybe thought of likestr sub-string
?- returns the byte at a specified offset in decimal 10 or hex 0x10
- returns the bytes in a range if specified like 1..10
-
bytes index-of
akabytes contains
- finds the index of a specified hex byte 0x10
- finds the index of a specified byte buffer
-
bytes to-str
- point todecode utf-8
- returns specified bytes as a utf-8 string
-
bytes build
- kind of like buildstring but for bytes
-
bytes size
akabytes length
- return the size of something in bytes
-
bytes collect
- collect bytes like str collect
-
bytes ends-with
- returns bool of whether a buffer ends with specified byte(s)
-
bytes find-replace
akabytes replace
- find and replace specified bytes
-
bytes add
- add specified bytes to the --start, --end, --index
-
bytes remove
- remove specified bytes from --start, --end, --index
-
bytes reverse
- reverse a buffer of bytes
-
bytes starts-with
- returns bool of whether a buffer starts with specified byte(s)
- https://github.com/kkayal/bitlab
- https://github.com/RustyNixieTube/bit_op
- https://github.com/niconii/twiddle
- https://github.com/gnzlbg/bitwise
-
bits shl
akashift --left
aka<<
-bitwise shift left moves bits left -
bits shr
akashift --right
aka>>
-bitwise shift right moves bits right -
bits rol
akarotate --left
- bitwise shift left move a bit left and adds it to the right
-
bits ror
akarotate --right
- bitwise shift right move a bit right and adds it to the left
-
bits and
aka&
- bitwise and performas logical and operation on each pair of bits
-
bits or
aka|
- bitwise or performs logical or operation on each pair of bits
-
bits xor
aka^
- bitwise xor perofrms logical exclusive or operation on each pair of bits
-
bits not
aka~
akacomplement
- performs logical negation on each bit
TBD - we could add later or make params or leave out and there are many more we could add
sal
- shift arithmatic leftsar
- shift arithmatic rightrcl
- rotate carry leftrcr
- rotate carry rightshld
- shift left number of bitsshrd
- shift right number of bits
I was wondering if we should use pseudo-opcodes. Maybe it's just me, but I tend to think in them :D
bits shl
,bits shr
,bits rol
,bits ror