global_header+=(unsignedint)global_header_offset;//relative offset of local file header, since it begins where the global header used to begin
global_header+=fname;
//build footer
std::vector<char>footer;
footer+="PK";//first part of sig
footer+=(unsignedshort)0x0605;//second part of sig
footer+=(unsignedshort)0;//number of this disk
footer+=(unsignedshort)0;//disk where footer starts
footer+=(unsignedshort)(nrecs+1);//number of records on this disk
footer+=(unsignedshort)(nrecs+1);//total number of records
footer+=(unsignedint)global_header.size();//nbytes of global headers
footer+=(unsignedint)(global_header_offset+nbytes+local_header.size());//offset of start of global headers, since global header now starts after newly written array