System.Types.TBitConverter

From RAD Studio API Documentation
Jump to: navigation, search

System.TObjectTBitConverter

Delphi

TBitConverter = class

C++

class PASCALIMPLEMENTATION TBitConverter : public System::TObject

Properties

Type Visibility Source Unit Parent
class public
System.Types.pas
System.Types.hpp
System.Types System.Types

Description

Converter between arrays of bytes and Delphi native types.

TBitConverter provides two main class functions:

  • From converts a value in a Delphi native type into an array of bytes.
  • InTo converts an array of bytes into a Delphi native type.

For both functions there is an unsafe version (UnsafeFrom, UnsafeInTo) which does not check that the specified Offset is valid. Unsafe functions perform better than their safe counterparts, but you must only use them if you are completely sure that the Offset value that you are passing to the function is not lower than 0 or so high that, together with the size of the specified T type, makes the target array of bytes overflow.

See Also