#NEWLINE# def encode( self ) : #NEWLINE# #INDENT# pieces = list ( ) #NEWLINE# bit_buffer = 0 #NEWLINE# if self . active : #NEWLINE# #INDENT# bit_buffer = ( bit_buffer | ( 1 << 0 ) ) #NEWLINE# #UNINDENT# pieces . append ( struct . pack ( 'B' , bit_buffer ) ) #NEWLINE# return pieces