Index: slime.el
===================================================================
RCS file: /project/slime/cvsroot/slime/slime.el,v
retrieving revision 1.420
diff -u -r1.420 slime.el
--- slime.el	9 Nov 2004 12:15:44 -0000	1.420
+++ slime.el	9 Nov 2004 18:04:52 -0000
@@ -1550,16 +1550,16 @@
         (delete-region (point-min) end)))))
 
 (defun slime-net-read3 ()
-  "Read a 24-bit big-endian integer from buffer."
-  (logior (ash (char-after 1) 16)
-          (ash (char-after 2) 8)
+  "Read a 21-bit big-endian integer from buffer."
+  (logior (ash (char-after 1) 14)
+          (ash (char-after 2) 7)
           (char-after 3)))
 
 (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.260
diff -u -r1.260 swank.lisp
--- swank.lisp	9 Nov 2004 10:27:13 -0000	1.260
+++ swank.lisp	9 Nov 2004 18:04:52 -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)
