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

blob-utils

Documentation

Blob Hexadecimal

Blob represenation as a hexadecimal string.

Usage

(require-extension blob-hexadecimal)

blob->hex

[procedure] (blob->hex BLOB [START [END]]) => BLOB

Returns a hexadecimal represenation of BLOB. START and END are subbyte limits.

BLOB is treated as a string of bytes, a byte-vector.

Blob Set Int

Stuff integers into a blob.

Usage

(require-extension blob-set-int)

blob-set-u8!

[procedure] (blob-set-u8! BLOB N [(OFFSET 0)])

Sets the byte at OFFSET to N in {{BLOB}.

blob-set-u16-le!

[procedure] (blob-set-u16-le! BLOB N [(OFFSET 0)])

Sets the 2 bytes at OFFSET to N in {{BLOB} using little-endian byte order.

blob-set-u16-be!

[procedure] (blob-set-u16-be! BLOB N [(OFFSET 0)])

Sets the 2 bytes at OFFSET to N in {{BLOB} using big-endian byte order.

blob-set-u32-le!

[procedure] (blob-set-u32-le! BLOB N [(OFFSET 0)])

Sets the 4 bytes at OFFSET to N in {{BLOB} using little-endian byte order.

blob-set-u32-be!

[procedure] (blob-set-u32-be! BLOB N [(OFFSET 0)])

Sets the 4 bytes at OFFSET to N in {{BLOB} using big-endian byte order.

blob-set-u64-le!

[procedure] (blob-set-u64-le! BLOB N [(OFFSET 0)])

Sets the 8 bytes at OFFSET to N in {{BLOB} using little-endian byte order.

blob-set-u64-be!

[procedure] (blob-set-u64-be! BLOB N [(OFFSET 0)])

Sets the 8 bytes at OFFSET to N in {{BLOB} using big-endian byte order.

*blob-set-u8!

[procedure] (*blob-set-u8! BLOB N OFFSET)

Sets the byte at OFFSET to N in {{BLOB}.

Performs no argument checking.

*blob-set-u16-le!

[procedure] (*blob-set-u16-le! BLOB N OFFSET)

Sets the 2 bytes at OFFSET to N in {{BLOB} using little-endian byte order.

Performs no argument checking.

*blob-set-u16-be!

[procedure] (*blob-set-u16-be! BLOB N OFFSET)

Sets the 2 bytes at OFFSET to N in {{BLOB} using big-endian byte order.

Performs no argument checking.

*blob-set-u32-le!

[procedure] (*blob-set-u32-le! BLOB N OFFSET)

Sets the 4 bytes at OFFSET to N in {{BLOB} using little-endian byte order.

Performs no argument checking.

*blob-set-u32-be!

[procedure] (*blob-set-u32-be! BLOB N OFFSET)

Sets the 4 bytes at OFFSET to N in {{BLOB} using big-endian byte order.

Performs no argument checking.

*blob-set-u64-le!

[procedure] (*blob-set-u64-le! BLOB N OFFSET)

Sets the 8 bytes at OFFSET to N in {{BLOB} using little-endian byte order.

Performs no argument checking.

*blob-set-u64-be!

[procedure] (*blob-set-u64-be! BLOB N OFFSET)

Sets the 8 bytes at OFFSET to N in {{BLOB} using big-endian byte order.

Performs no argument checking.

Requirements

string-utils

Author

Kon Lovett

Version history

1.0.0
Hello (Some from string-utils)

License

Copyright (C) 2012 Kon Lovett. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.