class EacRubyUtils::BitArray
def to_byte_array(big_endian = false)
-
(EacRubyUtils::ByteArray)
-
Parameters:
-
big_endian
(Boolean
) --
def to_byte_array(big_endian = false) unless count.modulo(::EacRubyUtils::Byte::BIT_COUNT).zero? raise 'Bits returned is not multile of 8' end byte_bits_enumerator.each_with_object(::EacRubyUtils::ByteArray.new) do |e, a| a << ::EacRubyUtils::Byte.from_bit_array(e, big_endian) end end