Index: slime.el
===================================================================
RCS file: /project/slime/cvsroot/slime/slime.el,v
retrieving revision 1.417
diff -u -r1.417 slime.el
--- slime.el	1 Nov 2004 16:56:38 -0000	1.417
+++ slime.el	9 Nov 2004 17:29:28 -0000
@@ -1550,17 +1550,17 @@
         (delete-region (point-min) end)))))
 
 (defun slime-net-read3 ()
-  "Read a 24-bit big-endian integer from buffer."
+  "Read a 21-bit big-endian integer from buffer."
   (save-excursion
-    (logior (prog1 (ash (char-after) 16) (forward-char 1))
-            (prog1 (ash (char-after) 8)  (forward-char 1))
+    (logior (prog1 (ash (char-after) 14) (forward-char 1))
+            (prog1 (ash (char-after) 7)  (forward-char 1))
             (char-after))))
 
 (defun slime-net-enc3 (n)
-  "Encode an integer into a 24-bit big-endian string."
-  (string (logand (ash n -16) 255)
-          (logand (ash n -8) 255)
-          (logand n 255)))
+  "Encode an integer into a 21-bit big-endian string."
+  (string (logand (ash n -14) 127)
+          (logand (ash n -7) 127)
+          (logand n 127)))
 
 (defun slime-prin1-to-string (sexp)
   "Like `prin1-to-string' but don't octal-escape non-ascii characters.
Index: swank.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank.lisp,v
retrieving revision 1.258
diff -u -r1.258 swank.lisp
--- swank.lisp	1 Nov 2004 17:15:55 -0000	1.258
+++ swank.lisp	9 Nov 2004 17:29:28 -0000
@@ -829,8 +829,8 @@
   (let ((*swank-state-stack* (cons :read-next-form *swank-state-stack*)))
     (flet ((next-byte () (char-code (read-char stream t))))
       (handler-case
-          (let* ((length (logior (ash (next-byte) 16)
-                                 (ash (next-byte) 8)
+          (let* ((length (logior (ash (next-byte) 14)
+                                 (ash (next-byte) 7)
                                  (next-byte)))
                  (string (make-string length))
                  (pos (read-sequence string stream)))
@@ -864,8 +864,8 @@
   (let* ((string (prin1-to-string-for-emacs message))
          (length (1+ (length string))))
     (log-event "WRITE: ~A~%" string)
-    (loop for position from 16 downto 0 by 8
-          do (write-char (code-char (ldb (byte 8 position) length))
+    (loop for position from 14 downto 0 by 7
+          do (write-char (code-char (ldb (byte 7 position) length))
                          stream))
     (write-string string stream)
     (terpri stream)
