| Crates.io | utils-box-bits |
| lib.rs | utils-box-bits |
| version | 1.0.2 |
| created_at | 2025-11-03 07:03:45.913181+00 |
| updated_at | 2025-12-05 09:40:20.585967+00 |
| description | A toolbox of various small RUST utilities that make bit types handling easier |
| homepage | |
| repository | https://github.com/klispap/utils-box |
| max_upload_size | |
| id | 1914059 |
| size | 15,629 |
A toolbox library that holds a useful collection of small unitilies written in Rust that make our life easier when writting Rust applications.
Convertions between different representations of raw bit streams
Mininal Example:
let received_bit_stream: u64 = 0b110101000100111010110;
let bytes = bits::bits_to_vec(received_bit_stream,21);
println!("Received bit stream: {} ", bits::bit_vec_to_hex_string(&bytes));
Make sure you have the following system-level dependencies installed:
sudo apt install pkg-config build-essential fontconfig libfontconfig1-dev
Verify that pkg-config can detect libstdc++ properly:
pkg-config --libs libstdc++
If libstdc++ is not detected, add the symbolic link:
sudo ln -s /usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.so /usr/lib/libstdc++.so