binary file read functions (Little Endian)


These functions allow to read data from binary files, returning the direct Lisp data equivalents.
Lisp applications can use these functions to load data from application-specific (binary) data files.

This implies that the logical and physical structure of a "binary file" is known from their documentations.

signed integer 8 bit

signed integer 16 bit

signed integer 32 bit

signed integer 64 bit

unsigned integer 8 bit

unsigned integer 16 bit

unsigned integer 32 bit

unsigned integer 64 bit

float (4 bytes)

double (8 bytes)

string



Remarks

  • the file must have been opened by (open <filename> "rb") : the "rb" mode means "read binary" and is undocumented but supported by AutoLISP as well
  • these functions are already provided by emulation (vle-extension.lsp), but not fully functional under non-BricsCAD systems due to limitations of AutoLISP (work-in-progress), please use with care !
  • using these functions only with BricsCAD is suggested
  • "Little Endian" is the default byte-sequence for x86 + x64 processors, "lowest byte on lowest address";
    "Big Endian" byte-sequence originates from Motorola, Sparc, PowerPc and other processors (Mac), "highest byte on lowest address



©  Bricsys NV. All rights reserved.