(self, sprite)
return size_record + packed
Pack the sprite into bytearray.
Pack the sprite into bytearray.
Pack the sprite into bytearray .
def pack(self, sprite):
        """Pack the sprite into bytearray."""
        # sprite size record
        size_record = struct.pack('<HH', sprite.width * self._bitsperpixel, sprite.height)
        # interval_to_bytes
        packed = sprite.packed(items_per_byte=8 // self._bitsperpixel)
        return size_record + packed
def pack ( self , sprite ) : # sprite size record size_record = struct . pack ( '<HH' , sprite . width * self . _bitsperpixel , sprite . height ) # interval_to_bytes packed = sprite . packed ( items_per_byte = 8 // self . _bitsperpixel ) return size_record + packed