diff pytouhou/utils/bitstream.pxd @ 490:1b532e7dd521

Decrease PBG3 loading time by improving lzss and bitstream integration.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 04 Oct 2013 14:28:49 +0200
parents
children 3c2f96f1d715
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/pytouhou/utils/bitstream.pxd
@@ -0,0 +1,10 @@
+cdef class BitStream:
+    cdef public object io
+    cdef unsigned int bits
+    cdef unsigned char byte
+
+    cdef bint read_bit(self) except? -1
+    cpdef unsigned int read(self, unsigned int nb_bits) except? 4242
+    cpdef write_bit(self, bint bit)
+    cpdef write(self, unsigned int bits, unsigned int nb_bits)
+    cpdef flush(self)