xHarbour Reference Documentation > Function Reference |
Retrieves the length of data in a serialized binary string.
HB_GetLen8( <cBinaryData> ) --> nBytes
The function extracts the eight bytes encoding the length of binary data to read from a serialized binary character string and returns it as a numeric value.
HB_GetLen8() is a utility function used in xHarbour's serialization system. It reads eight bytes previously encoded with HB_CreateLen8() and determines the length of the subsequent serialized character string that must be deserialized to obtain the original data.
Note: the first byte of a serialized string contains a single letter encoding the data type (the letter is Valtype() compliant). The next eight bytes are the length of the binary data, and the rest is the binary data.
Refer to the file source\rtl\hbserial.prg for a usage example of HB_GetLen8().
See also: | HB_CreateLen8(), HB_Deserialize(), HB_Serialize() |
Category: | Serialization functions , xHarbour extensions |
Source: | rtl\hbsrlraw.c, rtl\hbserial.prg |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
http://www.xHarbour.com