private unsafe int WriteKey(byte lastValueByteCount, byte keyType, bool keyIsNativeType, ulong keyBytes) { WriteKeyBytes(lastValueByteCount, keyBytes); if (keyIsNativeType) { writer.WriteNativeType(keyType); } else { writer.WriteBuildInType(keyType); } int valueOffset = GetRelativePosition(); writer.FillUInt32FixNumber(); return(valueOffset); }