chickadee » blob-utils

blob-utils

Documentation

Blob Hexadecimal

Blob represenation as a hexadecimal string.

Usage

(require-extension blob-hexadecimal)

blob->hex

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

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!

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

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

blob-set-u16-le!

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

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

blob-set-u16-be!

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

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

blob-set-u32-le!

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

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

blob-set-u32-be!

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

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

blob-set-u64-le!

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

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

blob-set-u64-be!

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

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

*blob-set-u8!

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

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

Performs no argument checking.

*blob-set-u16-le!

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

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

Performs no argument checking.

*blob-set-u16-be!

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

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

Performs no argument checking.

*blob-set-u32-le!

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

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

Performs no argument checking.

*blob-set-u32-be!

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

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

Performs no argument checking.

*blob-set-u64-le!

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

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

Performs no argument checking.

*blob-set-u64-be!

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

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.3
Reverted 64 bit support.
1.0.2
Removed 64 bit support.
1.0.1
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.

Contents »