void GzWriter::writeString(string s) { int16_t i = (int16_t)(s.size()); swap_endian(i); out.write(reinterpret_cast<const char*>(&i),sizeof(i)); out.write(reinterpret_cast<const char*>(&s[0]),s.size()); }
void writeDouble(double d) {swap_endian(d); out.write(reinterpret_cast<const char*>(&d),sizeof(d));};
void writeInt(int i) {swap_endian(i); out.write(reinterpret_cast<const char*>(&i),sizeof(i));};