public void writeNibbleArray(byte[] v) throws IOException
	{
		final int size = v.length;
		final int byteCount = NBTInputStream.ceilDiv(size, 2);

		final byte[] data = new byte[byteCount];

		this.writeInt(size);
		for (int nibbleIndex = 0, byteIndex = 0, bitIndex = 1; nibbleIndex < size; nibbleIndex++)
		{
			int k1 = bitIndex << 2;
			data[byteIndex] |= v[nibbleIndex] << k1;
			--bitIndex;

			if (bitIndex < 0)
			{
				byteIndex++;
				bitIndex = 1;
			}
		}
		this.out.write(data);
		this.incCount(byteCount);
	}