code: public static BitVector createBitVector(byte[] data, int size) {
          BitVector bv = new BitVector(data.length * 8);
          bv.setBytes(data);
          bv.size = size;
          return bv;
      }
docs: Factory method for creating a <tt>BitVector</tt> instance
  wrapping the given byte data.
  
  @param data a byte[] containing packed bits.
  @param size Size to set the bit vector to
  
  @return the newly created <tt>BitVector</tt> instance.