def get_value_length(byte):
    """Length of the value, in bytes (value can be 8/16/24/custom bits)

    :param byte:
    :return:
    """
    length_value = byte & length_type_mask
    return LengthTypes.to_ints.get(length_value, byte & length_mask)