anchor.diff:  
   (in-package #:com.schobadoo.bencode)
   
  -(defparameter +utf-8+ (flex:make-external-format :utf-8))
  -
   (define-condition unexpected-octet (error)
     ((expected-octet :initarg :expected-octet :reader expected-octet)
      (actual-octet :initarg :actual-octet :reader actual-octet)))
  
positive.code:             (error "Expected 0x~x got 0x~x" (char-code char) byte)))
      (continue () t)))
  
  (defun string-to-octets (string &optional (external-format +utf-8+))
    (flex:string-to-octets string :external-format external-format))
  
  (defun octets-to-string (octets external-format)
  
negative.code: 
  (defgeneric encode (object stream &key external-format)
    (:documentation "Encode object and write it to stream or, if stream
  is nil, use an in-memory stream and return the resulting sequence.
  The external-format is used when encoding strings.  UTF-8 is the
  default."))
  
  (defmethod encode (object (stream stream) &key (external-format :utf-8))
    (encode object (make-flexi-stream stream :external-format external-format)))
  
  (defmethod encode (object (stream (eql nil)) &key (external-format :utf-8))
    (with-output-to-sequence (stream)
      (encode object (make-flexi-stream stream :external-format external-format))))
  
  