This PR fixes an issue where values that have a least significant byte with 8 leading zeroes incorrectly is calculated as needing 0 bits to be expressed rather than requiring all bits to be expressible due to the leading byte.
Example would be a value you like 0x6000.
This is correctly calculated by the leading_zeroes method on the LeByteEncodedValue type and is fixed by updating the bits method to calculate it's needed bits by subtracting it's leading zeros from the total bits of the represented value.
Introduction
This PR fixes an issue where values that have a least significant byte with 8 leading zeroes incorrectly is calculated as needing 0 bits to be expressed rather than requiring all bits to be expressible due to the leading byte.
Example would be a value you like
0x6000
.This is correctly calculated by the
leading_zeroes
method on theLeByteEncodedValue
type and is fixed by updating the bits method to calculate it's needed bits by subtracting it's leading zeros from the total bits of the represented value.Linked Issues
resolves #118
Dependencies
Test
Review
Deployment