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
-
bytesquery the bytes of a buffer -
bytes atmaybe 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-ofakabytes 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 sizeakabytes 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-replaceakabytes 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 shlakashift --leftaka<<-bitwise shift left moves bits left -
bits shrakashift --rightaka>>-bitwise shift right moves bits right -
bits rolakarotate --left- bitwise shift left move a bit left and adds it to the right
-
bits rorakarotate --right- bitwise shift right move a bit right and adds it to the left
-
bits andaka&- bitwise and performas logical and operation on each pair of bits
-
bits oraka|- bitwise or performs logical or operation on each pair of bits
-
bits xoraka^- bitwise xor perofrms logical exclusive or operation on each pair of bits
-
bits notaka~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