putdata = function (matrix, reserved, buf) {
	var n = matrix.length;
	var k = 0, dir = -1;
	for (var i = n - 1; i >= 0; i -= 2) {
		if (i == 6)
			--i; // skip the entire timing pattern column
		var jj = (dir < 0 ? n - 1 : 0);
		for (var j = 0; j < n; ++j) {
			for (var ii = i; ii > i - 2; --ii) {
				if (!reserved[jj][ii]) {
					// may overflow, but (undefined >> x)
					// is 0 so it will auto-pad to zero.
					matrix[jj][ii] = (buf[k >> 3] >> (~k & 7)) & 1;
					++k;
				}
			}
			jj += dir;
		}
		dir = -dir;
	}
	return matrix;
}
Creates a set of named styles or/and a style-overrides-object based on the item,
pushes those elements onto the stack for future evaluation and returns the number
of elements pushed, so they can be easily poped then.

@param {Object} item - an object with optional style property and/or style overrides
@return the number of items pushed onto the stack