Common Lisp Package: ELEPHANT-MEMUTIL

A low-level UFFI-based memory access and serialization toolkit. Provides basic cross-platform binary serialization support for backends.

README:

FUNCTION

Public

BUFFER-READ-BYTE

Read a byte.

BUFFER-READ-DOUBLE

Read a double-float.

BUFFER-READ-FIXNUM32

Read a 32-bit signed integer, which is assumed to be a fixnum.

BUFFER-READ-FLOAT

Read a single-float.

BUFFER-READ-INT32

Read a 32-bit signed integer.

BUFFER-READ-INT64

Read a 64-bit signed integer.

BUFFER-READ-TO-ARRAY-OFFSET

Buffer relative; read contents of buffer-stream and write them into array at offset

BUFFER-READ-UCS1-STRING

Read a UCS1 string.

BUFFER-READ-UCS4-STRING

Read a UCS4 string.

BUFFER-READ-UINT32

Read a 32-bit unsigned integer.

BUFFER-READ-UINT64

Read a 64-bit unsigned integer.

BUFFER-STREAM-BUFFER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

BUFFER-STREAM-LENGTH (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

BUFFER-STREAM-SIZE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

BUFFER-WRITE-BYTE

Write a byte.

BUFFER-WRITE-DOUBLE

Write a double-float.

BUFFER-WRITE-FIXNUM32

Write a 32-bit signed integer.

BUFFER-WRITE-FIXNUM64

Write a 64-bit signed integer.

BUFFER-WRITE-FLOAT

Write a single-float.

BUFFER-WRITE-FROM-ARRAY-OFFSET

Buffer relative; write array contents into buffer stream

BUFFER-WRITE-INT32

Write a 32-bit signed integer.

BUFFER-WRITE-INT64

Write a 64-bit signed integer.

BUFFER-WRITE-STRING

Write the underlying bytes of a string. On Unicode Lisps, this is a 16-bit operation.

BUFFER-WRITE-UINT32

Write a 32-bit unsigned integer.

BUFFER-WRITE-UINT64

Write a 64-bit unsigned integer.

RESET-BUFFER-STREAM

'Empty' the buffer-stream.

RESIZE-BUFFER-STREAM

Resize the underlying buffer of a buffer-stream, copying the old data.

RESIZE-BUFFER-STREAM-NO-COPY

Resize the underlying buffer of a buffer-stream.

Undocumented

BUFFER-READ-FIXNUM

BUFFER-READ-FIXNUM64

BUFFER-READ-INT

BUFFER-READ-OID

BUFFER-READ-UINT

SETFBUFFER-STREAM-BUFFER (NEW-VALUE INSTANCE)

SETFBUFFER-STREAM-LENGTH (NEW-VALUE INSTANCE)

SETFBUFFER-STREAM-SIZE (NEW-VALUE INSTANCE)

BUFFER-WRITE-INT

BUFFER-WRITE-OID

BUFFER-WRITE-UINT

LITTLE-ENDIAN-P

MAKE-BUFFER-STREAM

Private

BUFFER-READ-BYTE-VECTOR

Read the whole buffer into byte vector.

BUFFER-STREAM-POSITION (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

BUFFER-WRITE-BYTE-VECTOR

Read the whole buffer into byte vector.

GRAB-BUFFER-STREAM

Grab a buffer-stream from the *buffer-streams* resource pool.

OFFSET-CHAR-POINTER

Pointer arithmetic.

READ-DOUBLE

Read a double-float from a foreign char buffer.

READ-FIXNUM32

Read a 32-bit signed integer from a foreign char buffer.

READ-FLOAT

Read a single-float from a foreign char buffer.

READ-INT32

Read a 32-bit signed integer from a foreign char buffer.

READ-INT64

Read a 64-bit signed integer from a foreign char buffer.

READ-UINT32

Read a 32-bit unsigned integer from a foreign char buffer.

READ-UINT64

Read a 64-bit unsigned integer from a foreign char buffer.

RETURN-BUFFER-STREAM

Return a buffer-stream to the *buffer-streams* resource pool.

WRITE-DOUBLE

Write a double-float to a foreign char buffer.

WRITE-FIXNUM32

Write a 32-bit signed integer to a foreign char buffer.

WRITE-FIXNUM64

Write a 32-bit signed integer to a foreign char buffer.

WRITE-FLOAT

Write a single-float to a foreign char buffer.

WRITE-INT32

Write a 32-bit signed integer to a foreign char buffer.

WRITE-INT64

Write a 64-bit signed integer to a foreign char buffer.

WRITE-UINT32

Write a 32-bit unsigned integer to a foreign char buffer.

WRITE-UINT64

Write a 64-bit unsigned integer to a foreign char buffer.

Undocumented

%COPY-STR-TO-BUF

BUFFER-STREAM-P (OBJECT)

SETFBUFFER-STREAM-POSITION (NEW-VALUE INSTANCE)

COPY-BUFFER-STREAM (INSTANCE)

COPY-BUFS (DEST DEST-OFFSET SRC SRC-OFFSET LENGTH)

COPY-STR-TO-BUF

PROCESS-STRUCT-SLOT-DEFS

SAP+ (SAP OFFSET)

MACRO

Public

BYTE-LENGTH (S)

Return the number of bytes of the internal representation of a string.

WITH-BUFFER-STREAMS (NAMES &BODY BODY)

Grab a buffer-stream, executes forms, and returns the stream to the pool on exit.

Private

Undocumented

WITH-STRUCT-SLOTS (SLOT-DEFS STRUCT &BODY BODY)

VARIABLE

Public

+NULL-CHAR+

A null pointer to a char type.

+NULL-VOID+

A null pointer to a void type.

Private

*BUFFER-STREAMS*

Vector of buffer-streams, which you can grab / return.

Undocumented

*BUFFER-STREAMS-LOCK*

+LITTLE-ENDIAN+

CLASS

Public

BUFFER-STREAM

A stream-like interface to foreign (alien) char buffers.

CONSTANT

Private

Undocumented

+2^32+

+2^64+