Skip to content

Latest commit

 

History

History
73 lines (49 loc) · 1.92 KB

implementation-README.org

File metadata and controls

73 lines (49 loc) · 1.92 KB

This is an implementation of [SRFI 207: String-Notated Bytevectors](https://srfi.schemers.org/srfi-207/).

This library should be portable to any R7RS-small implementation with the following libraries:

Optional dependencies:

This implementation provides the following additional procedures for inspecting error objects raised by some bytestring procedures; namely, those satisfying `bytestring-error?`:

`(bytestring-error-message` *error-object*`)`

Returns the message (string) encapsulated by error-object.

`(bytestring-error-irritants` *error-object*`)`

Returns a list of the irritants encapsulated by error-object.

The bytevector(s) returned by the following procedures are guaranteed to be newly-allocated.

  • bytestring-pad
  • bytestring-pad-right
  • bytestring-trim
  • bytestring-trim-right
  • bytestring-trim-both
  • bytestring-replace
  • bytestring-break
  • bytestring-span
  • bytestring-split

The implementation of base64 encoding and decoding is based on that found in Alex Shinn’s [chibi-scheme](http://synthcode.com/wiki/chibi-scheme). This code is found in the base64.scm files, along with the chibi-scheme license.

The implementation of several functions is heavily inspired by Olin Shivers’s [SRFI 13](https://srfi.schemers.org/srfi-13).

Of course, any misuse of Alex’s or Olin’s code or ideas is purely my own.

Wolfgang Corcoran-Mathe

Email: wcm at sigwinch dot xyzzy minus the zy

See the SRFI license.