Hello evbd,
i’d like to perform bitmask operations on a large Bitstrings. From what i’ve read here and elsewhere all Bitwise-operations band/bor/bnor work on integers only. In erlangs :crypto-moduleis another xor-func, that AFAIK works on binaries, but not on bitstrings. In this thread [ https://elixirforum.com/t/how-to-manipurate-bitstring-not-binary-such-as-making-a-value-concatinating-converting-into-integer/22654 ] i found solutions/workarounds that would involve padding and trimming of bitstrings so that one can use Bitwise.
I could use a Enumerable and MapSets to achive what i want. But i assume keeping anything in a large Bitstring and working with bitmasks should be more efficient.
I tried to iterate a bitstring in 10-bit-steps and expected a bitstring to work, but recieved a integer instead ?
Am i doing samt. wrong here ?
bs1 = Bitset.new 90
for << el::size(10) <- bs1.data >> do
IO.puts "|#{el}| is int ? #{is_integer el}"
el
end
What would i need to do to consume chunks of a Bitstring that are not a multiple of 8 and therefore Binaries ?
greets Andreas