anchor.diff:  	   (type fixnum src-start src-end dst-start dst-end)
   	   (type string string))
     ;; TODO: merge with above?
  -  (let ((src-current src-start)
  -	(dst-current dst-start))
  -    (declare (type fixnum src-current dst-current))
  -    ;; TODO: Don't reduce to last bytes..
  -    (flet ((pick-byte ()
  -	     (cond ((< src-current src-end)
  -		    (prog1 (aref bytes src-current)
  -		      (incf src-current)))
  -		   (t
  -		    (error 'scsu-decode-error :format-control "Reached to the end of the bytes"))))
  -	   ;; TODO: merge with encode func.
  -	   (put-char (c)
  -	     (cond ((< dst-current dst-end)
  -		    (setf (aref string dst-current) c)
  -		    (incf dst-current))
  -		   ((array-has-fill-pointer-p string)
  -		    (vector-push-extend c string) ; TODO: wrap error
  -		    (incf dst-current))
  -		   (t
  -		    (error 'scsu-decode-error :format-control "Reached to the end of the string")))))
  +  ;; TODO: Don't reduce to last bytes..
  +  (with-reading-function (pick-byte src-current)
  +      (bytes src-start src-end)
  +    (with-writing-function (put-char dst-current)
  +	(string dst-start dst-end :element-type character)
         (loop while (< src-current src-end) ; TODO: should return even after a completed control byte.
   	 as code-point = (decode-unit* state #'pick-byte)
   	 do (put-char (code-char code-point)))
  -      (values string dst-current src-current state)))) ; TODO: rearrange return values?
  +      (values string dst-current state src-current))))
  +
  +(defun decode-unit-to-bytes (bytes &key (start 0) (end (length bytes))
  +				     (state (make-instance 'scsu-state)))
  +  (let* ((ret-list (multiple-value-list 
  +		    (decode-to-string bytes :src-start start :src-end end :state state)))
  +	 (ret-string (first ret-list)))
  +    (apply #'values (char ret-string 0) (rest ret-list))))
   
   
   ;;; Encode
  
positive.code: 	   (:single-byte-mode (encode-unit*/single-byte-mode state code-point write-func))
  	   (:unicode-mode (encode-unit*/unicode-mode state code-point write-func))))))
  
  
  ;; The required length is out of BMP case.
  ;; - SQU, <high surrogate 1>, <high surrogate 2>, SQU, <low surrogate 1>, <low surrogate 2>
  
negative.code: 	  (t
  	   code-point))))
  
  (defun decode-to-string (bytes
  			 &key (src-start 0) (src-end (length bytes))
  			   (string (make-array (floor (length bytes) 2) ; no way to expect length..
  