On this page:
immutable-bytes?
make-immutable-bytes
immutable-bytes
immutable-bytes-length
immutable-bytes-ref
immutable-subbytes
immutable-bytes-append
immutable-bytes->list
list->immutable-bytes
immutable-bytes=?
immutable-bytes<?
immutable-bytes>?
immutable-bytes->string/  utf-8
immutable-bytes->string/  locale
immutable-bytes->string/  latin-1
immutable-string->bytes/  utf-8
immutable-string->bytes/  locale
immutable-string->bytes/  latin-1
immutable-string-utf-8-length
immutable-bytes-utf-8-length
immutable-bytes-utf-8-ref
immutable-bytes-utf-8-index
immutable-bytes-convert
immutable-bytes-convert-end
immutable-bytes-append*
immutable-bytes-join
7.7

6.4 Immutable Bytestrings

 (require rebellion/binary/immutable-bytes)
  package: rebellion

An immutable bytestring is a bytes? value that is immutable, in the sense of immutable?. The rebellion/binary/immutable-bytes module provides functions and predicates that always accept and return immutable bytestrings.

procedure

(immutable-bytes? v)  boolean?

  v : any/c
A predicate for immutable bytestrings. Implies bytes? and immutable?.

procedure

(make-immutable-bytes size b)  immutable-bytes?

  size : natural?
  b : byte?

procedure

(immutable-bytes b ...)  immutable-bytes?

  b : byte?

procedure

(immutable-bytes-length bstr)  natural?

  bstr : immutable-bytes?

procedure

(immutable-bytes-ref bstr pos)  byte?

  bstr : immutable-bytes?
  pos : natural?

procedure

(immutable-subbytes bstr start [end])  immutable-bytes?

  bstr : immutable-bytes?
  start : natural?
  end : natural? = (immutable-bytes-length bstr)

procedure

(immutable-bytes-append bstr ...)  immutable-bytes?

  bstr : immutable-bytes?

procedure

(immutable-bytes->list bstr)  (listof byte?)

  bstr : immutable-bytes?

procedure

(list->immutable-bytes lst)  immutable-bytes?

  lst : (listof byte?)

procedure

(immutable-bytes=? bstr1 bstr2 ...)  boolean?

  bstr1 : immutable-bytes?
  bstr2 : immutable-bytes?

procedure

(immutable-bytes<? bstr1 bstr2 ...)  boolean?

  bstr1 : immutable-bytes?
  bstr2 : immutable-bytes?

procedure

(immutable-bytes>? bstr1 bstr2 ...)  boolean?

  bstr1 : immutable-bytes?
  bstr2 : immutable-bytes?

procedure

(immutable-bytes->string/utf-8 bstr    
  err-char    
  [start    
  end])  immutable-string?
  bstr : immutable-bytes?
  err-char : (or/c char? #f)
  start : natural? = 0
  end : natural? = (immutable-bytes-length bstr)

procedure

(immutable-bytes->string/locale bstr    
  err-char    
  [start    
  end])  immutable-string?
  bstr : immutable-bytes?
  err-char : (or/c char? #f)
  start : natural? = 0
  end : natural? = (immutable-bytes-length bstr)

procedure

(immutable-bytes->string/latin-1 bstr    
  err-char    
  [start    
  end])  immutable-string?
  bstr : immutable-bytes?
  err-char : (or/c char? #f)
  start : natural? = 0
  end : natural? = (immutable-bytes-length bstr)

procedure

(immutable-string->bytes/utf-8 str    
  err-byte    
  [start]    
  end)  immutable-bytes?
  str : immutable-string?
  err-byte : (or/c byte? #f)
  start : natural? = 0
  end : (immutable-string-length str)

procedure

(immutable-string->bytes/locale str    
  err-byte    
  [start]    
  end)  immutable-bytes?
  str : immutable-string?
  err-byte : (or/c byte? #f)
  start : natural? = 0
  end : (immutable-string-length str)

procedure

(immutable-string->bytes/latin-1 str    
  err-byte    
  [start]    
  end)  immutable-bytes?
  str : immutable-string?
  err-byte : (or/c byte? #f)
  start : natural? = 0
  end : (immutable-string-length str)

procedure

(immutable-string-utf-8-length str    
  [start    
  end])  natural?
  str : immutable-string?
  start : natural? = 0
  end : natural? = (immutable-string-length str)

procedure

(immutable-bytes-utf-8-length bstr    
  err-char    
  [start    
  end])  (or/c natural? #f)
  bstr : immutable-bytes?
  err-char : (or/c char? #f)
  start : natural? = 0
  end : natural? = (immutable-bytes-length bstr)

procedure

(immutable-bytes-utf-8-ref bstr    
  pos    
  err-char    
  [start    
  end])  (or/c char? #f)
  bstr : immutable-bytes?
  pos : natural?
  err-char : (or/c char? #f)
  start : natural? = 0
  end : natural? = (immutable-bytes-length bstr)

procedure

(immutable-bytes-utf-8-index bstr    
  pos    
  err-char    
  [start    
  end])  (or/c natural? #f)
  bstr : immutable-bytes?
  pos : natural?
  err-char : (or/c char? #f)
  start : natural? = 0
  end : natural? = (immutable-bytes-length bstr)

procedure

(immutable-bytes-convert converter 
  source 
  [start 
  end]) 
  
immutable-bytes?
natural?
(or/c 'complete 'continues 'aborts 'error)
  converter : bytes-converter?
  source : immutable-bytes?
  start : natural? = 0
  end : natural? = (immutable-bytes-length source)

procedure

(immutable-bytes-convert-end converter)  immutable-bytes?

  converter : bytes-converter?

procedure

(immutable-bytes-append* bstr ... bstrs)  immutable-bytes?

  bstr : immutable-bytes?
  bstrs : (listof immutable-bytes?)

procedure

(immutable-bytes-join bstrs sep)  immutable-bytes?

  bstrs : (listof immutable-bytes?)
  sep : immutable-bytes?