Home > Products > SophiaCompress(BREW) EARTH > How It Works

SophiaCompress(BREW) EARTH How It Works

SophiaCompress(BREW) EARTH compresses the BREW mod file and generates the boot loader that will load and execute the compressed BREW mod file.

There are three kinds of compression methods, that is, Direct Compress, Separate Compress, and Fork Compression.

From the point of view of memory usage efficiency, it is recommended to select the Separate Compress method or the Fork Compression method.

     

In the Direct Compress method, only one compressed file of an application where the boot loader is embedded will be generated. This file will be resident on heap other than the application itself at run time. Therefore, this method is inferior to other two methods in memory usage efficiency.

In the Separate Compress method, two files of the boot loader and the compressed application will be generated. Since only the boot loader of 4 - 8 KB will be resident on heap other than the application itself at run time, this method is superior to the Direct Compress method in memory usage efficiency.

In the Fork Compress method, it is possible to embed the plug-in that will display an image or a text during the boot-up of the compressed application into the boot loader. Like the Separate Compress method, two files of the boot loader and the compressed application will be generated. Since the plug-in will be embedded into the boot loader, the size of the boot loader will be about "5 KB + size of the plug-in". Only this boot loader will be resident on heap other than the application itself at run time.

You can select the most suitable one among the above 3 methods depending on your usage.


* SophiaCompress(BREW) EARTH 5.0 or later, the LZMA algorithm has been supported.

Direct Compress

Direct Compress
  1. Startup SophiaCompress(BREW), select the mod file to be compressed and execute.
  2. The file will be compressed. The boot loader(APPL.mod) and the compressed application are generated in the same module file (APPL.mod in this example).
  3. The APPL.mod file containing the boot loader and the compressed application are saved into the data folder of the mobile phone.
  4. The boot loader and the compressed application are loaded into heap.
  5. The boot loader expands the compressed application and executes it.
  6. Since both of the compressed application and the boot loader are resident on heap at run time, heap usage of this method is inferior to that of the Separate Compress or Fork Compress method.

Separate Compress

Separate Compress
  1. Startup SophiaCompress(BREW), select the mod file to be compressed and execute.
  2. The file will be compressed. The boot loader(APPL.mod) and the compressed Application(APPL.scb) are generated separately.
  3. The boot loader and the compressed application are saved into a data folder of mobile phone.
  4. The boot loader is loaded into heap.
  5. The compressed application is expanded into heap and executed by the boot loader.
  6. Since the compressed application will not be resident on heap at run time, heap usage of this method is superior to that of Direct Compress method.

Fork Compression

The Fork Compression method is same with the Separate Compression method except that the specified plug-in module is embedded into the boot loader.

Fork Compress
  1. Startup SophiaCompress(BREW), select the mod file to be compressed and the plug-in module(PlugIn.mod), and then execute.
  2. The file will be compressed together with the plug-in. The boot loader(APPL.mod) and the compressed Application(APPL.scb) are generated separately.
  3. Then, the plug-in will be embedded into the boot loader.
  4. The compression rate is about 70%.
  5. Until here is at the development time.
  6. The boot loader and the compressed application are saved into the data folder of the mobile phone.
  7. The boot loader is loaded into heap.
  8. The compressed application is expanded into heap and executed by the boot loader.
  9. The plug-in can be executed before or after the boot-up of the compressed application.
  10. Since the compressed application will not be resident on heap at run time, heap usage of this method is superior to that of Direct Compress method.
  11. The size of the boot loader depends on the content of the plug-in module that will be embedded into the boot loader. It is about "5 KB + size of the plug-in module".

(*)The Fork Compression method will be effective when objects such as an image or text needs to be displayed on the screen since it takes several seconds to boot up the compressed BREW application.