write_vector_int(BitWriter& w, int nitems, std::vector<T>& vec,
		 int bits, int_type T::*field)
{
    // nitems times, write bits bits from the given field of the ith
    // vector to the given bit writer.

    for (size_t i = 0; i < QIntC::to_size(nitems); ++i)
    {
	w.writeBits(QIntC::to_ulonglong(vec.at(i).*field),
                    QIntC::to_size(bits));
    }
    // The PDF spec says that each hint table starts at a byte
    // boundary.  Each "row" actually must start on a byte boundary.
    w.flush();
}
write_vector_int(BitWriter& w, int nitems, std::vector<T>& vec,
		 int bits, int_type T::*field)
{
     
     

    for (size_t i = 0; i < QIntC::to_size(nitems); ++i)
    {
	w.writeBits(QIntC::to_ulonglong(vec.at(i).*field),
                    QIntC::to_size(bits));
    }
     
     
    w.flush();
}