-void bread_slow(struct fastbuf *f, void *b, uns l);
-extern inline void bread(struct fastbuf *f, void *b, uns l)
+void bputq_slow(struct fastbuf *f, u64 l);
+static inline void bputq(struct fastbuf *f, u64 l)
+{
+ if (f->bptr + 8 <= f->bufend)
+ {
+ PUT_U64(f->bptr, l);
+ f->bptr += 8;
+ }
+ else
+ bputq_slow(f, l);
+}
+
+void bput5_slow(struct fastbuf *f, u64 l);
+static inline void bput5(struct fastbuf *f, u64 l)
+{
+ if (f->bptr + 5 <= f->bufend)
+ {
+ PUT_U40(f->bptr, l);
+ f->bptr += 5;
+ }
+ else
+ bput5_slow(f, l);
+}
+
+uns bread_slow(struct fastbuf *f, void *b, uns l, uns check);
+static inline uns bread(struct fastbuf *f, void *b, uns l)
+{
+ if (f->bptr + l <= f->bstop)
+ {
+ memcpy(b, f->bptr, l);
+ f->bptr += l;
+ return l;
+ }
+ else
+ return bread_slow(f, b, l, 0);
+}
+
+static inline uns breadb(struct fastbuf *f, void *b, uns l)