Home > Products > SophiaCompress(Java) OASIS > How It Works

SophiaCompress(Java) OASIS How It Works

The Mechanism of SophiaCompress(Java) OASIS

Generally, a mobile Java application consists of several modules called classes. Each class can roughly be divided into two parts: data and a program that operates data.

SophiaCompress(Java) OASIS optimizes a Java program in execution format and minimizes it with the compression mechanism as shown in the left figure.

Moreover, SophiaCompress(Java) OASIS modifies the contents of an ADF file, such as a JAM file for DoJa and a JAD file for MIDP, and preverifies the compressed program automatically.

  1. Class Integration
    Combining more than two classes into one
  2. Instruction Optimization
    Compressing the program part of a class
  3. Data Optimization
    Compressing the data part of a class

Class Integration


Class integration is a function that combines more than two class files into one file that includes all functions.

It enables the program to share data in all class files, therefore the bigger the number of classes the higher the compression rate.

Since the memory requirements of mobile Java applications have become so big, with several different functions in different classes, this technology is very effective.

Instruction Optimization


An instruction is a statement in a compiled program. By replacing instructions with shorter ones, total size of an application is minimized.

Instruction optimization includes:

  • Remove unused classes
  • Remove unused methods
  • Remove interfaces
  • Remove unused codes
  • Expand inline methods
  • Optimize StackMap
  • Share logic of Basic Blocks
  • Sort the local variables
  • Remove nop instructions
  • Remove and rewrite of goto instructions
  • Remove unnecessary exception tables
  • Remove System.out.print[ln]
  • Remove gc()
  • Change the order of local variables
  • Remove unnecessary stack operations
  • Modify access flags
  • Use original preverifier
  • Support JDK 1.4

Data Optimization

SophiaComprtess(Java) Data optimization is a function that minimizes a program by removing unnecessary data or by sharing common data in a JAR file.