TDataTypeConverter (and thus various species of TQTXStream) also provides other critical utilities:


  • Endianness: The Endian property (stLittleEndian, stBigEndian) is crucial. It ensures that when you write a 32-bit integer, the byte order is correct, allowing you to create data files that are compatible with other platforms (like a native C++ application on a different server).
  • Base64 Conversion: The class includes static methods for web-centric data conversion, such as BytesToBase64 and Base64ToBytes. This is perfect for encoding binary data to be sent inside a JSON payload or for creating data: URLs for images.


Now that you know how to convert your data into a byte format, the next step is to learn how to manage the memory that holds those bytes. In the next section, we'll dive into TManagedMemory