view pytouhou/utils/bitstream.pxd @ 769:cae5f15ca5ed

formats: Fix possible panic in PBG3 checksum check
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 30 Aug 2022 18:22:53 +0200
parents 3c2f96f1d715
children
line wrap: on
line source

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)