Provide byte-swapping implementation (probably only used in tests)
Port serialization test-file code to Windows
minor whitespace adjustment