code: def get_buffer( self ):
          
          last_byte = self.current_bits if (self.bits_remaining < 8) else None
  
          result = self.output
          if last_byte is not None:
              result = bytearray( result )
              result.append( last_byte )
  
          if self.bytes_reverse:
              return bytes( reversed( result ) )
          else:
              return bytes( result )
docs: Return a byte string containing the target as currently written.