Home > Products > SophiaCompress(BREW) EARTH > User's Manual

SophiaCompress(BREW) EARTH User's Manual

What is SophiaCompress(BREW) EARTH ?

SophiaCompress(BREW) EARTH is the world's first compression tool for BREW applications that minimizes the size of thier mod files.

System Requirements

BREW BREW SDK 1.x / 2.x / 3.1 / 4.0
Windows Windows XP Professional
Windows XP Home Edition
Windows 2000 Professional (SP4 or higher)

Compression Methods

There are two compression methods called Direct Compression and Separate Compression.

Separate Compression can be used for compressing BREW 1.x/2.x/3.1/4.0 applets and BREW 3.1/4.0 extensions.

For BREW 1.x/2.x extensions, only Direct Compression is supported.

Direct Compression



Direct Compress


In this method, SophiaCompress(BREW) EARTH generates a new compressed mod file from the original mod file. This compressed mod file is ready to be executed on a BREW device.

The compression ratio is 60-75 %.

Separate Compression



Separate Compress


This method generates Boot up code ( mod file ) and a Compressed Module ( scb file ) from the original mod file. Both files must be installed on the BREW device.

The compression ratio is also 60-75 %.

First, the Boot up code is loaded on the device and it boots up the Compressed Module, which then starts the application.

*1. In the current version, the Compressed Module name length must be less than 127 characters.

*2. For BREW 1.x/2.x extensions, only the Direct Compression is supported.

Separate Compression mif file setting (valid for BREW 3.1/4.0 extensions)
When compressing BREW 3.1 extension using Separate Compression, it is necessary to specify the extension's Class ID, and set the extension name.scb's ACL in the mif file's setting.
More specifically, in order to be able to access to the compressed module of an arbitrary BREW applet compressed by Separate Compression, in the mif's Access Control tab, set the followings:
    Path  : ExtensionName.scb
    Right : r (read authority)
    Group : 0x0 (everyone)

mif file setting for Separate Compression

*1. It is necessary to specify the Class ID (8-hexadecimal numbers) in the GUI or CUI only when compressing BREW 3.1/4.0 extensions using Separate Compression.

*2. For BREW 1.x/2.x extensions, the Separate Compression cannot be used. Only the Direct Compression is supported.

License File

A license file called licence.dat, is issued through email by Sophia Cradle Incorporated.

A Host ID is required to inquire for a license file. Please use HostID.exe, in the same folder as SophiaCompress(BREW) EARTH, to obtain a Host ID.

Execute HostID from the SophiaCompress(BREW) EARTH folder.

SophiaCompress(BREW) EARTH Folder After Installation

* The above folder should be located at the following path by default.


Press the [Copy] button to copy the Host ID to the clip board.

Host ID

Fill in the blanks below, and send it to product@s-cradle.com.

Subject SophiaCompress(BREW) EARTH License file

Text:
Please send me license file for SophiaCompress(BREW) EARTH.

1. Host ID:
2. Company:
3. Name:
4. Phone Number:
5. Email Address:

Startup

Put the license file(licence.dat) published by Sophia Cradle Inc., in the same folder as SophiaCompressBrew.exe.

SophiaCompress(BREW) EARTH Folder After Setting a License File

* The above folder should be located at the following path by default.

Once the license file(licence.dat) is saved, double-clicking on SophiaCompressBrew.exe will boot up SophiaCompress(BREW) EARTH.

Using SophiaCompress(BREW) EARTH

Graphical User Interface (GUI)

SophiaCompress(BREW) EARTH

  1. Start up SophiaCompressBREW.exe.
  2. Specify the name of the "mod" file in [Compressed File Name].
  3. Select [BREW Version].
  4. Select [Endian].
  5. Select [Compression type].
  6. Specify [File suffix] for the suffix of the file compressed using Separate Compression. By default, it is "scb".
  7. When compressing BREW 3.1/4.0 extensions using Separate Compression, check the [Extension] check box, and enter the Class ID (8-hexadecimal numbers).
  8. Click the button labelled [Compress].
  9. Specify a location to save the file in the [Save As] window.
  10. If compression completes successfully, the module size after compression is displayed in green characters next to [module size]. If the compressed module size is bigger then the original module, the size is indicated in red.

The original mod file can also be dragged&dropped to the SophiaCompress(BREW) EARTH icon or to the compression window.

Command line User Interface (CUI)

The syntax for compression using SophiaCompress(BREW) EARTH through the CUI is as follows:

SophiaCompressBrew.exe -(direct | file) [-(little | big)] 
-(brew10 | brew11 | brew2x | brew3x | brew4x) [-suffix xxx] [-ext] 
[-clsid xxxxxxxx] [-ov] [-o destination.mod] source.mod

*1 destination.mod is the file name of the compressed module.

*2 If an error occurs, a warning message will be indicated. But there is no warning message if the compressed module size is bigger then that before compression.

Heap Memory Usage by Compressed Module

Direct Compression

This method generates another compressed mod file with its own Boot up code.

But once decompressed, heap memory must be allocated for the compressed mod ( and its Boot up code ) in addition to the memory already allocated for the original module.

* For large sized original modules, the corresponding heap memory requirements after compression will also be large.

Separate Compression

Using Separate Compression, the heap memory necessary for executing a compressed application on the device is increased only by the size of the Boot up code.

* The essential size of the Boot up code is about 3 kb, but its actual size is 4, 6, or 8 kb, which will depend on the cluster size of the device.

Restrictions

Using the Standard Boot Module of BREW SDK

A module built with AEEModGen.c, the standard Boot up module of BREW SDK 1.0 / 1.1 / 2.0 / 2.1 / 3.1 /4.0, can be compressed and executed without problems by SophiaCompress(BREW) EARTH

SophiaCompress(BREW) EARTH does not support BREW applications developed with Boot up modules other than AEEModGen.c, and we do not guarantee performance with non-standard modules.