Any optimization help? I want to take a Vector of u8, split it in twain and put it in a new vector. The original vector comes from fs::read, where im reading arbritary files into a vector, and then i want to manipulate that vector in a format I want
let binary_vector = [This will always yield a Vec<u8> of varying length]
// A test I did had 6 767 149 bytes, which is, yes, a lot, but I want to be able to do this quickly :p
let mut sliced_vector: Vec<u8> = Vec::new();
for byte in binary_vector {
// Get the 4 most significant bits
sliced_vector.push(byte & 0xF0);
// Get the 4 least significant bits
let mut x = byte & 0x0F;
// Shift 4 spots ahead so we can concern ourselves only with grabbing the most significant
// bits when we add text to our image.
x = x << 4;
sliced_vector.push(x);
}```