Home > Products > SophiaCompress(Java) > SophiaScale > Specification

SophiaSCALE How it Works

Introduction

Restrictions

The Contents of SophiaSCALE

The following are included in SophiaScale :

All the Copyrights of the above items are reserved by Sophia Cradle Incorporated.

Compression/Decompression Library Interface

The Decompression library interface

Implement as a Decolator Class of InputStream in Java.

e.g.

  InputStream input =
     new MinipressInputStream(
     new BufferedInputStream(
          new FileInputStream("CompressedFile.sz")));

  int c = input.read(); // read extended data

The Compression library interface

Implement as a Decolator Class of OutputStream in Java

A property of this compression algorithm is that the compressed data will not be outputted until OutputStream.close() is called.

e.g.

  OutputStream output =
     new MinipressOutputStream(
     new BufferedOutputStream(
          new FileOutputStream("CompressedFile.sz.sz")));

  output.write(3);//Compress the data and write to "CompressedFile.sz"
  output.close();//It writes when "close()" are called on actual file. 

Compression Commandline Interface

Compress the File

Form1: When compressing one file

  C:> ScaleCompress c [-o CompressedFileName] FileName

The file in FileName will be compressed and then saved in CompressedFileName. If there is no CompressedFileName parameter in this commandline, the compressed file will be outputed as [ FileName + ".sz" ].

e.g.

  ScaleCompress c melody.mld
 
  The compressed file "melody.mld.sz" is generated.


  ScaleCompress c -o test.xxx test.mld
  
  The compressed file "test.xxx" will be generated.

Form2: When compressing all the files in a directory

  C:> ScaleCompress c [-o OutputDirectory]
    [-e CompressTargetAttribute ] [-R] DirectoryName

All the files with the attribute of CompressTargetAttribute located inside the directory of DirectoryName will be compressed, and then saved in the directory of OutputDirectory.

The name of compressed file is the name before compression with an added ".sz".

If there is no CompressTargetAttribute, the files with the attribute of ".mld" will be compressed. To compress all the files inside a directory, please specify "." as the value of CompressTargetAttribute.

If there is no OutputDirectory, the compressed files are outputted into the current directory.

When you add option-R, the files inside the nested directories of DirectoryName will be compressed together.

Decompression Commandline Interface

Almost same procedure as the case of Compression.

Form1: When you decompress one file

  C:> ScaleCompress d [-o expanded file name] FileName

Form2: When you decompress all the files in the directory

C:> ScaleCompress d [-o output directory] 
   -e expandable target extention] [-R] Directory name