The byte-vector Module

byte-vector Module

Note

Many of the names exported from the byte-vector module are imported from dylan-extensions and re-exported.

<byte-vector> Type
Equivalent:

limited(<vector>, of: <byte>)

See also:

<byte> Type
Equivalent:

limited(<integer>, min: 0, max: 255)

byte-storage-address Open Generic function

Returns the address of the raw byte storage of an object.

Signature:

byte-storage-address (the-buffer) => (result-offset)

Parameters:
  • the-buffer – An instance of <object>.

Values:
See also:

byte-storage-address(<byte-string>) Sealed Method

Returns the address of the raw byte storage of a <byte-string>.

See also:

byte-storage-address(<byte-vector>) Sealed Method

Returns the address of the raw byte storage of a <byte-vector>.

See also:

byte-storage-offset-address Open Generic function

Returns the address of the raw byte storage of an object, with an offset.

Signature:

byte-storage-offset-address (the-buffer data-offset) => (result-offset)

Parameters:
Values:
See also:

byte-storage-offset-address(<byte-string>) Sealed Method

Returns the address of the raw byte storage of a <byte-string>, with an offset.

See also:

byte-storage-offset-address(<byte-vector>) Sealed Method

Returns the address of the raw byte storage of a <byte-vector>, with an offset.

See also:

byte-vector-fill Sealed Generic function

Fill a byte vector with a specific byte value.

Signature:

byte-vector-fill (target value #key start end) => ()

Parameters:
  • target – The byte vector to fill. An instance of <byte-vector>.

  • value – The value with which to fill target. An instance of <integer>.

  • start – The index at which to start filling target. An instance of <integer>, default 0.

  • end – The index before which to stop filling target. An instance of <integer>, default target.size.

byte-vector-fill(<byte-vector>, <integer>) Sealed Method
byte-vector-fill(<byte-vector>, <byte-character>) Sealed Method
byte-vector-ref Function
Signature:

byte-vector-ref (byte-vector index) => (#rest results)

Parameters:
Values:
  • #rest results – An instance of <object>.

byte-vector-ref-setter Function
Signature:

byte-vector-ref-setter (value byte-vector index) => (#rest results)

Parameters:
Values:
copy-bytes Open Generic function

Efficiently copy bytes from one sequence to another.

Signature:

copy-bytes (dst dst-start src src-start n) => ()

Parameters:
  • dst – The destination sequence. An instance of <mutable-sequence>.

  • dst-start – The start index in dst at which to store bytes. An instance of <integer>.

  • src – The source sequence. An instance of <sequence>.

  • src-start – The start index in src at which to read bytes. An instance of <integer>.

  • n – The number of bytes to copy. An instance of <integer>.

The available method specializers are:

copy-bytes(<sequence>, <integer>, <sequence>, <integer>, <integer>) Open Method
copy-bytes(<vector>, <integer>, <vector>, <integer>, <integer>) Open Method
copy-bytes(<string>, <integer>, <string>, <integer>, <integer>) Open Method
copy-bytes(<string>, <integer>, <vector>, <integer>, <integer>) Open Method
copy-bytes(<vector>, <integer>, <string>, <integer>, <integer>) Open Method
copy-bytes(<byte-vector>, <integer>, <byte-vector>, <integer>, <integer>) Sealed Method
copy-bytes(<byte-string>, <integer>, <byte-vector>, <integer>, <integer>) Sealed Method
copy-bytes(<byte-vector>, <integer>, <byte-string>, <integer>, <integer>) Sealed Method
copy-bytes(<byte-string>, <integer>, <byte-string>, <integer>, <integer>) Sealed Method
copy-bytes(<byte-vector>, <integer>, <simple-object-vector>, <integer>, <integer>) Sealed Method
copy-bytes(<simple-object-vector>, <integer>, <byte-vector>, <integer>, <integer>) Sealed Method
hexstring(<byte-vector>) Sealed Method

Returns a string of lowercase hexadecimal digits representing the data.

Signature:

hexstring (data) => (result)

Parameters:
Values:
See also:

from-hexstring(<byte-string>) Sealed Method

Returns a <byte-vector> containing data interpreted as a hexadecimal representation of a series of bytes.

Signature:

from-hexstring (string) => (result)

Parameters:
Values:
  • result – An instance of <vector>.

See also: