You are looking at historical revision 16225 of this page. It may differ significantly from its current revision.



endian-blob is a library of endian-specific procedures for converting blobs to numeric values and vectors.

Library Procedures

Predicates and constants

[procedure] (endian-blob? X) => BOOL

Returns #t if the given object is an endian blob, #f otherwise.

These constants specify most-significant or least-significant byte order, respectively.

Converting to and from byte blobs

[procedure] (byte-blob->endian-blob BYTE-BLOB BYTE-ORDER)

Returns an endian blob containing the given byte-blob. Argument BYTE-ORDER is one of MSB or LSB.

Converting to and from numbers and numeric vectors

These procedures convert between endian blobs and IEEE floating point numbers of single or double precision, respectively. Exceptions are thrown if the given endian blobs are of incorrect size, or if the given numbers are too big to fit in the specified size.

These procedures convert between endian blobs and the corresponding SRFI-4 vector type.

Version History


endian-port is based on routines from the C++ advanced I/O library and TIFF reader written by Oleg Kiselyov, as well as the floating-point I/O routines from GDB.

endian-port is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

endian-port is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A full copy of the GPL license can be found at <>.