code: static void writeBits(WriteStream writer, long bits, int count) {
  		for (int i = (count - 1) & ~7; i >= 0; i -= 8) {
  			writer.writeByte((byte) (bits >>> i));
  		}
  	}
docs: not does not mask off the supplied long - that is responsibility of caller