@twinspin6 Most machines cannot handle arbitrary bit sizes - as their registers are of a fixed size and registers are different depending on the machine.
You would need to use a packed struct or similar to handle arbitrary bit sizes and it is quite slow to have most operations needing to hit memory, rather than being able to use registers.