docs: public void updateBinaryRepresenation() {
  		// check whether the binary state is in sync
  		final int firstModified = this.firstModifiedPos;
  		if (firstModified == Integer.MAX_VALUE) {
  			return;
  		}
  		
  		final InternalDeSerializer serializer = this.serializer;
  		final int[] offsets = this.offsets;
  		final int numFields = this.numFields;
  		
  		serializer.memory = this.switchBuffer != null ? this.switchBuffer : 
  				(this.binaryLen > 0 ? new byte[this.binaryLen] : new byte[numFields * DEFAULT_FIELD_LEN_ESTIMATE + 1]);
  		serializer.position = 0;
  		
  		if (numFields > 0) {
  			int offset = 0;
  			
  			// search backwards to find the latest preceding non-null field
  			if (firstModified > 0) {
  				for (int i = firstModified - 1; i >= 0; i--) {
  					if (this.offsets[i] != NULL_INDICATOR_OFFSET) {
  						offset = this.offsets[i] + this.lengths[i];
  						break;
  					}
  				}
  			}
  			
  			// we assume that changed and unchanged fields are interleaved and serialize into another array
  			try {
  				if (offset > 0) {
  					// copy the first unchanged portion as one
  					serializer.write(this.binaryData, 0, offset);
  				}
  				// copy field by field
  				for (int i = firstModified; i < numFields; i++) {
  					final int co = offsets[i];
  					/// skip null fields
  					if (co == NULL_INDICATOR_OFFSET) {
  						continue;
  					}
  					
  					offsets[i] = offset;
  					if (co == MODIFIED_INDICATOR_OFFSET) {
  						
  						final Value writeField = this.writeFields[i];
  						
  						if (writeField == RESERVE_SPACE) {
  							// RESERVE_SPACE is a placeholder indicating lengths[i] bytes should be reserved
  							final int length = this.lengths[i];
  							
  							if (serializer.position >= serializer.memory.length - length - 1) {
  								serializer.resize(length);
  							}
  							serializer.position += length;
  							
  						} else {
  							// serialize modified fields
  							this.writeFields[i].write(serializer);
  						}
  					} else {
  						// bin-copy unmodified fields
  						serializer.write(this.binaryData, co, this.lengths[i]);
  					}
  					
  					this.lengths[i] = serializer.position - offset;
  					offset = serializer.position;
  				}
  			}
  			catch (Exception e) {
  				throw new RuntimeException("Error in data type serialization: " + e.getMessage(), e); 
  			}
  		}
  		
  		serializeHeader(serializer, offsets, numFields);
  		
  		// set the fields
  		this.switchBuffer = this.binaryData;
  		this.binaryData = serializer.memory;
  		this.binaryLen = serializer.position;
  		this.firstModifiedPos = Integer.MAX_VALUE;
  	}