message: FieldWriter/Reader for main header
diff: #include "duckdb/common/exception.hpp"
  #include "duckdb/common/serializer/buffered_deserializer.hpp"
  #include "duckdb/common/serializer/buffered_serializer.hpp"
  +#include "duckdb/common/field_writer.hpp"
  #include "duckdb/storage/meta_block_reader.hpp"
  #include "duckdb/storage/meta_block_writer.hpp"
  #include "duckdb/main/config.hpp"
  @@ -18,9 +19,11 @@ const char MainHeader::MAGIC_BYTES[] = "DUCK";
  void MainHeader::Serialize(Serializer &ser) {
  ser.WriteData((data_ptr_t)MAGIC_BYTES, MAGIC_BYTE_SIZE);
  ser.Write<uint64_t>(version_number);
  + FieldWriter writer(ser);
  for (idx_t i = 0; i < FLAG_COUNT; i++) {
  - ser.Write<uint64_t>(flags[i]);
  + writer.WriteField<uint64_t>(flags[i]);
  }
  + writer.Finalize();
  }
  void MainHeader::CheckMagicBytes(FileHandle &handle) {
  @@ -43,9 +46,11 @@ MainHeader MainHeader::Deserialize(Deserializer &source) {
  }
  header.version_number = source.Read<uint64_t>();
  // read the flags
  + FieldReader reader(source);
  for (idx_t i = 0; i < FLAG_COUNT; i++) {
  - header.flags[i] = source.Read<uint64_t>();
  + header.flags[i] = reader.ReadRequired<uint64_t>();
  }
  + reader.Finalize();
  return header;
  }
  