   p/FressianReader
   (read-boolean! [bis]
     (let [code (bsp/read! bis)]
-      (case code
-        ((.-TRUE c/codes)) true
-        ((.-FALSE c/codes)) false
+      (cond
+        (== code (.-TRUE c/codes)) true
+        (== code (.-FALSE c/codes)) false
+       :else
       (throw (js/Error. (str "Expected boolean got (" code ")"))))))
   (read-float! [bis]
     (let [code (bsp/read! bis)]
-      (case code
-        ((.-FLOAT c/codes)) (bsp/read-float! bis)
-      (throw (js/Error. (str "Expected float got (" code ")"))))))
+      (if (== code (.-FLOAT c/codes))
+        (bsp/read-float! bis)
+        (throw (js/Error. (str "Expected float got (" code ")"))))))
   (read-double! [bis]
     (let [code (bsp/read! bis)]
-      (case code
-        ((.-DOUBLE_0 c/codes)) 0.0
-        ((.-DOUBLE_1 c/codes)) 1.0
-        ((.-DOUBLE c/codes)) (bsp/read-double! bis))))
+      (cond
+        (== code (.-DOUBLE_0 c/codes)) 0.0
+        (== code (.-DOUBLE_1 c/codes)) 1.0
+        (== code (.-DOUBLE c/codes)) (bsp/read-double! bis))))
   (read-int! [bis]
     (let [code (bsp/read! bis)]
-      (case code
-        0xFF -1
-        (0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
-         0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F
-         0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17
-         0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F
-         0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27
-         0x28 0x29 0x2A 0x2B 0x2C 0x2D 0x2E 0x2F
-         0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37
-         0x38 0x39 0x3A 0x3B 0x3C 0x3D 0x3E 0x3F)
+      (cond
+        (== code 0xFF) -1
+        (<= 0x00 code 0x3F)
         (bit-and code 0xFF)
-        (0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47
-         0x48 0x49 0x4A 0x4B 0x4C 0x4D 0x4E 0x4F
-         0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57
-         0x58 0x59 0x5A 0x5B 0x5C 0x5D 0x5E 0x5F)
+        (<= 0x40 code 0x5F)
         (bit-or
           (bit-shift-left (- code (.-INT_PACKED_2_ZERO c/codes)) 8)
           (bsp/read! bis))
-        (0x60 0x61 0x62 0x63 0x64 0x65 0x66 0x67
-         0x68 0x69 0x6A 0x6B 0x6C 0x6D 0x6E 0x6F)
+        (<= 0x60 code 0x6F)
         (bit-or
           (bit-shift-left (- code (.-INT_PACKED_3_ZERO c/codes)) 16)
           (bsp/read-unsigned-int16! bis))
-        (0x70 0x71 0x72 0x73)
+        (<= 0x70 code 0x73)
         (bit-or
           (bit-shift-left (- code (.-INT_PACKED_4_ZERO c/codes)) 24)
           (bsp/read-unsigned-int24! bis))
-        (0x74 0x75 0x76 0x77)
+        (<= 0x74 code 0x77)
         (let [i32 (bsp/read-unsigned-int32! bis)]
-          (case code
-            0x74 (+ i32 (* -2 two-power-32))
-            0x75 (+ i32 (* -1 two-power-32))
-            0x76 i32
-            0x77 (+ i32 two-power-32)))
-        (0x78 0x79 0x7A 0x7B)
+          (cond
+            (== code 0x74) (+ i32 (* -2 two-power-32))
+            (== code 0x75) (+ i32 (* -1 two-power-32))
+            (== code 0x76) i32
+            (== code 0x77) (+ i32 two-power-32)))
+        (<= 0x78 code 0x7B)
         (let [ih8 (bsp/read! bis)
               il32 (bsp/read-unsigned-int32! bis)
               i40 (+ (* ih8 two-power-32) il32)]
-          (case code
-            0x78 (+ i40 (* -512 two-power-32))
-            0x79 (+ i40 (* -256 two-power-32))
-            0x7A i40
-            0x7B (+ i40 (* 256 two-power-32))))
-        (0x7C 0x7D 0x7E 0x7F)
+          (cond
+            (== code 0x78) (+ i40 (* -512 two-power-32))
+            (== code 0x79) (+ i40 (* -256 two-power-32))
+            (== code 0x7A) i40
+            (== code 0x7B) (+ i40 (* 256 two-power-32))))
+        (<= 0x7C code 0x7F)
         (let [ih16 (bsp/read-unsigned-int16! bis)
               il32 (bsp/read-unsigned-int32! bis)
               i48 (+ (* ih16 two-power-32) il32)]
-          (case code
-            0x7C (+ i48 (* -2 two-power-16 two-power-32))
-            0x7D (+ i48 (* -1 two-power-16 two-power-32))
-            0x7E i48
-            0x7F (+ i48 (* two-power-16 two-power-32))))
-        ((.-INT c/codes))
+          (cond
+            (== code 0x7C) (+ i48 (* -2 two-power-16 two-power-32))
+            (== code 0x7D) (+ i48 (* -1 two-power-16 two-power-32))
+            (== code 0x7E) i48
+            (== code 0x7F) (+ i48 (* two-power-16 two-power-32))))
+        (== code (.-INT c/codes))
         (let [ih32 (bsp/read-int32! bis)
               il32 (bsp/read-unsigned-int32! bis)]
           (if (or (> ih32 max-pos-js-hb-int) (< ih32 max-neg-js-hb-int))
             (Long. il32 ih32)
             (+ (* ih32 two-power-32) il32)))
+       :else
         (throw (js/Error. (str "Expected int64 got (" code ")"))))))
   (read-object! [bis]
     (let [code (bsp/read! bis)]
-      (case code
-        ((.-NULL c/codes)) nil
-        ((.-TRUE c/codes)) true
-        ((.-FALSE c/codes)) false
-        0xFF -1
-        (0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
-         0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F
-         0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17
-         0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F
-         0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27
-         0x28 0x29 0x2A 0x2B 0x2C 0x2D 0x2E 0x2F
-         0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37
-         0x38 0x39 0x3A 0x3B 0x3C 0x3D 0x3E 0x3F)
+      (cond
+        (== code (.-NULL c/codes)) nil
+        (== code (.-TRUE c/codes)) true
+        (== code (.-FALSE c/codes)) false
+        (== code 0xFF) -1
+        (<= 0x00 code 0x3F)
         (bit-and code 0xFF)
-        (0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47
-         0x48 0x49 0x4A 0x4B 0x4C 0x4D 0x4E 0x4F
-         0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57
-         0x58 0x59 0x5A 0x5B 0x5C 0x5D 0x5E 0x5F)
+        (<= 0x40 code  0x5F)
         (bit-or
           (bit-shift-left (- code (.-INT_PACKED_2_ZERO c/codes)) 8)
           (bsp/read! bis))
-        (0x60 0x61 0x62 0x63 0x64 0x65 0x66 0x67
-         0x68 0x69 0x6A 0x6B 0x6C 0x6D 0x6E 0x6F)
+        (<= 0x60 code 0x6F)
         (bit-or
           (bit-shift-left (- code (.-INT_PACKED_3_ZERO c/codes)) 16)
           (bsp/read-unsigned-int16! bis))
-        (0x70 0x71 0x72 0x73)
+        (<= 0x70 code 0x73)
         (bit-or
           (bit-shift-left (- code (.-INT_PACKED_4_ZERO c/codes)) 24)
           (bsp/read-unsigned-int24! bis))
-        (0x74 0x75 0x76 0x77)
+        (<= 0x74 code 0x77)
         (let [i32 (bsp/read-unsigned-int32! bis)]
-          (case code
-            0x74 (+ i32 (* -2 two-power-32))
-            0x75 (+ i32 (* -1 two-power-32))
-            0x76 i32
-            0x77 (+ i32 two-power-32)))
-        (0x78 0x79 0x7A 0x7B)
+          (cond
+            (== code 0x74) (+ i32 (* -2 two-power-32))
+            (== code 0x75) (+ i32 (* -1 two-power-32))
+            (== code 0x76) i32
+            (== code 0x77) (+ i32 two-power-32)))
+        (<= 0x78 code 0x7B)
         (let [ih8 (bsp/read! bis)
               il32 (bsp/read-unsigned-int32! bis)
               i40 (+ (* ih8 two-power-32) il32)]
-          (case code
-            0x78 (+ i40 (* -512 two-power-32))
-            0x79 (+ i40 (* -256 two-power-32))
-            0x7A i40
-            0x7B (+ i40 (* 256 two-power-32))))
-        (0x7C 0x7D 0x7E 0x7F)
+          (cond
+            (== code 0x78) (+ i40 (* -512 two-power-32))
+            (== code 0x79) (+ i40 (* -256 two-power-32))
+            (== code 0x7A) i40
+            (== code 0x7B) (+ i40 (* 256 two-power-32))))
+        (<= 0x7C code 0x7F)
         (let [ih16 (bsp/read-unsigned-int16! bis)
               il32 (bsp/read-unsigned-int32! bis)
               i48 (+ (* ih16 two-power-32) il32)]
-          (case code
-            0x7C (+ i48 (* -2 two-power-16 two-power-32))
-            0x7D (+ i48 (* -1 two-power-16 two-power-32))
-            0x7E i48
-            0x7F (+ i48 (* two-power-16 two-power-32))))
-        ((.-INT c/codes))
+          (cond
+            (== code 0x7C) (+ i48 (* -2 two-power-16 two-power-32))
+            (== code 0x7D) (+ i48 (* -1 two-power-16 two-power-32))
+            (== code 0x7E) i48
+            (== code 0x7F) (+ i48 (* two-power-16 two-power-32))))
+        (== code (.-INT c/codes))
         (let [ih32 (bsp/read-int32! bis)
               il32 (bsp/read-unsigned-int32! bis)]
           (if (or (> ih32 max-pos-js-hb-int) (< ih32 max-neg-js-hb-int))
             (Long. il32 ih32)
             (+ (* ih32 two-power-32) il32)))
-        ((.-STRING c/codes))
+        (== code (.-STRING c/codes))
         (let [string-buffer (StringBuffer.)]
           (do
             (read-string-buffer! bis string-buffer (p/read-object! bis))
             (.toString string-buffer)))
-        (0xDA 0xDB 0xDC 0xDD 0xDE 0xDF 0xE0 0xE1)
+        (<= 0xDA code 0xE1)
         (let [string-buffer (StringBuffer.)]
           (do
             (read-string-buffer! bis string-buffer (- code (.-STRING_PACKED_LENGTH_START c/codes)))
             (.toString string-buffer)))
-        ((.-STRING_CHUNK c/codes))
+        (== code (.-STRING_CHUNK c/codes))
         (let [string-buffer (StringBuffer.)]
           (do
             (read-string-buffer! bis string-buffer (p/read-object! bis))
             (loop []
               (let [next-code (bsp/read! bis)]
-                (case next-code
-                  ((.-STRING c/codes))
+                (cond
+                  (== next-code (.-STRING c/codes))
                   (read-string-buffer! bis string-buffer (p/read-object! bis))
-                  (0xDA 0xDB 0xDC 0xDD 0xDE 0xDF 0xE0 0xE1)
+                  (<= 0xDA next-code 0xE1)
                   (read-string-buffer! bis string-buffer (- next-code (.-STRING_PACKED_LENGTH_START c/codes)))
-                  ((.-STRING_CHUNK c/codes))
+                  (== next-code (.-STRING_CHUNK c/codes))
                     (do
                       (read-string-buffer! bis string-buffer (p/read-object! bis))
                       (recur))
+                  :else
                   (throw (js/Error. (str "Expected chunked string (" next-code ")"))))))
             (.toString string-buffer)))
-        ((.-BYTES c/codes))
+        (== code (.-BYTES c/codes))
         (let [length (p/read-object! bis)
               ba (make-byte-array length)]
           (do
             (bsp/read-bytes! bis ba 0 length)
             ba))
-        (0xD0 0xD1 0xD2 0xD3 0xD4 0xD5 0xD6 0xD7)
+        (<= 0xD0 code 0xD7)
         (let [length (- code (.-BYTES_PACKED_LENGTH_START c/codes))
               ba (make-byte-array length)]
           (do
             (bsp/read-bytes! bis ba 0 length)
             ba))
-        ((.-BYTES_CHUNK c/codes))
+        (== code (.-BYTES_CHUNK c/codes))
         (let [chunks (array)]
           (do
             (loop [code code]

                buf-pos (aget sa 1)]
            (cond
              (< buf-pos (.-STRING_PACKED_LENGTH_END c/ranges)) (bsp/write! bos (+ (.-STRING_PACKED_LENGTH_START c/codes) buf-pos))
              (= new-str-pos (alength s))
                (do
                  (bsp/write! bos (.-STRING c/codes))
                  (p/write-int! bos buf-pos))

              (do
                (.push oa (p/read-object! bis))
                (recur (.peek-read bis))))))
        (<= 0xE4 code 0xEB)
        (let [oa #js []
              length (- code (.-LIST_PACKED_LENGTH_START c/codes))]
          (do
            (dotimes [i length]
              (.push oa (p/read-object! bis)))
            oa))
        (== code (.-LIST c/codes))
        (let [oa #js []
              length (p/read-object! bis)]
          (do
            (dotimes [i length]
              (.push oa (p/read-object! bis)))
            oa))
        (== code (.-STRUCTTYPE c/codes))
        (let [tag (p/read-object! bis)
              fields (p/read-int! bis)]
          (do
            (.push (.-struct-cache bis) (bs/struct-cache tag fields))
            (.handle-struct bis tag fields)))
        (<= 0xA0 code 0xAF)
        (let [st (.lookup-cache bis (.-struct-cache bis) (- code (.-STRUCT_CACHE_PACKED_START c/codes)))]
          (.handle-struct bis (.-tag st) (.-fields st)))
        (== code (.-STRUCT c/codes))
        (let [st (.lookup-cache bis (.-struct-cache bis) (p/read-int! bis))]
          (.handle-struct bis (.-tag st) (.-fields st)))
        (<= 0x80 code 0x9F)
        (.lookup-cache bis (.-priority-cache bis) (- code (.-PRIORITY_CACHE_PACKED_START c/codes)))
        (== code (.-PUT_PRIORITY_CACHE c/codes))
        (.read-and-cache-object bis (.-priority-cache bis))
        (== code (.-GET_PRIORITY_CACHE c/codes))
        (.lookup-cache bis (.-priority-cache bis) (p/read-int! bis))
        (== code (.-RESET-CACHES c/codes))
        (do
          (.clear-caches! bis)
          (p/read-object! bis))
        (== code (.-FOOTER c/codes))
        (let [calculated-length (dec (bsp/bytes-read bis))
              magic-from-stream (+ (bit-shift-right-zero-fill (bit-shift-left code 24) 0) (bsp/read-int24! bis))]
          (do
