code: public static BitStore resizedCopyOf(BitStore store, int newSize, boolean anchorLeft) {
  		if (newSize < 0) throw new IllegalArgumentException();
  		int size = store.size();
  		if (size == newSize) return store.mutableCopy();
  		int from;
  		int to;
  		if (anchorLeft) {
  			from = size - newSize;
  			to = size;
  		} else {
  			from = 0;
  			to = newSize;
  		}
  		if (newSize < size) return store.range(from, to).mutableCopy();
  		BitStore copy = store(newSize);
  		copy.setStore(-from, store);
  		return copy;
  	}
docs: Creates a mutable, resized copy of a {@link BitStore}. The new size may
  be equal, larger or smaller than original size. When the the new size is
  greater than the original size, the new bits are identically zero. The
  method makes no guarantees about the BitStore implementation that
  results, in particular, there is certainly no guarantee that the returned
  {@link BitStore} will share its implementation with the supplied
  {@link BitStore}.
  
  @param store
  a BitStore
  @param newSize
  a new size for the BitStore
  @param anchorLeft
  true if the most-significant bit of the original store should
  remain the most-significant bit of the resized store, false if
  the least-significant bit of the original store should remain
  the least-significant bit of the resized store
  @return a resized copy of the original {@link BitStore}