You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It could be useful to have more generalized functions. Or one generic. Especially if you want the opposite byte order from what they handle (as you rightly point out, they only work based on the endianness of the current CPU).
Either way, the functions that are already there could work for what you want, if you're using the specific sizes they handle. They only do 16-bit, 32-bit, and 64-bit though... not 128.
Describe the feature
Need some functions , that can reverse bytes in u128/u64/u32/u16
for example, reverse_u32(0x12345678)=0x78563412
Use Case
This can be used in some encryption/decryption algo.
sometimes , it need reverse a 128bits/64bits...
Proposed Solution
Integrate into encoding.binary?
Other Information
No response
Acknowledgements
Version used
V full version: V 0.4.6 6e8124f
Environment details (OS name and version, etc.)
V full version: V 0.4.6 6e8124f
OS: linux, Ubuntu 22.04.4 LTS
Processor: 8 cpus, 64bit, little endian, Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz
getwd: /media/HD/github/lang/v/vlib/encoding/leb128
vexe: /media/HD/github/lang/v/v
vexe mtime: 2024-07-23 07:26:34
vroot: OK, value: /media/HD/github/lang/v
VMODULES: OK, value: /home/mars/.vmodules
VTMP: OK, value: /tmp/v_1000
Git version: git version 2.34.1
Git vroot status: weekly.2024.30-3-g6e8124fd (1 commit(s) behind V master)
.git/config present: true
CC version: cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
thirdparty/tcc status: thirdparty-linux-amd64 a0799a5b
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: