parameters: (self)
docstring: save apj file
docstring_summary: save apj file
docstring_tokens: save apj file
function: def save_apj(self):
          '''save apj file'''
          self.fw_json['image'] = to_ascii(base64.b64encode(zlib.compress(self.firmware, 9)))
          f = open(self.filename,'w')
          json.dump(self.fw_json,f,indent=4)
          f.truncate()
          f.close()
          print("Saved apj of length %u" % len(self.firmware))
function_tokens: def save_apj ( self ) : self . fw_json [ 'image' ] = to_ascii ( base64 . b64encode ( zlib . compress ( self . firmware , 9 ) ) ) f = open ( self . filename , 'w' ) json . dump ( self . fw_json , f , indent = 4 ) f . truncate ( ) f . close ( ) print ( "Saved apj of length %u" % len ( self . firmware ) )