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:
- [SRFI 1/(scheme list)](https://srfi.schemers.org/srfi-1)
- [SRFI 151/(scheme bitwise)](https://srfi.schemers.org/srfi-151)
- One of Scheme’s string libraries: SRFIs 152, 130, or 13
Optional dependencies:
- [(scheme bytevector)](http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-3.html#node_chap_2)
- [SRFI 133](https://srfi.schemers.org/srfi-133)
- [SRFI 145](https://srfi.schemers.org/srfi-145)
- [SRFI 158](https://srfi.schemers.org/srfi-158)
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.