Method: SJCL::BitArray.concat
- Defined in:
- lib/sjcl/bit_array.rb
.concat(a1, a2) ⇒ Object
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/sjcl/bit_array.rb', line 43 def self.concat(a1, a2) return a1 + a2 if (a1.length === 0 || a2.length === 0) last = a1[a1.length-1] shift = getPartial(last) if (shift === 32) return a1 + a2 else return shiftRight(a2, shift, last, a1.slice(0,a1.length-1)) end end |